View source: R/StoxBaselineFunctions.R
DefineAreaPosition | R Documentation |
Define positions for areas of a spatial coding system.
DefineAreaPosition(
processData,
DefinitionMethod = c("ResourceFile", "StratumPolygon"),
FileName = character(),
StratumPolygon,
UseProcessData = F
)
processData |
|
DefinitionMethod |
'ResourceFile' or 'StratumPolygon', see details. |
FileName |
path to resource file |
StratumPolygon |
|
UseProcessData |
If TRUE, bypasses execution of function and returns existing 'processData' |
Defines an association between area codes and positions that represent that area code.
For example an area code could be associated with the centre of mass of the area, or
some other point within the area. This may be useful for providing approximate
coordinates when locations are identified by area codes. The soruces of the
area-position association may be a table or a appropriately formatted
polygon-definition (StratumPolygon
).
For DefinitionMethod 'ResourceFile': Definitions are read from a tab separated, UTF-8 encoded file with headers. Columns defined as:
Area code (key)
optional subdivision of area. If provided, positions for missing locations should be encoded as well.
WGS84 Latitude, decimal degrees
WGS84 Longitude, decimal degrees
For DefinitionMethod 'StratumPolygon':
Definitions are extracted from a StratumPolygon
:
'Area' in AreaPosition
is derived from the column 'StratumName' in StratumPolygon
.
'Location' in AreaPosition
is encoded as missing.
'Latitude' and 'Longitude' in AreaPosition
are the centroids set for each polygon in StratumPolygon
. Note that for oddly shaped polygons (concave polygons) the centroid may lay outside the area.
AreaPosition
.
SetAreaPositionsBiotic
and AddAreaPositionStoxLanding
for adding positions to data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.