ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
#include <rastermap.h>
Public Member Functions | |
int | MapWidth (void) |
int | MapHeight (void) |
int | Get (int a_x, int a_y) |
char * | GetID (void) |
int * | GetMagicP (int a_x, int a_y) |
void | Put (int a_x, int a_y, int a_elem) |
RasterMap (const char *a_mapfile, Landscape *m_landscape) | |
~RasterMap (void) | |
void | Manipulation1 () |
int | CellReplacementNeighbour (int a_x, int a_y, int a_polyref) |
A method for helping remove tiny polygons. More... | |
bool | MissingCellReplace (int a_x, int a_y, bool a_fieldsonly) |
A method for removing missing polygons. More... | |
bool | MissingCellReplaceWrap (int a_x, int a_y, bool a_fieldsonly) |
A method for removing missing polygons - tests for edge conditions. More... | |
Protected Member Functions | |
void | Init1 (const char *a_mapfile, Landscape *m_landscape) |
void | Init2 (const char *a_mapfile, Landscape *m_landscape) |
Private Attributes | |
char | m_id [12] |
int * | m_map |
int | m_width |
int | m_height |
int | m_x |
int | m_y |
Landscape * | m_landscape |
Definition at line 40 of file rastermap.h.
RasterMap::RasterMap | ( | const char * | a_mapfile, |
Landscape * | m_landscape | ||
) |
Definition at line 46 of file rastermap.cpp.
References cfg_manipulation1_on, g_msg, CfgBool::value(), MapErrorMsg::Warn(), and WARN_FILE.
RasterMap::~RasterMap | ( | void | ) |
Definition at line 180 of file rastermap.cpp.
int RasterMap::CellReplacementNeighbour | ( | int | a_x, |
int | a_y, | ||
int | a_polyref | ||
) |
A method for helping remove tiny polygons.
Replaces a cell value with the most common value from the surrounding 8 cells. If near the edge nothing is done. Return value is the new value of the cell or -1 if nothing is done. First tests to make sure that the polygon we are removing is at these coords.
Definition at line 225 of file rastermap.cpp.
References g_msg, and MapErrorMsg::Warn().
|
inline |
Definition at line 81 of file rastermap.h.
References g_msg, MapErrorMsg::Warn(), WARN_BUG, and MapErrorMsg::WarnAddInfo().
Referenced by Landscape::GetActualGooseGrazingForage(), Landscape::IncOsmiaNest(), Landscape::ReleaseOsmiaNest(), Landscape::SupplyBirdMaizeForage(), Landscape::SupplyBirdSeedForage(), Landscape::SupplyCentroidX(), Landscape::SupplyCentroidY(), Landscape::SupplyCountryDesig(), Landscape::SupplyDeadBiomass(), Landscape::SupplyElementSubType(), Landscape::SupplyElementType(), Landscape::SupplyElementTypeCC(), Landscape::SupplyFarmOwner(), Landscape::SupplyFarmOwnerIndex(), Landscape::SupplyFarmType(), Landscape::SupplyGrazingPressure(), Landscape::SupplyGreenBiomass(), Landscape::SupplyHasTramlines(), Landscape::SupplyInsects(), Landscape::SupplyJustSprayed(), Landscape::SupplyLAGreen(), Landscape::SupplyLastSownVeg(), Landscape::SupplyLastTreatment(), Landscape::SupplyLATotal(), Landscape::SupplyLEHigh(), Landscape::SupplyNectar(), Landscape::SupplyOpenness(), Landscape::SupplyOptFarmType(), Landscape::SupplyOsmiaNest(), Landscape::SupplyPollen(), Landscape::SupplyPolyRef(), Landscape::SupplyPolyRefCC(), Landscape::SupplyPolyRefIndex(), Landscape::SupplySoilType(), Landscape::SupplySoilTypeR(), Landscape::SupplyTotalNectar(), Landscape::SupplyTotalPollen(), Landscape::SupplyTrafficLoad(), Landscape::SupplyVegAge(), Landscape::SupplyVegBiomass(), Landscape::SupplyVegCover(), Landscape::SupplyVegDensity(), Landscape::SupplyVegDigestability(), Landscape::SupplyVegHeight(), Landscape::SupplyVegPatchy(), Landscape::SupplyVegType(), Landscape::SupplyWeedBiomass(), and Pesticide::TwinMapSpray().
|
inline |
Definition at line 55 of file rastermap.h.
|
inline |
Definition at line 74 of file rastermap.h.
Referenced by Landscape::hb_Add(), and Landscape::SupplyMagicMapP().
|
protected |
Definition at line 66 of file rastermap.cpp.
References cfg_rectangularmaps_on, g_msg, CfgBool::value(), MapErrorMsg::Warn(), WARN_FATAL, and WARN_FILE.
|
protected |
Definition at line 124 of file rastermap.cpp.
References g_msg, MapErrorMsg::Warn(), WARN_FATAL, WARN_FILE, and MapErrorMsg::WarnAddInfo().
void RasterMap::Manipulation1 | ( | ) |
Definition at line 185 of file rastermap.cpp.
References cfg_rastermapmanipmultiply, and CfgInt::value().
|
inline |
Definition at line 53 of file rastermap.h.
Referenced by Landscape::hb_Add(), and Pesticide::Pesticide().
|
inline |
Definition at line 52 of file rastermap.h.
Referenced by Landscape::hb_Add(), Landscape::Landscape(), and Pesticide::Pesticide().
bool RasterMap::MissingCellReplace | ( | int | a_x, |
int | a_y, | ||
bool | a_fieldsonly | ||
) |
A method for removing missing polygons.
Definition at line 273 of file rastermap.cpp.
bool RasterMap::MissingCellReplaceWrap | ( | int | a_x, |
int | a_y, | ||
bool | a_fieldsonly | ||
) |
A method for removing missing polygons - tests for edge conditions.
Definition at line 302 of file rastermap.cpp.
References tole_Field, tole_Orchard, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PermPastureTussockyWet, and tole_Vildtager.
|
inline |
Definition at line 57 of file rastermap.h.
|
private |
Definition at line 45 of file rastermap.h.
|
private |
Definition at line 42 of file rastermap.h.
|
private |
Definition at line 48 of file rastermap.h.
|
private |
Definition at line 43 of file rastermap.h.
|
private |
Definition at line 44 of file rastermap.h.
|
private |
Definition at line 46 of file rastermap.h.
|
private |
Definition at line 47 of file rastermap.h.