Goose Management Model ODdox
1.02
|
The landscape class containing all environmental and topographical data. More...
#include <landscape.h>
Public Member Functions | |
int | BackTranslateEleTypes (TTypesOfLandscapeElement EleReference) |
int | BackTranslateVegTypes (TTypesOfVegetation VegReference) |
void | BuildingDesignationCalc () |
used to calculate whether a building is rural or town - for rodenticide use More... | |
void | CalculateCentroids (void) |
void | CalculateOpenness (bool a_realcalc) |
Causes openness to be calulated and stored for all polygons. 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 | 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... | |
void | CentroidSpiralOut (int a_polyref, int &a_x, int &a_y) |
void | CheckForPesticideRecord (LE *a_field, TTypesOfPesticideCategory a_pcide) |
Check if needed and record pesticide application. More... | |
void | CorrectCoords (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... | |
APoint | CorrectCoordsPt (int x, int y) |
Function to prevent wrap around errors with co-ordinates using x/y pair. More... | |
int | CorrectHeight (int y) |
int | CorrectWidth (int x) |
void | DumpAllSymbolsAndExit (const char *a_dumpfile) |
void | DumpCentroids (void) |
void | DumpMapInfoByArea (const char *a_filename, bool a_append, bool a_dump_zero_areas, bool a_write_veg_names) |
void | DumpPublicSymbols (const char *a_dumpfile, CfgSecureLevel a_level) |
void | DumpVegAreaData (int a_day) |
std::string | EventtypeToString (int a_event) |
void | FillVegAreaData () |
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 | 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... | |
GooseFieldList * | GetGooseFields (double) |
Gets the list of suitable goose foraging fields today. More... | |
int | GetGooseNumbers (int a_poly) |
This returns the number of geese 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... | |
double | GetHareFoodQuality (int a_polygon) |
int | GetPolymapping (int a_index) |
int | GetQuarryNumbers (int a_poly) |
This returns the number of geese which are legal quarry on the polygon the day before. More... | |
double | GetVegArea (int v) |
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 | HowManyPonds () |
Returns the number of ponds in the landscape. More... | |
void | IncOsmiaNest (int a_x, int a_y) |
Reopen the osmia nest here More... | |
void | IncTreatCounter (int a_treat) |
void | InitOsmiaBeeNesting () |
Read in the Osmia nest density files and allocate to each LE object. More... | |
bool | IsFieldType (TTypesOfLandscapeElement a_tole) |
Landscape (void) | |
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 | MagicMapP2PolyRef (int a_magic) |
std::string | PolytypeToString (TTypesOfLandscapeElement a_le_type) |
void | ReadOpenness (void) |
Reads openness values from a standard input file for all polygons. More... | |
bool | ReadSymbols (const char *a_cfgfile) |
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 | 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 | RecordGooseRoostDist (int a_polyref, int a_dist, GooseSpecies a_goose) |
Records the distance to the closest roost of goose species. 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 | 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 | ReleaseOsmiaNest (int a_x, int a_y) |
Reopen the osmia nest here More... | |
void | ResetGrainAndMaize () |
Resets all grain. More... | |
void | RodenticidePredatorsEvaluation (RodenticidePredators_Population_Manager *a_rppm) |
void | SetBirdMaizeForage (int a_polyref, double a_fooddensity) |
Sets the maize forage resource as seen from a goose standpoint at a polygon. More... | |
void | SetBirdSeedForage (int a_polyref, double a_fooddensity) |
Sets the grain forage resource as seen from a goose standpoint at a polygon. More... | |
void | SetLESignal (int a_polyref, LE_Signal a_signal) |
void | SetMaleNewtPresent (int a_InPondIndex) |
Sets a male as being present in a pond. More... | |
void | SetPolymapping (int a_index, int a_val) |
void | SetPolyMaxMinExtents (void) |
void | SetThePopManager (Population_Manager *a_ptr) |
Set the pointer to the current main population manager. More... | |
void | SimulationClosingActions () |
void | SkylarkEvaluation (SkTerritories *a_skt) |
bool | SubtractPondLarvalFood (double a_food, int a_polyrefindex) |
Removes larval food from a pond and returns true if it was possible, otherwise false. More... | |
double | SupplyBirdMaizeForage (int a_polyref) |
Returns the maize forage resource. 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... | |
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... | |
APoint | SupplyCentroid (int a_polyref) |
APoint | SupplyCentroidIndex (int a_polyrefindex) |
int | SupplyCentroidX (int a_polyref) |
int | SupplyCentroidX (int a_x, int a_y) |
int | SupplyCentroidY (int a_polyref) |
int | SupplyCentroidY (int a_x, int a_y) |
int | SupplyCountryDesig (int a_x, int a_y) |
double | SupplyDayDegrees (int a_polyref) |
int | SupplyDayInMonth (void) |
int | SupplyDayInYear (void) |
int | SupplyDaylength (long a_date) |
int | SupplyDaylength (void) |
double | SupplyDaylightProp () |
double | SupplyDeadBiomass (int a_polyref) |
double | SupplyDeadBiomass (int a_x, int a_y) |
int | SupplyElementSubType (int a_polyref) |
int | SupplyElementSubType (int a_x, int a_y) |
TTypesOfLandscapeElement | SupplyElementType (int a_polyref) |
TTypesOfLandscapeElement | SupplyElementType (int a_x, int a_y) |
TTypesOfLandscapeElement | SupplyElementTypeCC (int a_x, int a_y) |
TTypesOfLandscapeElement | SupplyElementTypeFromVector (unsigned int a_index) |
int | SupplyFarmAnimalCensus (int a_farm_ref, int a_LifeStage) |
int | SupplyFarmArea (int a_polyref) |
int | SupplyFarmIntensity (int a_polyref) |
int | SupplyFarmIntensity (int a_x, int a_y) |
int | SupplyFarmIntensityI (int a_polyindex) |
FarmManager * | SupplyFarmManagerPtr () |
int | SupplyFarmOwner (int a_polyref) |
int | SupplyFarmOwner (int a_x, int a_y) |
int | SupplyFarmOwnerIndex (int a_polyref) |
int | SupplyFarmOwnerIndex (int a_x, int a_y) |
Farm * | SupplyFarmPtr (int a_owner) |
TTypesOfFarm | SupplyFarmType (int a_polyref) |
TTypesOfFarm | SupplyFarmType (int a_x, int a_y) |
long | SupplyGlobalDate (void) |
double | SupplyGlobalRadiation () |
double | SupplyGlobalRadiation (long a_date) |
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... | |
int | SupplyGrazingPressure (int a_polyref) |
int | SupplyGrazingPressure (int a_x, int a_y) |
int | SupplyGrazingPressureVector (unsigned int a_index) |
double | SupplyGreenBiomass (int a_polyref) |
double | SupplyGreenBiomass (int a_x, int a_y) |
bool | SupplyHasTramlines (int a_polyref) |
bool | SupplyHasTramlines (int a_x, int a_y) |
int | SupplyHour (void) |
Get the hour of the day. More... | |
double | SupplyHumidity (void) |
double | SupplyInsects (int a_polyref) |
double | SupplyInsects (int a_x, int a_y) |
bool | SupplyInStubble (int a_polyref) |
Returns whether its cereal. More... | |
bool | SupplyIsCereal (int a_polyref) |
bool | SupplyIsCereal2 (TTypesOfVegetation a_vege_type) |
bool | SupplyIsGrass (int a_polyref) |
bool | SupplyIsGrass2 (TTypesOfVegetation a_vege_type) |
bool | SupplyIsMatureCereal (int a_polyref) |
bool | SupplyJustMown (int a_polyref) |
bool | SupplyJustMownVector (unsigned int a_index) |
int | SupplyJustSprayed (int a_polyref) |
int | SupplyJustSprayed (int a_x, int a_y) |
int | SupplyJustSprayedVector (unsigned int a_index) |
double | SupplyLAGreen (int a_polyref) |
double | SupplyLAGreen (int a_x, int a_y) |
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 | SupplyLargestPolyNumUsed () |
TTypesOfVegetation | SupplyLastSownVeg (int a_polyref) |
TTypesOfVegetation | SupplyLastSownVeg (int a_x, int a_y) |
TTypesOfVegetation | SupplyLastSownVegVector (unsigned int a_index) |
int | SupplyLastTreatment (int a_polyref, int *a_index) |
int | SupplyLastTreatment (int a_x, int a_y, int *a_index) |
double | SupplyLATotal (int a_x, int a_y) |
int | SupplyLECount (void) |
bool | SupplyLEHigh (int a_x, int a_y) |
Tests whether the polygon at a_x,a_y is designated as high. More... | |
int | SupplyLENext (void) |
LE * | SupplyLEPointer (int a_polyref) |
void | SupplyLEReset (void) |
LE_Signal | SupplyLESignal (int a_polyref) |
int * | SupplyMagicMapP (int a_x, int a_y) |
bool | SupplyMaleNewtPresent (int a_InPondIndex) |
Determines if a male is present in a pond. More... | |
double | SupplyMeanTemp (long a_date, unsigned int a_period) |
int | SupplyMinute (void) |
Get the minute of the hour. More... | |
int | SupplyMonth (void) |
PollenNectarQuality | SupplyNectar (int a_polyref) |
PollenNectarQuality | SupplyNectar (int a_x, int a_y) |
double | SupplyNightProp () |
int | SupplyNumberOfFarms () |
unsigned int | SupplyNumberOfPolygons (void) |
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... | |
TTypesOfOptFarms | SupplyOptFarmType (int a_x, int a_y) |
bool | SupplyOsmiaNest (int a_x, int a_y) |
Find out whether an osmia nest can be made here. More... | |
bool | SupplyOverspray (int a_x, int a_y) |
Gets the overspray flag. More... | |
double | SupplyPesticide (int a_polyref, PlantProtectionProducts a_ppp) |
Gets total pesticide for the centroid of a polygon. More... | |
double | SupplyPesticide (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets total pesticide for a location. More... | |
int | SupplyPesticideCell (int a_polyref) |
bool | SupplyPesticideDecay (PlantProtectionProducts a_ppp) |
Returns true if there is any pesticide in the system at all at this point. More... | |
double | SupplyPesticideP (int a_polyref, PlantProtectionProducts a_ppp) |
Gets plant pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideP (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets plant pesticide for a location. More... | |
double | SupplyPesticideS (int a_polyref, PlantProtectionProducts a_ppp) |
Gets soil pesticide for the centroid of a polygon. More... | |
double | SupplyPesticideS (int a_x, int a_y, PlantProtectionProducts a_ppp) |
Gets soil pesticide for a location. More... | |
TTypesOfPesticide | SupplyPesticideType (void) |
PollenNectarQuality | SupplyPollen (int a_polyref) |
PollenNectarQuality | SupplyPollen (int a_x, int a_y) |
double | SupplyPolygonArea (int a_polyref) |
double | SupplyPolygonAreaVector (int a_polyref) |
Returns the area of a polygon using the vector index as a reference. More... | |
int | SupplyPolyRef (int a_x, int a_y) |
int | SupplyPolyRefCC (int a_x, int a_y) |
int | SupplyPolyRefIndex (int a_x, int a_y) |
int | SupplyPolyRefVector (unsigned int a_index) |
int | SupplyPondIndex (int a_pondref) |
Returns the index of a pond based on pondref or -1 if not found. More... | |
double | SupplyPondPesticide (int a_poly_index) |
Get the pesticide concentration per liter from a pond (must be a pond index on calling) More... | |
double | SupplyRain (long a_date) |
double | SupplyRain (void) |
double | SupplyRainPeriod (long a_date, int a_period) |
int | SupplyRandomPondIndex () |
Returns random pond index. More... | |
int | SupplyRandomPondRef () |
Returns random pond polyref. More... | |
int | SupplyRoadWidth (int, int) |
double | SupplyRodenticide (int a_x, int a_y) |
Gets total rodenticide for a location. More... | |
RodenticidePredators_Population_Manager * | SupplyRodenticidePredatoryManager () |
bool | SupplyShouldSpray () |
int | SupplySimAreaHeight (void) |
int | SupplySimAreaMaxExtent (void) |
int | SupplySimAreaMinExtent (void) |
int | SupplySimAreaWidth (void) |
bool | SupplySkScrapes (int a_polyref) |
bool | SupplySnowcover (long a_date) |
bool | SupplySnowcover (void) |
double | SupplySnowDepth (void) |
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... | |
double | SupplyTemp (long a_date) |
double | SupplyTemp (void) |
double | SupplyTempPeriod (long a_date, int a_period) |
Population_Manager * | SupplyThePopManager () |
Get the pointer to the current main population manager. More... | |
double | SupplyTotalNectar (int a_polyref) |
double | SupplyTotalNectar (int a_x, int a_y) |
double | SupplyTotalPollen (int a_polyref) |
double | SupplyTotalPollen (int a_x, int a_y) |
double | SupplyTrafficLoad (int a_polyref) |
double | SupplyTrafficLoad (int a_x, int a_y) |
int | SupplyTreeAge (int a_Polyref) |
int | SupplyTreeAge (int, int) |
int | SupplyTreeHeight (int) |
int | SupplyTreeHeight (int, int) |
int | SupplyUnderGrowthWidth (int) |
int | SupplyUnderGrowthWidth (int, int) |
int | SupplyValidX (int a_polyref) |
int | SupplyValidY (int a_polyref) |
int | SupplyVegAge (int a_Polyref) |
int | SupplyVegAge (int a_x, int a_y) |
double | SupplyVegBiomass (int a_polyref) |
double | SupplyVegBiomass (int a_x, int a_y) |
double | SupplyVegBiomassVector (unsigned int a_index) |
double | SupplyVegCover (int a_polyref) |
double | SupplyVegCover (int a_x, int a_y) |
double | SupplyVegCoverVector (unsigned int a_index) |
int | SupplyVegDensity (int a_polyref) |
int | SupplyVegDensity (int a_x, int a_y) |
double | SupplyVegDigestability (int a_polyref) |
double | SupplyVegDigestability (int a_x, int a_y) |
double | SupplyVegDigestabilityVector (unsigned int a_index) |
double | SupplyVegHeight (int a_polyref) |
double | SupplyVegHeight (int a_x, int a_y) |
double | SupplyVegHeightVector (unsigned int a_index) |
bool | SupplyVegPatchy (int a_polyref) |
bool | SupplyVegPatchy (int a_x, int a_y) |
int | SupplyVegPhase (int a_poly) |
TTypesOfVegetation | SupplyVegType (int a_x, int a_y) |
TTypesOfVegetation | SupplyVegType (int polyref) |
TTypesOfVegetation | SupplyVegTypeVector (unsigned int a_index) |
const char * | SupplyVersion (void) |
double | SupplyWeedBiomass (int a_polyref) |
double | SupplyWeedBiomass (int a_x, int a_y) |
double | SupplyWind (long a_date) |
double | SupplyWind (void) |
int | SupplyWindDirection (void) |
double | SupplyWindPeriod (long a_date, int a_period) |
int | SupplyYear (void) |
int | SupplyYearNumber (void) |
void | Tick (void) |
TTypesOfLandscapeElement | TranslateEleTypes (int EleReference) |
TTypesOfVegetation | TranslateVegTypes (int VegReference) |
void | TurnTheWorld (void) |
void | UpdateOsmiaNesting () |
Tesll all LE objects to update their osmia nest status. More... | |
std::string | VegtypeToString (TTypesOfVegetation a_veg) |
void | Warn (std::string a_msg1, std::string a_msg2) |
void | WriteOpenness (void) |
Stores openness for all polygons to a standard file. More... | |
~Landscape (void) | |
Protected Member Functions | |
void | AddBeetleBanks (TTypesOfLandscapeElement a_tole) |
void | AddGreenElement (LE *a_green) |
void | AxisLoop (int a_poly, APoint *a_cor, int a_axis) |
void | AxisLoop (int a_poly, int *a_x, int *a_y, int a_axis) |
void | AxisLoopLtd (int a_poly, APoint *a_cor, int a_axis, int a_limit) |
void | BeetleBankAdd (int x, int y, int angle, int length, LE *a_field, TTypesOfLandscapeElement a_tole) |
bool | BeetleBankPossible (LE *a_field, TTypesOfLandscapeElement a_tole) |
void | BorderAdd (LE *a_field, TTypesOfLandscapeElement a_type) |
bool | BorderNeed (TTypesOfLandscapeElement a_letype) |
void | BorderRemoval (void) |
void | BorderScan (LE *a_field, int a_width) |
bool | BorderStep (int a_fieldpoly, int a_borderpoly, APoint *a_coord) |
bool | BorderStep (int a_fieldpoly, int a_borderpoly, int *a_x, int *a_y) |
bool | BorderTest (int a_fieldpoly, int a_borderpoly, int a_x, int a_y) |
void | ChangeMapMapping (void) |
bool | CIPELandscapeMaker () |
void | ConsolidatePolys (void) |
void | CountMapSquares (void) |
void | CreatePondList () |
Creates a list of pond polygon refs/indexes for easy look up. More... | |
void | DegreesDump () |
Prints the sum of day degrees. See FarmManager::daydegrees. More... | |
void | DumpMap (const char *a_filename) |
void | DumpMapGraphics (const char *a_filename) |
void | DumpTreatCounters (const char *a_filename) |
void | EventDump (int x, int y, int x2, int y2) |
void | EventDumpPesticides (int x1, int y1) |
bool | FindFieldCenter (LE *a_field, int *x, int *y) |
int | FindLongestAxis (int *x, int *y, int *a_length) |
bool | FindValidXY (int a_field, int &a_x, int &a_y) |
void | ForceArea (void) |
void | GISASCII_Output (string outpfile, int UTMX, int UTMY) |
Write ASCII file of the ALMaSS map. More... | |
void | hb_Add (void) |
void | hb_AddNewHedgebanks (int a_orig_poly_num) |
void | hb_Cleanup (void) |
void | hb_ClearPolygon (int a_poly_num) |
void | hb_DownPolyNumbers (void) |
bool | hb_FindBoundingBox (int a_poly_num) |
void | hb_FindHedges (void) |
void | hb_GenerateHBPolys (void) |
bool | hb_HasNeighbourColor (int a_x, int a_y, int a_neighbour_color) |
bool | hb_HasOtherNeighbour (int a_x, int a_y) |
bool | hb_MapBorder (int a_x, int a_y) |
void | hb_MarkTheBresenhamWay (void) |
void | hb_MarkTopFromLocalMax (int a_color) |
int | hb_MaxUnpaintedNegNeighbour (int a_x, int a_y) |
void | hb_PaintBorder (int a_color) |
bool | hb_PaintWhoHasNeighbourColor (int a_neighbour_color, int a_new_color) |
void | hb_ResetColorBits (void) |
void | hb_RestoreHedgeCore (int a_orig_poly_number) |
int | hb_StripingDist (void) |
void | hb_UpPolyNumbers (void) |
LE * | NewElement (TTypesOfLandscapeElement a_type) |
void | PolysDump (const char *a_filename) |
bool | PolysRemoveInvalid (void) |
void | PolysRenumber (void) |
void | PolysValidate (bool a_exit_on_invalid) |
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 | RebuildPolyMapping () |
void | RemoveMissingValues () |
A method for replacing missing values in the map with corrected ones - slow. More... | |
int | RemoveSmallPolygons (void) |
Removes small polygons from the map. More... | |
bool | StepOneValid (int a_polyindex, int a_x, int a_y, int step) |
void | TestCropManagement (void) |
bool | UMarginTest (int a_fieldpoly, int a_borderpoly, int a_x, int a_y, int a_width) |
void | UnsprayedMarginAdd (LE *a_field) |
void | UnsprayedMarginScan (LE *a_field, int a_width) |
void | VegDump (int x, int y) |
Protected Attributes | |
int | hb_border_pixels |
int | hb_core_pixels |
int | hb_first_free_poly_num |
vector< int > | hb_hedges |
int | hb_height |
int * | hb_map |
int | hb_max_x |
int | hb_max_y |
int | hb_min_x |
int | hb_min_y |
vector< LE * > | hb_new_hbs |
int | hb_size |
int | hb_width |
int | le_signal_index |
int | m_LargestPolyNumUsed |
TTypesOfPesticide | m_PesticideType |
An attribute to hold the pesticide type being tested, if there is one, if not default is -1. More... | |
vector< int > | m_PondIndexList |
List of pond indexes. More... | |
vector< int > | m_PondRefsList |
List of pond polyrefs. More... | |
bool | m_toxShouldSpray |
int | m_treatment_counts [last_treatment] |
int | m_x_add [8] |
int | m_y_add [8] |
Private Attributes | |
double * | l_vegtype_areas |
bool | m_DoMissingPolygonsManipulations |
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... | |
FarmManager * | m_FarmManager |
List of all the farms. More... | |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_BG |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_GL |
Polynomial2CurveClass * | m_GooseIntakeRateVSVegetationHeight_PF |
Curve relatning goose intake rates in KJ/min to vegetation height. More... | |
int | m_height |
int | m_height10 |
RasterMap * | m_land |
The big map. More... | |
int | m_maxextent |
int | m_minmaxextent |
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... | |
PesticideMap * | m_PesticideMap |
For specialised pesticide recording. More... | |
vector< int > | m_polymapping |
RodenticideManager * | m_RodenticideManager |
RodenticidePredators_Population_Manager * | m_RodenticidePreds |
Population_Manager * | m_ThePopManager |
a pointer to the current main population manager More... | |
char | m_versioninfo [30] |
int | m_width |
int | m_width10 |
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.
|
inline |
Definition at line 788 of file landscape.h.
References g_cfg, and Configurator::ReadSymbols().
|
inlineprotected |
void Landscape::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()
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()
Note that the record is the for the day before because this method is called by DoFirst, so there are no geese today
Definition at line 3328 of file Landscape.cpp.
References m_polymapping.
void Landscape::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()
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()
Definition at line 3341 of file Landscape.cpp.
References m_polymapping.
void Landscape::RecordGooseRoostDist | ( | int | a_polyref, |
int | a_dist, | ||
GooseSpecies | a_goose | ||
) |
Records the distance to the closest roost of goose species.
This records the distance to the closest roost for a goose species.
Definition at line 3373 of file Landscape.cpp.
References m_polymapping.
void Landscape::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()
This records the number of geese on the polygon the day before by species. 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()
Note that the record is the for the day before because this method is called by DoFirst, so there are no geese today
Definition at line 3352 of file Landscape.cpp.
References m_polymapping.
void Landscape::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()
This records the number of geese on the polygon the day before at a predefined time by species. 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()
Definition at line 3363 of file Landscape.cpp.
References m_polymapping.
|
inline |
Reopen the osmia nest here
Definition at line 871 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
protected |
A method for replacing missing values in the map with corrected ones - slow.
Definition at line 2090 of file Landscape.cpp.
References m_polymapping, and tole_Missing.
|
protected |
Removes small polygons from the map.
The method removes small polygons from the map and joins them with polygons that are close too them - there different rules depending on the type of polygon we have. Some small polygons can be legal, others need something done. Field polygons with management also have some minimum restrictions which are different from normal polygons.
This method is not written for efficiency, so simple brute force approaches are taken - it will take time to execute.
Rules:
Definition at line 2184 of file Landscape.cpp.
References LE_TypeClass::BackTranslateEleTypes(), LE::DoCopy(), g_letype, g_msg, LE::SetOwner(), tole_Fence, tole_Field, tole_FieldBoundary, tole_HedgeBank, tole_Hedges, tole_IndividualTree, tole_MetalledPath, tole_NaturalGrassDry, tole_River, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnsprayedFieldMargin, tole_WaterBufferZone, MapErrorMsg::Warn(), and WARN_FILE.
void Landscape::ResetGrainAndMaize | ( | ) |
Resets all grain.
To avoid grain from previous years sticking onto fields and confusing the goose foraging model, we make a hard reset of everything.
Definition at line 730 of file Landscape.cpp.
void Landscape::RodenticidePredatorsEvaluation | ( | RodenticidePredators_Population_Manager * | a_rppm | ) |
Definition at line 3032 of file Landscape.cpp.
|
inline |
Sets the maize forage resource as seen from a goose standpoint at a polygon.
Definition at line 535 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Sets the grain forage resource as seen from a goose standpoint at a polygon.
Definition at line 528 of file landscape.h.
References m_elems, and m_polymapping.
void Landscape::SetLESignal | ( | int | a_polyref, |
LE_Signal | a_signal | ||
) |
Definition at line 3570 of file Landscape.cpp.
References m_polymapping.
|
inline |
Sets a male as being present in a pond.
Definition at line 349 of file landscape.h.
References m_elems.
|
inline |
void Landscape::SetPolyMaxMinExtents | ( | void | ) |
Definition at line 1622 of file Landscape.cpp.
References m_polymapping.
|
inline |
Set the pointer to the current main population manager.
Definition at line 177 of file landscape.h.
References m_ThePopManager.
void Landscape::SimulationClosingActions | ( | ) |
These are the things that are needed to be done after the simulation ends, but before landscape objects are deleted.
Definition at line 1455 of file Landscape.cpp.
References cfg_OptimisingFarms, and CfgBool::value().
void Landscape::SkylarkEvaluation | ( | SkTerritories * | a_skt | ) |
Definition at line 3025 of file Landscape.cpp.
|
protected |
Definition at line 2429 of file Landscape.cpp.
bool Landscape::SubtractPondLarvalFood | ( | double | a_food, |
int | a_polyrefindex | ||
) |
Removes larval food from a pond and returns true if it was possible, otherwise false.
Definition at line 664 of file Landscape.cpp.
|
inline |
Returns the maize forage resource.
Definition at line 628 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Returns the maize forage resource as seen from a goose standpoint at an x,y location.
Definition at line 640 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Returns the grain forage resource.
Definition at line 614 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Returns the grain forage resource as seen from a goose standpoint at an x,y location.
Definition at line 621 of file landscape.h.
References RasterMap::Get(), m_elems, m_land, and m_polymapping.
APoint Landscape::SupplyCentroid | ( | int | a_polyref | ) |
Definition at line 766 of file Landscape.cpp.
References m_polymapping.
APoint Landscape::SupplyCentroidIndex | ( | int | a_polyrefindex | ) |
Definition at line 771 of file Landscape.cpp.
|
inline |
Definition at line 470 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 474 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
|
inline |
Definition at line 475 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1132 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1326 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1606 of file landscape.h.
References g_date, and Calendar::GetDayInMonth().
|
inline |
Definition at line 1596 of file landscape.h.
References Calendar::DayInYear(), and g_date.
Referenced by Goose_Population_Manager::BirdsShot(), and FarmManager::FarmManagement().
|
inline |
Definition at line 1523 of file landscape.h.
References Calendar::DayLength(), and g_date.
|
inline |
Definition at line 1530 of file landscape.h.
References Calendar::DayLength(), and g_date.
|
inline |
Definition at line 825 of file landscape.h.
References g_date, and Calendar::GetDaylightProportion().
|
inline |
Definition at line 1029 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1034 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1121 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1126 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1110 of file landscape.h.
References m_elems, and m_polymapping.
Referenced by Pesticide::ElementIsWater().
|
inline |
Definition at line 1115 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1139 of file landscape.h.
References RasterMap::Get(), m_elems, m_height, m_height10, m_land, m_width, and m_width10.
|
inline |
Definition at line 1104 of file landscape.h.
References m_elems.
int Landscape::SupplyFarmAnimalCensus | ( | int | a_farm_ref, |
int | a_LifeStage | ||
) |
Definition at line 745 of file Landscape.cpp.
Referenced by FarmManager::FarmManagement().
|
inline |
Definition at line 1206 of file landscape.h.
References m_elems, and m_polymapping.
int Landscape::SupplyFarmIntensity | ( | int | a_polyref | ) |
Definition at line 761 of file Landscape.cpp.
References m_polymapping.
int Landscape::SupplyFarmIntensity | ( | int | a_x, |
int | a_y | ||
) |
Definition at line 756 of file Landscape.cpp.
Referenced by VegElement::DoDevelopment(), and VegElement::RecalculateBugsNStuff().
int Landscape::SupplyFarmIntensityI | ( | int | a_polyindex | ) |
Definition at line 751 of file Landscape.cpp.
|
inline |
|
inline |
Definition at line 1158 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1152 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1172 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1165 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 352 of file landscape.h.
References FarmManager::GetFarmPtr(), and m_FarmManager.
|
inline |
Definition at line 1179 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1186 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1621 of file landscape.h.
References Calendar::Date(), and g_date.
|
inline |
Definition at line 1341 of file landscape.h.
References g_weather, and Weather::GetGlobalRadiation().
Referenced by VegElement::RecalculateBugsNStuff().
|
inline |
Definition at line 1346 of file landscape.h.
References g_weather, and Weather::GetGlobalRadiation().
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon based on the height only.
a_height | [in] The vegetation height (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 541 of file landscape.h.
References m_GooseIntakeRateVSVegetationHeight_BG, m_GooseIntakeRateVSVegetationHeight_GL, m_GooseIntakeRateVSVegetationHeight_PF, and Warn().
Referenced by VegElement::CalcGooseForageResources().
|
inline |
Returns the leaf forage resource as seen from a goose standpoint at a polygon referenced by number based on height only.
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 567 of file landscape.h.
References m_elems, m_GooseIntakeRateVSVegetationHeight_BG, m_GooseIntakeRateVSVegetationHeight_GL, m_GooseIntakeRateVSVegetationHeight_PF, m_polymapping, and Warn().
|
inline |
Definition at line 1227 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1239 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1232 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1017 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1022 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1246 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1252 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Get the hour of the day.
Definition at line 1586 of file landscape.h.
References g_date, and Calendar::GetHour().
|
inline |
Definition at line 1393 of file landscape.h.
References g_weather, and Weather::GetHumidity().
|
inline |
Definition at line 1088 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1093 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Returns whether its cereal.
Definition at line 634 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1300 of file landscape.h.
References m_elems, and m_polymapping.
bool Landscape::SupplyIsCereal2 | ( | TTypesOfVegetation | a_vege_type | ) |
Definition at line 532 of file Landscape.cpp.
References tov_AgroChemIndustryCereal, tov_NLSpringBarley, tov_NLWinterWheat, tov_Oats, tov_OOats, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_PLSpringBarley, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringWheat, tov_Triticale, tov_WinterBarley, tov_WinterRye, tov_WinterWheat, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, and tov_WWheatPTreatment.
|
inline |
Definition at line 1310 of file landscape.h.
References m_elems, and m_polymapping.
bool Landscape::SupplyIsGrass2 | ( | TTypesOfVegetation | a_vege_type | ) |
Definition at line 503 of file Landscape.cpp.
References tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_FodderGrass, tov_Heath, tov_NaturalGrass, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OrchardCrop, tov_OSeedGrass1, tov_OSeedGrass2, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_WaterBufferZone, and tov_YoungForest.
|
inline |
Definition at line 1305 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1263 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1258 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1275 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1280 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1270 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1041 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1010 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
polylist * Landscape::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.
There is a limit of 1000 polygons to return. There are probably more speed efficient ways to do this, but the simplest is to simply trawl through the list of polygons and pull out each polygon with an openness score > a_openness - then see if the centroid is within range. NB calling method must delete the polylist* passed back!
18/12/2013 this method has been rendered obselete by changes to hunters referring to famers rather than a co-ordinate and range.
Calculates distance from location a_x, a_y. This is done using an approximation to pythagorus to avoid a speed problem.
NB this will crash if either a_dy or a_dx are zero!
Definition at line 782 of file Landscape.cpp.
|
inline |
|
inline |
Definition at line 1068 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1073 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1063 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1331 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1336 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1004 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
int Landscape::SupplyLECount | ( | void | ) |
Definition at line 3562 of file Landscape.cpp.
|
inline |
Tests whether the polygon at a_x,a_y is designated as high.
Definition at line 455 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
int Landscape::SupplyLENext | ( | void | ) |
Definition at line 3555 of file Landscape.cpp.
|
inline |
Definition at line 1099 of file landscape.h.
References m_elems, and m_polymapping.
Referenced by Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), Farm::BedForming(), Farm::Biocide(), Farm::BulbHarvest(), Farm::BurnStrawStubble(), Farm::CattleIsOut(), Farm::CattleIsOutLow(), Farm::CattleOut(), Farm::CattleOutLowGrazing(), Farm::CutOrch(), Farm::CutToHay(), Farm::CutToSilage(), Farm::CutWeeds(), Farm::DeepPlough(), Field::DoDevelopment(), Farm::FA_AmmoniumSulphate(), Farm::FA_Calcium(), Farm::FA_GreenManure(), Farm::FA_ManganeseSulphate(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_NPKS(), Farm::FA_PK(), Farm::FA_RSM(), Farm::FA_Sludge(), Farm::FA_Slurry(), Farm::FlowerCutting(), Farm::FP_AmmoniumSulphate(), Farm::FP_Calcium(), Farm::FP_GreenManure(), Farm::FP_LiquidNH3(), Farm::FP_ManganeseSulphate(), Farm::FP_Manure(), Farm::FP_NPK(), Farm::FP_NPKS(), Farm::FP_PK(), Farm::FP_RSM(), Farm::FP_Sludge(), Farm::FP_Slurry(), Farm::Harvest(), OptimisingFarm::Harvest(), Farm::HarvestLong(), Farm::HayBailing(), Farm::HayTurning(), Farm::HeavyCultivatorAggregate(), Farm::HillingUp(), Farm::PigsAreOut(), Farm::PigsAreOutForced(), Farm::PigsOut(), Farm::PreseedingCultivator(), Farm::PreseedingCultivatorSow(), Farm::RowCultivation(), VegElement::SetVegType(), Farm::ShallowHarrow(), Farm::SleepAllDay(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::SpringSowWithFerti(), Farm::StrawChopping(), Farm::StrawCovering(), Farm::StrawRemoval(), Farm::Strigling(), Farm::StriglingHill(), Farm::StriglingSow(), Farm::StubbleCultivatorHeavy(), Farm::StubbleHarrowing(), Farm::StubblePlough(), Farm::Swathing(), UnsprayedMarginScan(), Farm::Water(), and Farm::WinterPlough().
void Landscape::SupplyLEReset | ( | void | ) |
Definition at line 3551 of file Landscape.cpp.
LE_Signal Landscape::SupplyLESignal | ( | int | a_polyref | ) |
Definition at line 3566 of file Landscape.cpp.
References m_polymapping.
|
inline |
Definition at line 1509 of file landscape.h.
References RasterMap::GetMagicP(), and m_land.
|
inline |
Determines if a male is present in a pond.
Definition at line 351 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1372 of file landscape.h.
References g_weather, and Weather::GetMeanTemp().
|
inline |
Get the minute of the hour.
Definition at line 1592 of file landscape.h.
References g_date, and Calendar::GetMinute().
|
inline |
Definition at line 1601 of file landscape.h.
References g_date, and Calendar::GetMonth().
|
inline |
|
inline |
Definition at line 382 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 826 of file landscape.h.
References g_date, and Calendar::GetDaylightProportion().
|
inline |
Definition at line 1148 of file landscape.h.
References FarmManager::GetNoFarms(), and m_FarmManager.
|
inline |
Definition at line 1461 of file landscape.h.
References m_elems.
|
inline |
Get openness for a polygon.
Definition at line 451 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Get openness for a location.
Definition at line 453 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
|
inline |
Find out whether an osmia nest can be made here.
Definition at line 861 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
bool Landscape::SupplyOverspray | ( | int | a_x, |
int | a_y | ||
) |
Gets the overspray flag.
Definition at line 599 of file Landscape.cpp.
double Landscape::SupplyPesticide | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets total pesticide for the centroid of a polygon.
Definition at line 627 of file Landscape.cpp.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticide | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets total pesticide for a location.
Definition at line 586 of file Landscape.cpp.
References g_pest, and Pesticide::SupplyPesticide().
Referenced by Pond::CalcPondPesticide().
|
inline |
Definition at line 1468 of file landscape.h.
References m_elems, and m_polymapping.
Referenced by Pesticide::SupplyPesticide().
bool Landscape::SupplyPesticideDecay | ( | PlantProtectionProducts | a_ppp | ) |
Returns true if there is any pesticide in the system at all at this point.
Definition at line 776 of file Landscape.cpp.
References g_pest, and Pesticide::GetAnythingToDecay().
double Landscape::SupplyPesticideP | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets plant pesticide for the centroid of a polygon.
Definition at line 652 of file Landscape.cpp.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideP | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets plant pesticide for a location.
Definition at line 605 of file Landscape.cpp.
References g_pest, and Pesticide::SupplyPesticide().
double Landscape::SupplyPesticideS | ( | int | a_polyref, |
PlantProtectionProducts | a_ppp | ||
) |
Gets soil pesticide for the centroid of a polygon.
Definition at line 640 of file Landscape.cpp.
References g_pest, l_pest_enable_pesticide_engine, Pesticide::SupplyPesticide(), and CfgBool::value().
double Landscape::SupplyPesticideS | ( | int | a_x, |
int | a_y, | ||
PlantProtectionProducts | a_ppp | ||
) |
Gets soil pesticide for a location.
Definition at line 616 of file Landscape.cpp.
References g_pest, and Pesticide::SupplyPesticide().
|
inline |
|
inline |
|
inline |
Definition at line 378 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
|
inline |
Returns the area of a polygon using the vector index as a reference.
Definition at line 1200 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1488 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
Referenced by Pond::CalcPondPesticide().
|
inline |
Definition at line 1500 of file landscape.h.
References RasterMap::Get(), m_elems, m_height, m_height10, m_land, m_width, and m_width10.
|
inline |
Definition at line 1493 of file landscape.h.
References RasterMap::Get(), and m_land.
|
inline |
Definition at line 1451 of file landscape.h.
References m_elems.
|
inline |
Returns the index of a pond based on pondref or -1 if not found.
Definition at line 342 of file landscape.h.
References m_PondIndexList, and m_PondRefsList.
|
inline |
Get the pesticide concentration per liter from a pond (must be a pond index on calling)
Definition at line 761 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1358 of file landscape.h.
References g_weather, and Weather::GetRain().
|
inline |
Definition at line 1365 of file landscape.h.
References g_weather, and Weather::GetRain().
Referenced by Pesticide::Tick().
|
inline |
Definition at line 1351 of file landscape.h.
References g_weather, and Weather::GetRainPeriod().
int Landscape::SupplyRandomPondIndex | ( | ) |
int Landscape::SupplyRandomPondRef | ( | ) |
Returns random pond polyref.
Definition at line 2610 of file Landscape.cpp.
References g_rand_uni().
|
inline |
Definition at line 811 of file landscape.h.
double Landscape::SupplyRodenticide | ( | int | a_x, |
int | a_y | ||
) |
Gets total rodenticide for a location.
Definition at line 492 of file Landscape.cpp.
References cfg_rodenticide_enable, and CfgBool::value().
|
inline |
|
inline |
Definition at line 357 of file landscape.h.
References m_toxShouldSpray.
Referenced by Orchard::DoDevelopment(), and OrchardBand::DoDevelopment().
|
inline |
Definition at line 1637 of file landscape.h.
References m_height.
|
inline |
Definition at line 1642 of file landscape.h.
References m_maxextent.
int Landscape::SupplySimAreaMinExtent | ( | void | ) |
|
inline |
|
inline |
Definition at line 981 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1430 of file landscape.h.
References g_weather, and Weather::GetSnow().
|
inline |
Definition at line 1437 of file landscape.h.
References g_weather, and Weather::GetSnow().
|
inline |
Definition at line 1444 of file landscape.h.
References g_weather, and Weather::GetSnowDepth().
|
inline |
Returns the soil type in ALMaSS types reference numbers.
Definition at line 460 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Returns the soil type in rabbit warren reference numbers.
Definition at line 464 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1379 of file landscape.h.
References g_weather, and Weather::GetTemp().
|
inline |
Definition at line 1386 of file landscape.h.
References g_weather, and Weather::GetTemp().
Referenced by VegElement::RecalculateBugsNStuff().
|
inline |
Definition at line 1410 of file landscape.h.
References g_weather, and Weather::GetTempPeriod().
|
inline |
Get the pointer to the current main population manager.
Definition at line 175 of file landscape.h.
References m_ThePopManager.
|
inline |
|
inline |
Definition at line 384 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
|
inline |
Definition at line 380 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1287 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1293 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1315 of file landscape.h.
|
inline |
Definition at line 509 of file landscape.h.
|
inline |
Definition at line 816 of file landscape.h.
|
inline |
Definition at line 814 of file landscape.h.
|
inline |
Definition at line 817 of file landscape.h.
|
inline |
Definition at line 815 of file landscape.h.
|
inline |
Definition at line 1474 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1481 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1078 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1083 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 953 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 958 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 948 of file landscape.h.
References m_elems.
|
inline |
Definition at line 1048 of file landscape.h.
References m_elems, and m_polymapping.
Referenced by Pesticide::MainMapDecay().
|
inline |
Definition at line 1058 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1053 of file landscape.h.
References m_elems.
|
inline |
Definition at line 975 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 998 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 919 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 925 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 914 of file landscape.h.
References m_elems.
|
inline |
Definition at line 936 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 941 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 931 of file landscape.h.
References m_elems.
|
inline |
Definition at line 986 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 992 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 179 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1321 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1214 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 1220 of file landscape.h.
References m_elems.
|
inline |
|
inline |
Definition at line 964 of file landscape.h.
References m_elems, and m_polymapping.
|
inline |
Definition at line 970 of file landscape.h.
References RasterMap::Get(), m_elems, and m_land.
|
inline |
Definition at line 1400 of file landscape.h.
References g_weather, and Weather::GetWind().
|
inline |
Definition at line 1417 of file landscape.h.
References g_weather, and Weather::GetWind().
|
inline |
Definition at line 1423 of file landscape.h.
References g_weather, and Weather::GetWindDirection().
Referenced by Pesticide::DailyQueueProcess().
|
inline |
Definition at line 1405 of file landscape.h.
References g_weather, and Weather::GetWindPeriod().
|
inline |
Definition at line 1611 of file landscape.h.
References g_date, and Calendar::GetYear().
Referenced by Goose_Population_Manager::BirdsShot().
|
inline |
Definition at line 1616 of file landscape.h.
References g_date, and Calendar::GetYearNumber().
Referenced by FarmManager::FarmManagement(), and Farm::ProductApplication_DateLimited().
|
protected |
void Landscape::Tick | ( | void | ) |
If the farmer decision making model is on, the function:
Definition at line 1467 of file Landscape.cpp.
References cfg_MaizeEnergy, cfg_OptimiseBedriftsmodelCrops, cfg_OptimisingFarms, cfg_pesticidemapnoyears, cfg_pesticidemapon, cfg_pesticidemapstartyear, cfg_pesticidemaptype, cfg_productapplicendyear, cfg_productapplicstartyear, cfg_rodenticide_enable, Calendar::DayInYear(), g_date, g_pest, g_rand_uni(), g_weather, Calendar::GetDayInMonth(), Calendar::GetYearNumber(), janfirst, Calendar::JanFirst(), l_map_dump_event_enable, l_map_dump_event_x1, l_map_dump_event_x2, l_map_dump_event_y1, l_map_dump_event_y2, l_map_dump_veg_enable, l_map_dump_veg_x, l_map_dump_veg_y, l_pest_enable_pesticide_engine, marchfirst, Calendar::MarchFirst(), Calendar::Tick(), Pesticide::Tick(), Weather::Tick(), toof_Foobar, tos_Foobar, tov_Maize, tov_Undefined, CfgInt::value(), and CfgBool::value().
Referenced by TurnTheWorld().
|
inline |
Definition at line 1648 of file landscape.h.
References g_letype, and LE_TypeClass::TranslateEleTypes().
|
inline |
Definition at line 1655 of file landscape.h.
References g_letype, and LE_TypeClass::TranslateVegTypes().
Referenced by PollenNectarDevelopmentData::PollenNectarDevelopmentData().
|
inline |
|
protected |
Definition at line 2669 of file Landscape.cpp.
|
protected |
Definition at line 2617 of file Landscape.cpp.
References g_msg, LE::GetValidX(), LE::GetValidY(), l_map_umargin_width, m_polymapping, LE::SetArea(), LE::SetPoly(), LE::SetUnsprayedMarginPolyRef(), tole_UnsprayedFieldMargin, CfgInt::value(), MapErrorMsg::Warn(), and WARN_BUG.
|
protected |
Definition at line 2638 of file Landscape.cpp.
References LE::AddArea(), g_landscape_p, LE::GetPoly(), LE::GetUnsprayedMarginPolyRef(), LE::GetValidX(), LE::GetValidY(), m_polymapping, and SupplyLEPointer().
|
inline |
Tesll all LE objects to update their osmia nest status.
Definition at line 856 of file landscape.h.
References m_elems.
|
protected |
Definition at line 1644 of file Landscape.cpp.
References g_date, g_msg, Calendar::GetYear(), MapErrorMsg::Warn(), and WARN_FILE.
std::string Landscape::VegtypeToString | ( | TTypesOfVegetation | a_veg | ) |
Definition at line 4235 of file Landscape.cpp.
References g_msg, tov_AgroChemIndustryCereal, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DummyCropPestTesting, tov_FieldPeas, tov_FieldPeasSilage, tov_FieldPeasStrigling, tov_FodderBeet, tov_FodderGrass, tov_Heath, tov_Lawn, tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NaturalGrass, tov_NLBeet, tov_NLBeetSpring, tov_NLCabbage, tov_NLCabbageSpring, tov_NLCarrots, tov_NLCarrotsSpring, tov_NLCatchPeaCrop, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedLast, tov_NLMaize, tov_NLMaizeSpring, tov_NLPermanentGrassGrazed, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLTulips, tov_NLWinterWheat, tov_NoGrowth, tov_None, tov_NorwegianOats, tov_NorwegianPotatoes, tov_NorwegianSpringBarley, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OCarrots, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OCloverGrassSilage1, tov_OFieldPeas, tov_OFieldPeasSilage, tov_OFirstYearDanger, tov_OFodderBeet, tov_OGrazingPigs, tov_OMaizeSilage, tov_OOats, tov_OPermanentGrassGrazed, tov_OPotatoes, tov_OrchardCrop, tov_OSBarleySilage, tov_OSeedGrass1, tov_OSeedGrass2, tov_OSetaside, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRape, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_OWinterWheatUndersownExt, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PlantNursery, tov_PLBeans, tov_PLBeet, tov_PLBeetSpr, tov_PLCarrots, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRape, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_Potatoes, tov_PotatoesIndustry, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyCloverGrassStrigling, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySilage, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringRape, tov_SpringWheat, tov_SugarBeet, tov_Triticale, tov_Undefined, tov_Wasteland, tov_WaterBufferZone, tov_WinterBarley, tov_WinterBarleyStrigling, tov_WinterRape, tov_WinterRapeStrigling, tov_WinterRye, tov_WinterRyeStrigling, tov_WinterWheat, tov_WinterWheatShort, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, tov_WWheatPTreatment, tov_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.
|
inline |
Definition at line 1579 of file landscape.h.
References g_msg, MapErrorMsg::Warn(), and WARN_MSG.
Referenced by GooseActiveForageLocation::ClearBirds(), and SupplyGooseGrazingForageH().
void Landscape::WriteOpenness | ( | void | ) |
Stores openness for all polygons to a standard file.
|
protected |
Definition at line 276 of file landscape.h.
Referenced by hb_Add(), and hb_PaintBorder().
|
protected |
Definition at line 275 of file landscape.h.
Referenced by hb_Add(), and hb_PaintBorder().
|
protected |
Definition at line 274 of file landscape.h.
Referenced by hb_GenerateHBPolys().
|
protected |
Definition at line 263 of file landscape.h.
Referenced by hb_Add(), and hb_FindHedges().
|
protected |
Definition at line 270 of file landscape.h.
Referenced by hb_Add(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_MapBorder(), and hb_MaxUnpaintedNegNeighbour().
|
protected |
Definition at line 268 of file landscape.h.
Referenced by hb_Add(), hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_DownPolyNumbers(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_HasOtherNeighbour(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_MaxUnpaintedNegNeighbour(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), hb_RestoreHedgeCore(), and hb_UpPolyNumbers().
|
protected |
Definition at line 272 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 273 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 272 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 273 of file landscape.h.
Referenced by hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
protected |
Definition at line 264 of file landscape.h.
Referenced by hb_GenerateHBPolys(), and hb_StripingDist().
|
protected |
Definition at line 271 of file landscape.h.
Referenced by hb_Add(), hb_DownPolyNumbers(), and hb_UpPolyNumbers().
|
protected |
Definition at line 269 of file landscape.h.
Referenced by hb_Add(), hb_AddNewHedgebanks(), hb_ClearPolygon(), hb_FindBoundingBox(), hb_HasNeighbourColor(), hb_HasOtherNeighbour(), hb_MapBorder(), hb_MarkTheBresenhamWay(), hb_MarkTopFromLocalMax(), hb_MaxUnpaintedNegNeighbour(), hb_PaintBorder(), hb_PaintWhoHasNeighbourColor(), hb_ResetColorBits(), and hb_RestoreHedgeCore().
|
private |
Definition at line 153 of file landscape.h.
Referenced by GetVegArea().
|
protected |
Definition at line 319 of file landscape.h.
|
private |
Flag to signal that missing polygons exist
Definition at line 150 of file landscape.h.
|
private |
List of all landscape elements. The index is a sequential number, to get the polynum look this number up in m_polymapping.
Definition at line 122 of file landscape.h.
Referenced by GetActualGooseGrazingForage(), GrazeVegetation(), GrazeVegetationTotal(), hb_Add(), hb_FindHedges(), hb_GenerateHBPolys(), IncOsmiaNest(), MagicMapP2PolyRef(), RebuildPolyMapping(), ReleaseOsmiaNest(), SetBirdMaizeForage(), SetBirdSeedForage(), SetMaleNewtPresent(), SupplyBirdMaizeForage(), SupplyBirdSeedForage(), SupplyCentroidX(), SupplyCentroidY(), SupplyCountryDesig(), SupplyDayDegrees(), SupplyDeadBiomass(), SupplyElementSubType(), SupplyElementType(), SupplyElementTypeCC(), SupplyElementTypeFromVector(), SupplyFarmArea(), SupplyFarmOwner(), SupplyFarmOwnerIndex(), SupplyFarmType(), SupplyGooseGrazingForageH(), SupplyGrazingPressure(), SupplyGrazingPressureVector(), SupplyGreenBiomass(), SupplyHasTramlines(), SupplyInsects(), SupplyInStubble(), SupplyIsCereal(), SupplyIsGrass(), SupplyIsMatureCereal(), SupplyJustMown(), SupplyJustMownVector(), SupplyJustSprayed(), SupplyJustSprayedVector(), SupplyLAGreen(), SupplyLastSownVeg(), SupplyLastSownVegVector(), SupplyLastTreatment(), SupplyLATotal(), SupplyLEHigh(), SupplyLEPointer(), SupplyMaleNewtPresent(), SupplyNectar(), SupplyNumberOfPolygons(), SupplyOpenness(), SupplyOptFarmType(), SupplyOsmiaNest(), SupplyPesticideCell(), SupplyPollen(), SupplyPolygonArea(), SupplyPolygonAreaVector(), SupplyPolyRef(), SupplyPolyRefCC(), SupplyPolyRefVector(), SupplyPondPesticide(), SupplySkScrapes(), SupplySoilType(), SupplySoilTypeR(), SupplyTotalNectar(), SupplyTotalPollen(), SupplyTrafficLoad(), SupplyValidX(), SupplyValidY(), SupplyVegAge(), SupplyVegBiomass(), SupplyVegBiomassVector(), SupplyVegCover(), SupplyVegCoverVector(), SupplyVegDensity(), SupplyVegDigestability(), SupplyVegDigestabilityVector(), SupplyVegHeight(), SupplyVegHeightVector(), SupplyVegPatchy(), SupplyVegPhase(), SupplyVegType(), SupplyVegTypeVector(), SupplyWeedBiomass(), and UpdateOsmiaNesting().
|
private |
List of all the farms.
Definition at line 119 of file landscape.h.
Referenced by SupplyFarmManagerPtr(), SupplyFarmPtr(), and SupplyNumberOfFarms().
|
private |
Definition at line 161 of file landscape.h.
Referenced by SupplyGooseGrazingForageH().
|
private |
Definition at line 162 of file landscape.h.
Referenced by SupplyGooseGrazingForageH().
|
private |
Curve relatning goose intake rates in KJ/min to vegetation height.
Definition at line 160 of file landscape.h.
Referenced by SupplyGooseGrazingForageH().
|
private |
Definition at line 139 of file landscape.h.
Referenced by CorrectCoords(), CorrectCoordsPointNoWrap(), CorrectCoordsPt(), CorrectHeight(), SupplyElementTypeCC(), SupplyPolyRefCC(), and SupplySimAreaHeight().
|
private |
Definition at line 141 of file landscape.h.
Referenced by CorrectCoords(), CorrectCoordsPt(), CorrectHeight(), SupplyElementTypeCC(), and SupplyPolyRefCC().
|
private |
The big map.
Definition at line 125 of file landscape.h.
Referenced by GetActualGooseGrazingForage(), hb_Add(), IncOsmiaNest(), ReleaseOsmiaNest(), SupplyBirdMaizeForage(), SupplyBirdSeedForage(), SupplyCentroidX(), SupplyCentroidY(), SupplyCountryDesig(), SupplyDeadBiomass(), SupplyElementSubType(), SupplyElementType(), SupplyElementTypeCC(), SupplyFarmOwner(), SupplyFarmOwnerIndex(), SupplyFarmType(), SupplyGrazingPressure(), SupplyGreenBiomass(), SupplyHasTramlines(), SupplyInsects(), SupplyJustSprayed(), SupplyLAGreen(), SupplyLastSownVeg(), SupplyLastTreatment(), SupplyLATotal(), SupplyLEHigh(), SupplyMagicMapP(), SupplyNectar(), SupplyOpenness(), SupplyOptFarmType(), SupplyOsmiaNest(), SupplyPollen(), SupplyPolyRef(), SupplyPolyRefCC(), SupplyPolyRefIndex(), SupplySoilType(), SupplySoilTypeR(), SupplyTotalNectar(), SupplyTotalPollen(), SupplyTrafficLoad(), SupplyVegAge(), SupplyVegBiomass(), SupplyVegCover(), SupplyVegDensity(), SupplyVegDigestability(), SupplyVegHeight(), SupplyVegPatchy(), SupplyVegType(), and SupplyWeedBiomass().
|
protected |
Definition at line 194 of file landscape.h.
Referenced by SupplyLargestPolyNumUsed().
|
private |
Definition at line 143 of file landscape.h.
Referenced by SupplySimAreaMaxExtent().
|
private |
Definition at line 142 of file landscape.h.
|
private |
a flag to ensure centroid calculation on object construction
Definition at line 146 of file landscape.h.
|
private |
a flag to ensure openness calculation on object construction
Definition at line 148 of file landscape.h.
|
private |
For specialised pesticide recording.
Definition at line 133 of file landscape.h.
|
protected |
An attribute to hold the pesticide type being tested, if there is one, if not default is -1.
Definition at line 278 of file landscape.h.
Referenced by SupplyPesticideType().
|
private |
m_polymapping is a mapping from polygon numbers into the list of landscape elements, m_elems. When using this it is important that it is the poly num and not the map index that is used.
Definition at line 130 of file landscape.h.
Referenced by GetActualGooseGrazingForage(), GetPolymapping(), GrazeVegetation(), GrazeVegetationTotal(), hb_Add(), hb_GenerateHBPolys(), RebuildPolyMapping(), SetBirdMaizeForage(), SetBirdSeedForage(), SetPolymapping(), SupplyBirdMaizeForage(), SupplyBirdSeedForage(), SupplyCentroidX(), SupplyCentroidY(), SupplyDayDegrees(), SupplyDeadBiomass(), SupplyElementSubType(), SupplyElementType(), SupplyFarmArea(), SupplyFarmOwner(), SupplyFarmOwnerIndex(), SupplyFarmType(), SupplyGooseGrazingForageH(), SupplyGrazingPressure(), SupplyGreenBiomass(), SupplyHasTramlines(), SupplyInsects(), SupplyInStubble(), SupplyIsCereal(), SupplyIsGrass(), SupplyIsMatureCereal(), SupplyJustMown(), SupplyJustSprayed(), SupplyLAGreen(), SupplyLastSownVeg(), SupplyLastTreatment(), SupplyLEPointer(), SupplyOpenness(), SupplyPesticideCell(), SupplyPolygonArea(), SupplySkScrapes(), SupplyTrafficLoad(), SupplyValidX(), SupplyValidY(), SupplyVegAge(), SupplyVegBiomass(), SupplyVegCover(), SupplyVegDensity(), SupplyVegDigestability(), SupplyVegHeight(), SupplyVegPatchy(), SupplyVegPhase(), SupplyVegType(), and SupplyWeedBiomass().
|
protected |
List of pond indexes.
Definition at line 197 of file landscape.h.
Referenced by HowManyPonds(), and SupplyPondIndex().
|
protected |
|
private |
Definition at line 157 of file landscape.h.
|
private |
Definition at line 158 of file landscape.h.
Referenced by SupplyRodenticidePredatoryManager().
|
private |
a pointer to the current main population manager
Definition at line 155 of file landscape.h.
Referenced by SetThePopManager(), and SupplyThePopManager().
|
protected |
Definition at line 317 of file landscape.h.
Referenced by SupplyShouldSpray().
|
protected |
Definition at line 193 of file landscape.h.
|
private |
Definition at line 115 of file landscape.h.
Referenced by SupplyVersion().
|
private |
Definition at line 138 of file landscape.h.
Referenced by CorrectCoords(), CorrectCoordsPointNoWrap(), CorrectCoordsPt(), CorrectWidth(), SupplyElementTypeCC(), SupplyPolyRefCC(), and SupplySimAreaWidth().
|
private |
Definition at line 140 of file landscape.h.
Referenced by CorrectCoords(), CorrectCoordsPt(), CorrectWidth(), SupplyElementTypeCC(), and SupplyPolyRefCC().
|
protected |
Definition at line 266 of file landscape.h.
|
protected |
Definition at line 267 of file landscape.h.