ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
The landscape class containing all environmental and topographical data. More...
#include <landscape.h>
Public Member Functions | |
void | FillVegAreaData () |
double | GetVegArea (int v) |
void | DumpVegAreaData (int a_day) |
void | SkylarkEvaluation (SkTerritories *a_skt) |
void | RodenticidePredatorsEvaluation (RodenticidePredators_Population_Manager *a_rppm) |
Population_Manager * | SupplyThePopManager () |
Get the pointer to the current main population manager. More... | |
void | SetThePopManager (Population_Manager *a_ptr) |
Set the pointer to the current main population manager. More... | |
int | SupplyFarmAnimalCensus (int a_farm_ref, int a_LifeStage) |
int | SupplyVegPhase (int a_poly) |
void | SetPolymapping (int a_index, int a_val) |
int | GetPolymapping (int a_index) |
~Landscape (void) | |
Landscape (void) | |
void | SimulationClosingActions () |
void | Tick (void) |
void | TurnTheWorld (void) |
int | HowManyPonds () |
Returns the number of ponds in the landscape. More... | |
int | SupplyRandomPondIndex () |
Returns random pond index. More... | |
int | SupplyRandomPondRef () |
Returns random pond polyref. More... | |
int | SupplyPondIndex (int a_pondref) |
Returns the index of a pond based on pondref or -1 if not found. More... | |
void | SetMaleNewtPresent (int a_InPondIndex) |
Sets a male as being present in a pond. More... | |
bool | SupplyMaleNewtPresent (int a_InPondIndex) |
Determines if a male is present in a pond. More... | |
Farm * | SupplyFarmPtr (int a_owner) |
FarmManager * | SupplyFarmManagerPtr () |
int | SupplyLargestPolyNumUsed () |
bool | SupplyShouldSpray () |
double | SupplyVegDigestabilityVector (unsigned int a_index) |
double | SupplyVegDigestability (int a_polyref) |
double | SupplyVegDigestability (int a_x, int a_y) |
double | SupplyVegHeightVector (unsigned int a_index) |
double | SupplyVegHeight (int a_polyref) |
double | SupplyVegHeight (int a_x, int a_y) |
double | SupplyVegBiomassVector (unsigned int a_index) |
double | SupplyVegBiomass (int a_polyref) |
double | SupplyVegBiomass (int a_x, int a_y) |
int | SupplyVegDensity (int a_polyref) |
int | SupplyVegDensity (int a_x, int a_y) |
double | SupplyWeedBiomass (int a_polyref) |
double | SupplyWeedBiomass (int a_x, int a_y) |
PollenNectarQuality | SupplyPollen (int a_polyref) |
PollenNectarQuality | SupplyPollen (int a_x, int a_y) |
double | SupplyTotalPollen (int a_polyref) |
double | SupplyTotalPollen (int a_x, int a_y) |
PollenNectarQuality | SupplyNectar (int a_polyref) |
PollenNectarQuality | SupplyNectar (int a_x, int a_y) |
double | SupplyTotalNectar (int a_polyref) |
double | SupplyTotalNectar (int a_x, int a_y) |
bool | SupplySkScrapes (int a_polyref) |
bool | SupplyVegPatchy (int a_polyref) |
bool | SupplyVegPatchy (int a_x, int a_y) |
double | SupplyGreenBiomass (int a_polyref) |
double | SupplyGreenBiomass (int a_x, int a_y) |
double | SupplyDeadBiomass (int a_polyref) |
double | SupplyDeadBiomass (int a_x, int a_y) |
double | SupplyLAGreen (int a_polyref) |
double | SupplyLAGreen (int a_x, int a_y) |
double | SupplyLATotal (int a_x, int a_y) |
double | SupplyVegCover (int a_polyref) |
double | SupplyVegCoverVector (unsigned int a_index) |
double | SupplyVegCover (int a_x, int a_y) |
TTypesOfVegetation | SupplyLastSownVeg (int a_polyref) |
TTypesOfVegetation | SupplyLastSownVeg (int a_x, int a_y) |
TTypesOfVegetation | SupplyLastSownVegVector (unsigned int a_index) |
double | SupplyInsects (int a_polyref) |
double | SupplyInsects (int a_x, int a_y) |
bool | SubtractPondLarvalFood (double a_food, int a_polyrefindex) |
Removes larval food from a pond and returns true if it was possible, otherwise false. More... | |
void | CheckForPesticideRecord (LE *a_field, TTypesOfPesticideCategory a_pcide) |
Check if needed and record pesticide application. More... | |
double | SupplyRodenticide (int a_x, int a_y) |
Gets total rodenticide for a location. More... | |
bool | SupplyPesticideDecay (PlantProtectionProducts a_ppp) |
Returns true if there is any pesticide in the system at all at this point. More... | |
double | SupplyPesticide (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets total pesticide for a location. More... | |
bool | SupplyOverspray (int a_x, int a_y) |
Gets the overspray flag. More... | |
double | SupplyPesticideP (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets plant pesticide for a location. More... | |
double | SupplyPesticideS (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets soil pesticide for a location. More... | |
double | SupplyPesticide (int a_polyref, PlantProtectionProducts a_ppp) |
Gets total pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideP (int a_polyref, PlantProtectionProducts a_ppp) |
Gets plant pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideS (int a_polyref, PlantProtectionProducts a_ppp) |
Gets soil pesticide for the centroid of a polygon. More... | |
RodenticidePredators_Population_Manager * | SupplyRodenticidePredatoryManager () |
TTypesOfPesticide | SupplyPesticideType (void) |
GooseFieldList * | GetGooseFields (double) |
Gets the list of suitable goose foraging fields today. More... | |
void | ResetGrainAndMaize () |
Resets all grain. More... | |
void | CalculateOpenness (bool a_realcalc) |
Causes openness to be calulated and stored for all polygons. More... | |
void | WriteOpenness (void) |
Stores openness for all polygons to a standard file. More... | |
void | ReadOpenness (void) |
Reads openness values from a standard input file for all polygons. More... | |
int | CalulateFieldOpennessCentroid (int a_pref) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Searches from centroid. More... | |
int | CalulateFieldOpennessAllCells (int a_pref) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Checks all field 1m2. More... | |
int | LineHighTest (int a_cx, int a_cy, double a_offsetx, double a_offsety) |
Provides a measure of the shortest distance in using a vector from a_cx,a_cy unitl tall obstacles are encountered in both +ve & -ve directions. More... | |
int | SupplyOpenness (int a_poly) |
Get openness for a polygon. More... | |
int | SupplyOpenness (int a_x, int a_y) |
Get openness for a location. More... | |
bool | SupplyLEHigh (int a_x, int a_y) |
Tests whether the polygon at a_x,a_y is designated as high. More... | |
polylist * | SupplyLargeOpenFieldsNearXY (int x, int y, int range, int a_openness) |
Returns a pointer to a list of polygonrefs to large open fields within a range of location x,y. More... | |
int | SupplySoilType (int a_x, int a_y) |
Returns the soil type in ALMaSS types reference numbers. More... | |
int | SupplySoilTypeR (int a_x, int a_y) |
Returns the soil type in rabbit warren reference numbers. More... | |
APoint | SupplyCentroid (int a_polyref) |
APoint | SupplyCentroidIndex (int a_polyrefindex) |
int | SupplyCentroidX (int a_polyref) |
int | SupplyCentroidY (int a_polyref) |
int | SupplyCentroidX (int a_x, int a_y) |
int | SupplyCentroidY (int a_x, int a_y) |
int | SupplyFarmIntensity (int a_x, int a_y) |
int | SupplyFarmIntensity (int a_polyref) |
int | SupplyFarmIntensityI (int a_polyindex) |
TTypesOfLandscapeElement | SupplyElementType (int a_polyref) |
TTypesOfLandscapeElement | SupplyElementType (int a_x, int a_y) |
TTypesOfLandscapeElement | SupplyElementTypeCC (int a_x, int a_y) |
int | SupplyCountryDesig (int a_x, int a_y) |
int | SupplyElementSubType (int a_polyref) |
int | SupplyElementSubType (int a_x, int a_y) |
TTypesOfVegetation | SupplyVegType (int a_x, int a_y) |
TTypesOfVegetation | SupplyVegType (int polyref) |
TTypesOfVegetation | SupplyVegTypeVector (unsigned int a_index) |
int | SupplyGrazingPressureVector (unsigned int a_index) |
int | SupplyGrazingPressure (int a_polyref) |
int | SupplyGrazingPressure (int a_x, int a_y) |
bool | SupplyIsCereal (int a_polyref) |
bool | SupplyIsMatureCereal (int a_polyref) |
bool | SupplyIsGrass (int a_polyref) |
bool | SupplyIsGrass2 (TTypesOfVegetation a_vege_type) |
bool | SupplyIsCereal2 (TTypesOfVegetation a_vege_type) |
bool | SupplyHasTramlines (int a_x, int a_y) |
bool | SupplyHasTramlines (int a_polyref) |
bool | SupplyJustMownVector (unsigned int a_index) |
bool | SupplyJustMown (int a_polyref) |
int | SupplyJustSprayedVector (unsigned int a_index) |
int | SupplyJustSprayed (int a_polyref) |
int | SupplyJustSprayed (int a_x, int a_y) |
int | SupplyTreeAge (int a_Polyref) |
int | SupplyTreeAge (int, int) |
int | SupplyVegAge (int a_Polyref) |
int | SupplyVegAge (int a_x, int a_y) |
int | SupplyNumberOfFarms () |
int | SupplyFarmOwner (int a_x, int a_y) |
int | SupplyFarmOwner (int a_polyref) |
int | SupplyFarmOwnerIndex (int a_x, int a_y) |
int | SupplyFarmOwnerIndex (int a_polyref) |
TTypesOfFarm | SupplyFarmType (int a_polyref) |
TTypesOfFarm | SupplyFarmType (int a_x, int a_y) |
TTypesOfOptFarms | SupplyOptFarmType (int a_x, int a_y) |
int | SupplyFarmArea (int a_polyref) |
double | SupplyPolygonAreaVector (int a_polyref) |
Returns the area of a polygon using the vector index as a reference. More... | |
double | SupplyPolygonArea (int a_polyref) |
void | SetBirdSeedForage (int a_polyref, double a_fooddensity) |
Sets the grain forage resource as seen from a goose standpoint at a polygon. More... | |
void | SetBirdMaizeForage (int a_polyref, double a_fooddensity) |
Sets the maize forage resource as seen from a goose standpoint at a polygon. More... | |
double | SupplyGooseGrazingForageH (double a_height, GooseSpecies a_goose) |
Returns the leaf forage resource as seen from a goose standpoint at a polygon based on the height only. More... | |
double | SupplyGooseGrazingForageH (int a_polygon, GooseSpecies a_goose) |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by number based on height only. More... | |
double | GetActualGooseGrazingForage (int a_x, int a_y, GooseSpecies a_goose) |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location. More... | |
double | GetActualGooseGrazingForage (int a_polygon, GooseSpecies a_goose) |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location The amount of food avaiable as grazing resource based on the vegetation height is species specific. More... | |
double | SupplyBirdSeedForage (int a_polyref) |
Returns the grain forage resource. More... | |
double | SupplyBirdSeedForage (int a_x, int a_y) |
Returns the grain forage resource as seen from a goose standpoint at an x,y location. More... | |
double | SupplyBirdMaizeForage (int a_polyref) |
Returns the maize forage resource. More... | |
bool | SupplyInStubble (int a_polyref) |
Returns whether its cereal. More... | |
double | SupplyBirdMaizeForage (int a_x, int a_y) |
Returns the maize forage resource as seen from a goose standpoint at an x,y location. More... | |
void | RecordGooseNumbers (int a_poly, int a_number) |
This records the number of geese on the polygon the day before. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | RecordGooseSpNumbers (int a_poly, int a_number, GooseSpecies a_goose) |
This records the number of geese of each species on the polygon the day before. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | RecordGooseNumbersTimed (int a_poly, int a_number) |
This records the number of geese on the polygon the day before at a predefined time. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | RecordGooseSpNumbersTimed (int a_poly, int a_number, GooseSpecies a_goose) |
This records the number of geese of each species on the polygon the day before at a predefined time. To prevent lots of unnecessary clearing of values two values are saved, the number and simulation day - on reading the simulation day number can be used to modify the return value - see GetGooseNumbers() More... | |
void | RecordGooseRoostDist (int a_polyref, int a_dist, GooseSpecies a_goose) |
Records the distance to the closest roost of goose species. More... | |
void | GrazeVegetation (int a_poly, double a_forage) |
Removes grazing forage from a poly per m2. More... | |
void | GrazeVegetationTotal (int a_poly, double a_forage) |
Removes grazing forage from a poly and divides this out per m2. More... | |
int | GetGooseNumbers (int a_poly) |
This returns the number of geese on the polygon the day before. More... | |
int | GetQuarryNumbers (int a_poly) |
This returns the number of geese which are legal quarry on the polygon the day before. More... | |
int | GetGooseNumbers (int a_x, int a_y) |
This returns the number of geese on the polygon specifed by a_x, a_y the day before. More... | |
int | SupplyLastTreatment (int a_polyref, int *a_index) |
int | SupplyLastTreatment (int a_x, int a_y, int *a_index) |
double | GetHareFoodQuality (int a_polygon) |
double | SupplyGlobalRadiation () |
double | SupplyGlobalRadiation (long a_date) |
double | SupplyRain (void) |
double | SupplyTemp (void) |
double | SupplyHumidity (void) |
double | SupplyMeanTemp (long a_date, unsigned int a_period) |
double | SupplyWind (void) |
int | SupplyWindDirection (void) |
double | SupplySnowDepth (void) |
bool | SupplySnowcover (void) |
int | SupplyDaylength (void) |
double | SupplyRain (long a_date) |
double | SupplyTemp (long a_date) |
double | SupplyWind (long a_date) |
double | SupplyDayDegrees (int a_polyref) |
double | SupplyRainPeriod (long a_date, int a_period) |
double | SupplyWindPeriod (long a_date, int a_period) |
double | SupplyTempPeriod (long a_date, int a_period) |
bool | SupplySnowcover (long a_date) |
bool | IsFieldType (TTypesOfLandscapeElement a_tole) |
int | SupplyPolyRef (int a_x, int a_y) |
int | SupplyPolyRefIndex (int a_x, int a_y) |
int | SupplyPolyRefCC (int a_x, int a_y) |
int | SupplySimAreaWidth (void) |
int | SupplySimAreaHeight (void) |
int | SupplySimAreaMaxExtent (void) |
int | SupplySimAreaMinExtent (void) |
int | SupplyDaylength (long a_date) |
int | SupplyDayInYear (void) |
int | SupplyHour (void) |
Get the hour of the day. More... | |
int | SupplyMinute (void) |
Get the minute of the hour. More... | |
unsigned int | SupplyNumberOfPolygons (void) |
TTypesOfLandscapeElement | SupplyElementTypeFromVector (unsigned int a_index) |
int | SupplyPolyRefVector (unsigned int a_index) |
int | SupplyPesticideCell (int a_polyref) |
int | SupplyValidX (int a_polyref) |
int | SupplyValidY (int a_polyref) |
double | SupplyPondPesticide (int a_poly_index) |
Get the pesticide concentration per liter from a pond (must be a pond index on calling) More... | |
void | CorrectCoords (int &x, int &y) |
Function to prevent wrap around errors with co-ordinates using x/y pair. More... | |
APoint | CorrectCoordsPt (int x, int y) |
Function to prevent wrap around errors with co-ordinates using x/y pair. More... | |
void | CorrectCoordsPointNoWrap (APoint &a_pt) |
Function to prevent wrap around errors with co-ordinates using a APoint. More... | |
int | CorrectWidth (int x) |
int | CorrectHeight (int y) |
void | SetPolyMaxMinExtents (void) |
void | CalculateCentroids (void) |
void | DumpCentroids (void) |
void | BuildingDesignationCalc () |
used to calculate whether a building is rural or town - for rodenticide use More... | |
void | CentroidSpiralOut (int a_polyref, int &a_x, int &a_y) |
const char * | SupplyVersion (void) |
void | DumpPublicSymbols (const char *a_dumpfile, CfgSecureLevel a_level) |
void | DumpAllSymbolsAndExit (const char *a_dumpfile) |
bool | ReadSymbols (const char *a_cfgfile) |
void | DumpMapInfoByArea (const char *a_filename, bool a_append, bool a_dump_zero_areas, bool a_write_veg_names) |
void | Warn (std::string a_msg1, std::string a_msg2) |
int * | SupplyMagicMapP (int a_x, int a_y) |
int | MagicMapP2PolyRef (int a_magic) |
int | SupplyRoadWidth (int, int) |
double | SupplyTrafficLoad (int a_x, int a_y) |
double | SupplyTrafficLoad (int a_polyref) |
int | SupplyTreeHeight (int, int) |
int | SupplyUnderGrowthWidth (int, int) |
int | SupplyTreeHeight (int) |
int | SupplyUnderGrowthWidth (int) |
long | SupplyGlobalDate (void) |
int | SupplyYear (void) |
int | SupplyYearNumber (void) |
int | SupplyMonth (void) |
int | SupplyDayInMonth (void) |
double | SupplyDaylightProp () |
double | SupplyNightProp () |
void | SupplyLEReset (void) |
int | SupplyLENext (void) |
int | SupplyLECount (void) |
LE_Signal | SupplyLESignal (int a_polyref) |
void | SetLESignal (int a_polyref, LE_Signal a_signal) |
void | IncTreatCounter (int a_treat) |
TTypesOfLandscapeElement | TranslateEleTypes (int EleReference) |
TTypesOfVegetation | TranslateVegTypes (int VegReference) |
LE * | SupplyLEPointer (int a_polyref) |
int | BackTranslateEleTypes (TTypesOfLandscapeElement EleReference) |
int | BackTranslateVegTypes (TTypesOfVegetation VegReference) |
std::string | EventtypeToString (int a_event) |
std::string | PolytypeToString (TTypesOfLandscapeElement a_le_type) |
std::string | VegtypeToString (TTypesOfVegetation a_veg) |
void | InitOsmiaBeeNesting () |
Read in the Osmia nest density files and allocate to each LE object. More... | |
void | UpdateOsmiaNesting () |
Tesll all LE objects to update their osmia nest status. More... | |
bool | SupplyOsmiaNest (int a_x, int a_y) |
Find out whether an osmia nest can be made here. More... | |
void | IncOsmiaNest (int a_x, int a_y) |
Reopen the osmia nest here More... | |
void | ReleaseOsmiaNest (int a_x, int a_y) |
Reopen the osmia nest here More... | |
Protected Member Functions | |
void | GISASCII_Output (string outpfile, int UTMX, int UTMY) |
Write ASCII file of the ALMaSS map. More... | |
void | AddGreenElement (LE *a_green) |
void | ReadPolys (const char *a_polyfile) |
void | ReadPolys2 (const char *a_polyfile) |
reads in polygon information. Version 2 including centroid and openness information More... | |
void | PolysValidate (bool a_exit_on_invalid) |
bool | PolysRemoveInvalid (void) |
void | PolysDump (const char *a_filename) |
void | DumpMap (const char *a_filename) |
void | ConsolidatePolys (void) |
void | CountMapSquares (void) |
void | PolysRenumber (void) |
void | RebuildPolyMapping () |
void | ForceArea (void) |
void | ChangeMapMapping (void) |
LE * | NewElement (TTypesOfLandscapeElement a_type) |
void | RemoveMissingValues () |
A method for replacing missing values in the map with corrected ones - slow. More... | |
void | TestCropManagement (void) |
void | VegDump (int x, int y) |
void | EventDump (int x, int y, int x2, int y2) |
void | EventDumpPesticides (int x1, int y1) |
void | DegreesDump () |
Prints the sum of day degrees. See FarmManager::daydegrees. More... | |
bool | BorderNeed (TTypesOfLandscapeElement a_letype) |
void | BorderAdd (LE *a_field, TTypesOfLandscapeElement a_type) |
void | BorderRemoval (void) |
int | RemoveSmallPolygons (void) |
Removes small polygons from the map. More... | |
void | CreatePondList () |
Creates a list of pond polygon refs/indexes for easy look up. More... | |
void | UnsprayedMarginAdd (LE *a_field) |
void | UnsprayedMarginScan (LE *a_field, int a_width) |
void | BorderScan (LE *a_field, int a_width) |
bool | BorderTest (int a_fieldpoly, int a_borderpoly, int a_x, int a_y) |
bool | StepOneValid (int a_polyindex, int a_x, int a_y, int step) |
bool | UMarginTest (int a_fieldpoly, int a_borderpoly, int a_x, int a_y, int a_width) |
bool | FindValidXY (int a_field, int &a_x, int &a_y) |
bool | BorderStep (int a_fieldpoly, int a_borderpoly, int *a_x, int *a_y) |
bool | BorderStep (int a_fieldpoly, int a_borderpoly, APoint *a_coord) |
void | AddBeetleBanks (TTypesOfLandscapeElement a_tole) |
bool | BeetleBankPossible (LE *a_field, TTypesOfLandscapeElement a_tole) |
void | BeetleBankAdd (int x, int y, int angle, int length, LE *a_field, TTypesOfLandscapeElement a_tole) |
bool | FindFieldCenter (LE *a_field, int *x, int *y) |
int | FindLongestAxis (int *x, int *y, int *a_length) |
void | AxisLoop (int a_poly, int *a_x, int *a_y, int a_axis) |
void | AxisLoop (int a_poly, APoint *a_cor, int a_axis) |
void | AxisLoopLtd (int a_poly, APoint *a_cor, int a_axis, int a_limit) |
void | hb_Add (void) |
void | hb_AddNewHedgebanks (int a_orig_poly_num) |
int | hb_StripingDist (void) |
void | hb_GenerateHBPolys (void) |
void | hb_FindHedges (void) |
bool | hb_FindBoundingBox (int a_poly_num) |
void | hb_UpPolyNumbers (void) |
void | hb_ClearPolygon (int a_poly_num) |
void | hb_PaintBorder (int a_color) |
bool | hb_MapBorder (int a_x, int a_y) |
bool | hb_HasOtherNeighbour (int a_x, int a_y) |
bool | hb_PaintWhoHasNeighbourColor (int a_neighbour_color, int a_new_color) |
bool | hb_HasNeighbourColor (int a_x, int a_y, int a_neighbour_color) |
void | hb_MarkTopFromLocalMax (int a_color) |
void | hb_MarkTheBresenhamWay (void) |
int | hb_MaxUnpaintedNegNeighbour (int a_x, int a_y) |
void | hb_ResetColorBits (void) |
void | hb_RestoreHedgeCore (int a_orig_poly_number) |
void | hb_DownPolyNumbers (void) |
void | hb_Cleanup (void) |
void | DumpMapGraphics (const char *a_filename) |
void | DumpTreatCounters (const char *a_filename) |
bool | CIPELandscapeMaker () |
Protected Attributes | |
int | m_treatment_counts [last_treatment] |
int | m_LargestPolyNumUsed |
vector< int > | m_PondIndexList |
List of pond indexes. More... | |
vector< int > | m_PondRefsList |
List of pond polyrefs. More... | |
vector< int > | hb_hedges |
vector< LE * > | hb_new_hbs |
int | m_x_add [8] |
int | m_y_add [8] |
int * | hb_map |
int | hb_width |
int | hb_height |
int | hb_size |
int | hb_min_x |
int | hb_max_x |
int | hb_min_y |
int | hb_max_y |
int | hb_first_free_poly_num |
int | hb_core_pixels |
int | hb_border_pixels |
TTypesOfPesticide | m_PesticideType |
An attribute to hold the pesticide type being tested, if there is one, if not default is -1. More... | |
bool | m_toxShouldSpray |
int | le_signal_index |
Private Attributes | |
char | m_versioninfo [30] |
FarmManager * | m_FarmManager |
List of all the farms. More... | |
vector< LE * > | m_elems |
List of all landscape elements. The index is a sequential number, to get the polynum look this number up in m_polymapping. More... | |
RasterMap * | m_land |
The big map. More... | |
vector< int > | m_polymapping |
PesticideMap * | m_PesticideMap |
For specialised pesticide recording. More... | |
int | m_width |
int | m_height |
int | m_width10 |
int | m_height10 |
int | m_minmaxextent |
int | m_maxextent |
bool | m_NeedCentroidCalculation |
a flag to ensure centroid calculation on object construction More... | |
bool | m_NeedOpennessCalculation |
a flag to ensure openness calculation on object construction More... | |
bool | m_DoMissingPolygonsManipulations |
double * | l_vegtype_areas |
Population_Manager * | m_ThePopManager |
a pointer to the current main population manager More... | |
RodenticideManager * | m_RodenticideManager |
RodenticidePredators_Population_Manager * | m_RodenticidePreds |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_PF |
Curve relatning goose intake rates in KJ/min to vegetation height. More... | |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_BG |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_GL |
The landscape class containing all environmental and topographical data.
Definition at line 112 of file landscape.h.
Landscape::~Landscape | ( | void | ) |
Definition at line 1424 of file Landscape.cpp.
References cfg_rodenticide_enable, g_crops, g_date, g_letype, g_msg, g_pest, g_weather, l_map_dump_treatcounts_enable, l_map_dump_treatcounts_file, CfgBool::value(), and CfgStr::value().
Landscape::Landscape | ( | void | ) |
If the farmer decision making model is on, the FarmManager::InitFarms() is called here to initialise the farms. The FarmManager::FindNeighbours() function is called.
Next job after checking the basic map validity is to deal with any missing polygon information This is done by identifying the polygons that are large contiguous areas and making them wasteland. The rest are left and nibbled away to join adjacent polygons. This is a time consuming operation so is only done if there have been any missing info polygons found.
To be sure we have enough space to do map manipulations if required, then the polygons need to be renumbered - unless they are done already.
Rodenticide handling code. If enabled then rodenticide mapping provides access to predicted relative density of poisoned rodents per unit area.
Definition at line 814 of file Landscape.cpp.
References LE_TypeClass::BackTranslateEleTypes(), cfg_AddBeetleBanks, cfg_B6A, cfg_B6B, cfg_B6C, cfg_B6D, cfg_B6E, cfg_B6F, cfg_B6G, cfg_B6H, cfg_BeetleBankType, cfg_DumpFarmAreas, cfg_dumpvegjan, cfg_dumpvegjanfile, cfg_dumpvegjune, cfg_dumpvegjunefile, cfg_G6A, cfg_G6B, cfg_G6C, cfg_G6D, cfg_G6E, cfg_G6F, cfg_G6G, cfg_G6H, cfg_HedgeSubtypeMaximum, cfg_HedgeSubtypeMinimum, cfg_MaxPondSize, cfg_OptimiseBedriftsmodelCrops, cfg_OptimisingFarms, cfg_P1A, cfg_P1B, cfg_P1C, cfg_P1D, cfg_P1E, cfg_P1F, cfg_P1G, cfg_P1H, cfg_pesticidemapcellsize, cfg_pesticidemapnoyears, cfg_pesticidemapon, cfg_pesticidemapstartyear, cfg_pesticidemaptype, cfg_pesticidetesttype, cfg_rodenticide_enable, cfg_WriteCurve, LE::DoCopy(), g_crops, g_date, g_landscape_p, g_letype, g_map_le_border_chance, g_map_le_borderremoval, g_map_le_borders, g_map_le_borders_min_field_size, g_map_le_borderstype, g_map_le_borderwidth, g_map_le_unsprayedmargins, g_map_orchards_borders, g_msg, g_nectarpollen, g_pest, g_SpeedyDivides, g_weather, l_map_art_hedgebanks, l_map_ascii_utm_x, l_map_ascii_utm_y, l_map_calc_openness, l_map_consolidatepolys, l_map_cropcurves_file, l_map_dump_enable, l_map_dump_event_enable, l_map_dump_gfx_enable, l_map_dump_gfx_file, l_map_dump_map_file, l_map_dump_poly_file, l_map_dump_veg_enable, l_map_map_file, l_map_no_pesticide_fields, l_map_poly_file, l_map_print_git_version_info, l_map_print_version_info, l_map_removesmallpolygons, l_map_weather_file, l_map_write_ascii, last_treatment, RasterMap::MapWidth(), Calendar::Reset(), LE::SetArea(), LE::SetOpenness(), LE::SetPoly(), LE::SetSoilType(), LE::SetUnsprayedMarginPolyRef(), tole_Field, tole_Freshwater, tole_HedgeBank, tole_Hedges, tole_Missing, tole_Orchard, tole_Pond, tole_Wasteland, tov_Undefined, LE_TypeClass::TranslateEleTypes(), CfgInt::value(), CfgFloat::value(), CfgBool::value(), CfgStr::value(), version_date, version_major, version_minor, version_revision, MapErrorMsg::Warn(), WARN_BUG, and WARN_FILE.
|
protected |
Beetle-bank addition - tests whether we can add a bank to this field, and then decides where to put it an adds it.
For each element, if it is a field then assess whether should have a beetle bank. This will depend on whether it is in the region defined for adding the bank, and a probability. This code requires polygon centroids to be active, either calculated or via l_map_read_openness == true.
To provide for more flexibilty, a tole_type is passed, and beetlebanks may be created of this tole_type instead of tole_BeetleBank
Definition at line 2723 of file Landscape.cpp.
References cfg_BeetleBankChance, cfg_BeetleBankInvert, cfg_BeetleBankMaxX, cfg_BeetleBankMaxY, cfg_BeetleBankMinX, cfg_BeetleBankMinY, g_msg, tole_Field, CfgInt::value(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_MSG.
|
protected |
|
protected |
Starting at a_x,a_y each location is tested along a vector given by m_x_add & m_y_add until we step outside the polygon. a_x & a_y are modified on return.
Definition at line 2898 of file Landscape.cpp.
|
protected |
Starting at a_x,a_y each location is tested along a vector given by m_x_add & m_y_add until we step outside the polygon. a_x & a_y are modified on return.
Definition at line 2938 of file Landscape.cpp.
|
protected |
Starting at a_x,a_y each location is tested along a vector given by m_x_add & m_y_add until we step outside the polygon. a_x & a_y are modified on return.
Definition at line 2917 of file Landscape.cpp.
|
inline |
Definition at line 1662 of file landscape.h.
References LE_TypeClass::BackTranslateEleTypes(), and g_letype.
|
inline |
Definition at line 1669 of file landscape.h.
References LE_TypeClass::BackTranslateVegTypes(), and g_letype.
|
protected |
Definition at line 2971 of file Landscape.cpp.
References LE::AddArea(), LE_TypeClass::BackTranslateEleTypes(), cfg_BeetleBankWidth, g_letype, m_polymapping, LE::SetArea(), LE::SetMapValid(), LE::SetPoly(), LE::SetValidXY(), VegElement::SetVegPatchy(), start, tole_BeetleBank, tole_MownGrass, tole_PermanentSetaside, and CfgInt::value().
|
protected |
Beetle bank placement rules are:
No bank if the total bank area is going to be >=5% of the field area
No bank if the field is < 1Ha
No bank if the breadth of the field is < 100m
Definition at line 2772 of file Landscape.cpp.
References cfg_BeetleBankMaxArea, cfg_BeetleBankWidth, LE::GetArea(), CfgInt::value(), and CfgFloat::value().
|
protected |
Definition at line 2347 of file Landscape.cpp.
References g_map_le_borderwidth, g_msg, LE::GetValidX(), LE::GetValidY(), m_polymapping, LE::SetArea(), LE::SetBorder(), LE::SetPoly(), CfgInt::value(), MapErrorMsg::Warn(), and WARN_BUG.
|
protected |
Definition at line 4529 of file Landscape.cpp.
References g_msg, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_WaterBufferZone, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_BUG.
|
protected |
Definition at line 2271 of file Landscape.cpp.
References tole_Field, tole_FieldBoundary, tole_HedgeBank, and tole_Hedges.
|
protected |
Requires centroid calculation before calling this method. Centroids must be inside the polygon and valid.
Loop through this procedure the width of the margin times. Each time a dummy margin is added using polyref=-99 and all locations this is done are remembered. Then later all positions covered by -99 are replaced with the real polygon index.
Definition at line 2365 of file Landscape.cpp.
References LE::AddArea(), g_msg, LE::GetArea(), LE::GetBorder(), LE::GetPoly(), l_map_exit_on_zero_area, m_polymapping, LE::SetMapValid(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Definition at line 2537 of file Landscape.cpp.
|
protected |
Definition at line 2479 of file Landscape.cpp.
|
protected |
Definition at line 2452 of file Landscape.cpp.
void Landscape::BuildingDesignationCalc | ( | ) |
used to calculate whether a building is rural or town - for rodenticide use
Runs through all elements and identifies the ones where rodenticide bait may be placed. If it is a building then we count the number of buildings near to it and designate it town if there are more than cfg_mintownbuildingnumber.
Definition at line 3287 of file Landscape.cpp.
References cfg_mintownbuildingdistance, cfg_mintownbuildingnumber, tole_Building, tole_ConiferousForest, tole_DeciduousForest, tole_MixedForest, tole_YoungForest, and CfgInt::value().
void Landscape::CalculateCentroids | ( | void | ) |
Finds a location inside each polygon as a roughly calculated centre point. The point will be within the polygon. This also uses the stored Max/Min coordinates for each polygon that form a rectangle around it.
Definition at line 3040 of file Landscape.cpp.
void Landscape::CalculateOpenness | ( | bool | a_realcalc | ) |
Causes openness to be calulated and stored for all polygons.
First must calculate centroid. Runs through the list of elements and any that are marsh, field, or pasture will have an openness score calculated
Definition at line 322 of file Landscape.cpp.
References tole_Field, tole_Marsh, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, and tole_Scrub.
int Landscape::CalulateFieldOpennessAllCells | ( | int | a_pref | ) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Checks all field 1m2.
Starts with North West and moves round the points of the compass 180 degrees. For each point tested we want the minimum length found, but between points we are interested in the max
runs a line out and also in 180 degrees, two lines.
runs a line out and also in 180 degrees, two lines.
Definition at line 401 of file Landscape.cpp.
int Landscape::CalulateFieldOpennessCentroid | ( | int | a_pref | ) |
Provides a measure of the shortest distance in 360 degree, e-g- looking NE % SW before tall obstacles are encountered at both ends. Searches from centroid.
Starts with North West and moves round the points of the compass 180 degrees.
runs a line out and also in 180 degrees, two lines.
runs a line out and also in 180 degrees, two lines.
Definition at line 359 of file Landscape.cpp.
void Landscape::CentroidSpiralOut | ( | int | a_polyref, |
int & | a_x, | ||
int & | a_y | ||
) |
Definition at line 3073 of file Landscape.cpp.
References g_msg, and MapErrorMsg::Warn().
|
protected |
Our map is an array of polygon indentifiers, where we really want to know the associated landscape element of a X-Y coordinate pair.
Changing this to m_elems[] indices will save us one redirection when inquiring information from the landscape, and only costs us the fixed translation step performed here at startup.
Definition at line 2130 of file Landscape.cpp.
References m_polymapping, PEST_GRIDSIZE, and PEST_GRIDSIZE_POW2.
void Landscape::CheckForPesticideRecord | ( | LE * | a_field, |
TTypesOfPesticideCategory | a_pcide | ||
) |
Check if needed and record pesticide application.
Definition at line 669 of file Landscape.cpp.
References cfg_pesticidemapon, cfg_pesticidemaptype, insecticide, testpesticide, and CfgBool::value().
Referenced by Farm::FungicideTreat(), OptimisingFarm::FungicideTreat(), Farm::HerbicideTreat(), OptimisingFarm::HerbicideTreat(), Farm::InsecticideTreat(), OptimisingFarm::InsecticideTreat(), Farm::Molluscicide(), and Farm::ProductApplication().
|
protected |
|
protected |
Runs through the map checking each cell for polygon type. If it is in our replace list then it re-written as the first instance of that polygon type encountered. All subsequent instances of that type are then deleted.
replaceList contains the types of all tole types with no behaviour that can be consolidated. This list needs to be kept up-to-date.
Definition at line 1329 of file Landscape.cpp.
References g_msg, m_polymapping, tole_BareRock, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_Garden, tole_HeritageSite, tole_IndividualTree, tole_PlantNursery, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_Saltwater, tole_SandDune, tole_StoneWall, tole_UrbanNoVeg, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Function to prevent wrap around errors with co-ordinates using x/y pair.
m_width10 & m_height10 are used to avoid problems with co-ordinate values that are very large. Problems will only occur if coords passed are >10x the world width or height.
Definition at line 1535 of file landscape.h.
References m_height, m_height10, m_width, and m_width10.
|
inline |
Function to prevent wrap around errors with co-ordinates using a APoint.
This just cuts off extremes of coordinate values so that the point stays in landscape. Can't use a modulus or we get wrap around, and in this case we don't want that
Definition at line 1555 of file landscape.h.
|
inline |
Function to prevent wrap around errors with co-ordinates using x/y pair.
m_width10 & m_height10 are used to avoid problems with co-ordinate values that are very large. Problems will only occur if coords passed are >10x the world width or height.
Definition at line 1544 of file landscape.h.
References m_height, m_height10, m_width, and m_width10.
|
inline |
Definition at line 1573 of file landscape.h.
References m_height, and m_height10.
|
inline |
|
protected |
Definition at line 2040 of file Landscape.cpp.
|
protected |
Creates a list of pond polygon refs/indexes for easy look up.
Just creates an unordered list of polyref numbers and m_elems indices for all ponds. This is for easy look-up by e.g. newts
Definition at line 2594 of file Landscape.cpp.
References tole_Pond.
|
protected |
Prints the sum of day degrees. See FarmManager::daydegrees.
Definition at line 1687 of file Landscape.cpp.
|
inline |
Definition at line 785 of file landscape.h.
References Configurator::DumpAllSymbolsAndExit(), and g_cfg.
void Landscape::DumpCentroids | ( | void | ) |
Definition at line 3275 of file Landscape.cpp.
|
protected |
Definition at line 1386 of file Landscape.cpp.
|
protected |
Definition at line 3599 of file Landscape.cpp.
References g_msg, tole_Field, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::DumpMapInfoByArea | ( | const char * | a_filename, |
bool | a_append, | ||
bool | a_dump_zero_areas, | ||
bool | a_write_veg_names | ||
) |
Definition at line 3652 of file Landscape.cpp.
References Calendar::DayInYear(), g_date, g_msg, Calendar::OldDays(), tov_OFirstYearDanger, tov_Undefined, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Definition at line 781 of file landscape.h.
References Configurator::DumpPublicSymbols(), and g_cfg.
|
protected |
Definition at line 3586 of file Landscape.cpp.
References g_msg, last_treatment, start, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::DumpVegAreaData | ( | int | a_day | ) |
Definition at line 4680 of file Landscape.cpp.
References cfg_dumpvegjan, cfg_dumpvegjanfile, cfg_dumpvegjune, cfg_dumpvegjunefile, CfgBool::value(), and CfgStr::value().
|
protected |
Definition at line 1697 of file Landscape.cpp.
References g_msg, sleep_all_day, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Definition at line 1720 of file Landscape.cpp.
References fungicide_treat, g_msg, herbicide_treat, insecticide_treat, sleep_all_day, MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::EventtypeToString | ( | int | a_event | ) |
Definition at line 3918 of file Landscape.cpp.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, bed_forming, biocide, bulb_harvest, burn_straw_stubble, cattle_out, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, fa_ammoniumsulphate, fa_calcium, fa_greenmanure, fa_manganesesulphate, fa_manure, fa_npk, fa_pk, fa_rsm, fa_sludge, fa_slurry, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_calcium, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_rsm, fp_sludge, fp_slurry, fungicide_treat, g_msg, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, molluscicide, mow, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, spring_sow_with_ferti, start, straw_chopping, straw_covering, straw_removal, strigling, strigling_hill, strigling_sow, stubble_cultivator_heavy, stubble_harrowing, stubble_plough, swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, MapErrorMsg::Warn(), WARN_FILE, water, and winter_plough.
void Landscape::FillVegAreaData | ( | ) |
|
protected |
Definition at line 2799 of file Landscape.cpp.
References LE::GetPoly().
|
protected |
Definition at line 2851 of file Landscape.cpp.
|
protected |
Definition at line 2688 of file Landscape.cpp.
|
protected |
Definition at line 2072 of file Landscape.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_BUG.
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location The amount of food avaiable as grazing resource based on the vegetation height is species specific.
a_polygon | [in] The polygon refence number for the polygon we are interested in (assumed grass or cereals). This needs to be checked before calling |
a_goose | [in] Is the type of goose calling which is needed to determine how to assess the value of the current forage availability (ie its different for different types of geese) |
Definition at line 607 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by x,y location.
a_x | [in] The x-coordinate in a polygon we are interested in (assumed grass or cereals). This needs to be checked before calling |
a_y | [in] The x-coordinate in a polygon we are interested in (assumed grass or cereals). This needs to be checked before calling |
a_goose | [in] Is the type of goose calling which is needed to determine how to assess the value of the current forage availability (ie its different for different types of geese) |
Definition at line 596 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
GooseFieldList * Landscape::GetGooseFields | ( | double | a_minopenness | ) |
Gets the list of suitable goose foraging fields today.
Here we need to go through all possible goose feeding locations to find out if they have any forage in them, and then create a list of those to return.
To make this efficient we need to have a list of fields.
First must calculate centroid. Runs through the list of elements and any that have an openness score bigger than our target are saved.
Definition at line 685 of file Landscape.cpp.
References GooseFieldListItem::digestability, GooseFieldListItem::geese, GooseFieldListItem::geesesp, GooseFieldListItem::geesespTimed, GooseFieldListItem::geeseTimed, GooseFieldListItem::grain, GooseFieldListItem::grass, GooseFieldListItem::lastsownveg, GooseFieldListItem::maize, GooseFieldListItem::openness, GooseFieldListItem::polyref, GooseFieldListItem::previouscrop, GooseFieldListItem::roostdists, GooseFieldListItem::vegheight, GooseFieldListItem::vegphase, GooseFieldListItem::vegtype, and GooseFieldListItem::vegtypechr.
int Landscape::GetGooseNumbers | ( | int | a_poly | ) |
This returns the number of geese on the polygon the day before.
Definition at line 3383 of file Landscape.cpp.
References m_polymapping.
int Landscape::GetGooseNumbers | ( | int | a_x, |
int | a_y | ||
) |
This returns the number of geese on the polygon specifed by a_x, a_y the day before.
This returns the number of geese on the polygon the day before.
Definition at line 3397 of file Landscape.cpp.
double Landscape::GetHareFoodQuality | ( | int | a_polygon | ) |
Definition at line 3403 of file Landscape.cpp.
References g_FarmIntensivenessH, g_VegHeightForageReduction, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_Fence, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_Parkland, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideVerge, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UrbanNoVeg, tole_UrbanPark, tole_Vildtager, tole_Wasteland, tole_WindTurbine, tole_WoodlandMargin, and tole_WoodyEnergyCrop.
|
inline |
int Landscape::GetQuarryNumbers | ( | int | a_poly | ) |
This returns the number of geese which are legal quarry on the polygon the day before.
This returns the number of geese on the polygon the day before.
Definition at line 3390 of file Landscape.cpp.
References m_polymapping.
|
inline |
|
protected |
Write ASCII file of the ALMaSS map.
Here we write a ASCII file of the current map. Useful when visualizing output from simulations. The function will output the entity that is defined in the config: l_map_ascii_map_entity. The default is polyref number (l_map_ascii_map_entity = 1).
[in] | outpfile | Name of the output file |
[in] | UTMX | Utm x-coordinate of the lower lefthand corner of the map |
[in] | UTMY | Utm y-coordinate of the lower lefthand corner of the map |
Definition at line 3507 of file Landscape.cpp.
References g_msg, l_map_ascii_map_entity, CfgInt::value(), MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Removes grazing forage from a poly per m2.
Definition at line 670 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Removes grazing forage from a poly and divides this out per m2.
Definition at line 676 of file landscape.h.
References m_elems, and m_polymapping.
|
protected |
Definition at line 56 of file hedgebanks.cpp.
References RasterMap::GetMagicP(), hb_AddNewHedgebanks(), hb_border_pixels, hb_ClearPolygon(), hb_core_pixels, hb_DownPolyNumbers(), hb_FindBoundingBox(), hb_FindHedges(), hb_hedges, hb_height, HB_MAGIC, hb_map, hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), hb_RestoreHedgeCore(), hb_size, hb_UpPolyNumbers(), hb_width, l_map_art_hb_core_thres, l_map_art_hb_width, m_elems, m_land, m_polymapping, RasterMap::MapHeight(), RasterMap::MapWidth(), PolytypeToString(), tole_FieldBoundary, and CfgFloat::value().
|
protected |
Definition at line 198 of file hedgebanks.cpp.
References hb_GenerateHBPolys(), HB_MAGIC, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, hb_StripingDist(), and hb_width.
Referenced by hb_Add().
|
protected |
|
protected |
Definition at line 413 of file hedgebanks.cpp.
References HB_MAGIC_COLOR, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
|
protected |
|
protected |
Definition at line 276 of file hedgebanks.cpp.
References hb_hedges, m_elems, and tole_Hedges.
Referenced by hb_Add().
|
protected |
Definition at line 180 of file hedgebanks.cpp.
References hb_first_free_poly_num, hb_new_hbs, l_map_art_hb_nums, m_elems, m_polymapping, NewElement(), tole_HedgeBank, and CfgInt::value().
Referenced by hb_AddNewHedgebanks().
|
inlineprotected |
Definition at line 452 of file hedgebanks.cpp.
References hb_height, hb_map, and hb_width.
Referenced by hb_PaintWhoHasNeighbourColor().
|
inlineprotected |
Definition at line 339 of file hedgebanks.cpp.
References HB_MAGIC, hb_map, hb_MapBorder(), and hb_width.
Referenced by hb_PaintBorder().
|
inlineprotected |
Definition at line 325 of file hedgebanks.cpp.
References hb_height, and hb_width.
Referenced by hb_HasOtherNeighbour().
|
protected |
Definition at line 629 of file hedgebanks.cpp.
References HB_MAGIC, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, hb_width, l_map_art_hb_seg_len, l_map_art_hb_width, and CfgFloat::value().
Referenced by hb_Add().
|
protected |
Definition at line 679 of file hedgebanks.cpp.
References HB_MAGIC_PAINTER_BIT, hb_map, hb_max_x, hb_max_y, hb_MaxUnpaintedNegNeighbour(), hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
inlineprotected |
Definition at line 548 of file hedgebanks.cpp.
References hb_height, HB_MAGIC_PAINTER_BIT, hb_map, and hb_width.
Referenced by hb_MarkTopFromLocalMax().
|
protected |
Definition at line 429 of file hedgebanks.cpp.
References hb_border_pixels, hb_core_pixels, hb_HasOtherNeighbour(), HB_MAGIC_COLOR, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
Definition at line 526 of file hedgebanks.cpp.
References hb_HasNeighbourColor(), HB_MAGIC_COLOR, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
Definition at line 298 of file hedgebanks.cpp.
References HB_MAGIC_PAINTER_BIT, hb_map, hb_max_x, hb_max_y, hb_min_x, hb_min_y, and hb_width.
Referenced by hb_Add().
|
protected |
|
protected |
Definition at line 225 of file hedgebanks.cpp.
References LE::GetPoly(), hb_new_hbs, l_map_art_hb_nums, l_map_art_hb_tran_prob, and CfgInt::value().
Referenced by hb_AddNewHedgebanks().
|
protected |
|
inline |
Returns the number of ponds in the landscape.
Definition at line 336 of file landscape.h.
References m_PondIndexList.
|
inline |
Reopen the osmia nest here
Definition at line 866 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
void Landscape::IncTreatCounter | ( | int | a_treat | ) |
Definition at line 3575 of file Landscape.cpp.
References g_msg, last_treatment, MapErrorMsg::Warn(), and WARN_BUG.
Referenced by LE::SetLastTreatment().
void Landscape::InitOsmiaBeeNesting | ( | ) |
Read in the Osmia nest density files and allocate to each LE object.
Reads in an input file Ela and provides a max nest number to each instance of LE* in the m_elems vector
Definition at line 4697 of file Landscape.cpp.
References cfg_OsmiaNestByLE_Datafile, g_msg, g_rand_uni(), tole_Foobar, CfgStr::value(), and MapErrorMsg::Warn().
|
inline |
Definition at line 727 of file landscape.h.
References tole_Field, tole_Orchard, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PermPastureTussockyWet, tole_Vildtager, tole_WoodyEnergyCrop, and tole_YoungForest.
|
inline |
Provides a measure of the shortest distance in using a vector from a_cx,a_cy unitl tall obstacles are encountered in both +ve & -ve directions.
Will only stop when two consecutive squares return 'high'.
The criteria for threat or non-open are based on geese and include tall objects and roads
Definition at line 461 of file Landscape.cpp.
References tole_HedgeBank, tole_LargeRoad, and tole_SmallRoad.
|
inline |
Definition at line 1516 of file landscape.h.
References m_elems.
|
protected |
Definition at line 3688 of file Landscape.cpp.
References LE_TypeClass::BackTranslateEleTypes(), g_letype, g_msg, LE::SetPollenNectarData(), tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Canal, tole_Carpark, tole_Chameleon, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_DrainageDitch, tole_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_Missing, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnknownGrass, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_Wasteland, tole_WaterBufferZone, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.
Referenced by hb_GenerateHBPolys().
|
protected |
Definition at line 1803 of file Landscape.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
PolysValidate or ChangeMapMapping must be called after this method
Definition at line 1772 of file Landscape.cpp.
References m_polymapping.
|
protected |
Definition at line 2057 of file Landscape.cpp.
References g_msg, m_polymapping, MapErrorMsg::Warn(), and WARN_FILE.
|
protected |
Definition at line 1746 of file Landscape.cpp.
References g_msg, m_polymapping, MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::PolytypeToString | ( | TTypesOfLandscapeElement | a_le_type | ) |
Definition at line 4087 of file Landscape.cpp.
References g_msg, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Foobar, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnknownGrass, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_Wasteland, tole_WaterBufferZone, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.
Referenced by hb_Add().
void Landscape::ReadOpenness | ( | void | ) |
Reads openness values from a standard input file for all polygons.
|
protected |
|
protected |
reads in polygon information. Version 2 including centroid and openness information
The polygon file consists of 9 columns:
As of December 2014 there is a header row of information to be skipped here
As of July 2013 we have the need to use really big maps, hence polygon reference numbers need to be kept within reasonable bounds. It is now a requirement that any polyref number is < twice the total number of polygons in the file.
This is a quick way to replace one type with another for some simulations, polygon type 150 therefore has some special uses
With the polygons renumbered, we can safely set the hb_first_free_poly_num to the number of polygons we have.
Definition at line 1892 of file Landscape.cpp.
References g_letype, g_map_le_border_chance, g_map_le_borders, g_map_le_unsprayedmargins, g_map_le_unsprayedmargins_chance, g_msg, l_map_chameleon_replace_num, m_polymapping, LE::SetArea(), LE::SetBorder(), LE::SetMapIndex(), LE::SetOpenness(), LE::SetPoly(), LE::SetSoilType(), LE::SetUnsprayedMarginPolyRef(), tole_Field, tole_Missing, tole_Orchard, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PlantNursery, tole_Vildtager, tole_WoodyEnergyCrop, tole_YoungForest, LE_TypeClass::TranslateEleTypes(), CfgInt::value(), CfgBool::value(), MapErrorMsg::Warn(), and WARN_FILE.