Learn R Programming

GEOmap (version 2.1)

KINOUT: Map inside-outside

Description

Determine if strokes are in a target region

Usage

KINOUT(MAP, LLlim, projtype = 2)

Arguments

MAP
GEOmap list
LLlim
list: lat lon limits
projtype
local projection type

Value

  • Vector or indeces of strokes that intersect the target.

Details

The limits are used to calculate an origin and each point is projected accordingly. The x-y values are evaluated for being in or out of the target. A local projection is used - UTM (2) is the prefered projection.

See Also

inpoly,

Examples

Run this code
data(worldmap)
data(coastmap)
L = list(lon=c(163.59, 182.95), lat=c(-48.998, -32.446))


k = KINOUT(worldmap,L, 2)

###  which strokes are these?

 print( worldmap$STROKES$nam[k] )


k = KINOUT(coastmap,L, 2)

 print( coastmap$STROKES$nam[k] )


testmap =  GEOmap.Extract(coastmap,k, INOUT="in" )

 plotGEOmap(testmap)

Run the code above in your browser using DataLab