SELGEOmap {GEOmap}R Documentation

Select parts of a GEOmap

Description

Using area, number of points and Lat-Lon Limits, extracts map strokes and creates a new GEOmap

Usage

SELGEOmap(MAP, ncut = 3, acut = c(0, 1e+05), proj = NULL, LIM = NULL)

Arguments

MAP Map structure
ncut minimum number of points in polygon
acut vector, min and max of areas to include
proj map projection
LIM vector, c(lon1, lat1, lon2, lat2)

Details

Uses splancs function. If proj and LIM are NULL then no selection on limits are used ncut is used to eliminate area calculations with strokes less than the specified number.

Value

GEOmap LIST

STROKES list
nam name of stroke
num number of points in stroke
index index of stroke
col color of stroke
style style of stroke
code code of stroke
LAT1 lower left Lat of stroke
LAT2 upper right Lat of stroke
LON1 lower left Lon of stroke
LON2 upper right Lon of stroke
POINTS list
lat vector of lats
lon vector of lons

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

geoarea

Examples

library(geomapdata)
data(worldmap)
skam = SELGEOmap(worldmap, ncut=3, acut=c(10000, Inf), proj=NULL, LIM=NULL)

par(mfrow=c(2,1))

#######  plot world map, with all lines:
plotGEOmap(worldmap)
length(worldmap$STROKES$num)
######   same plot with some lines removed:
plotGEOmap(skam)
length(skam$STROKES$num)

#####################
#####################


[Package GEOmap version 1.4-0 Index]