R: Map inside-outside

KINOUT {GEOmap} | R Documentation

## 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

### 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.

### Value

Vector or indeces of strokes that intersect the target.

### Note

The mercator projections do not work well with this routine.

### Author(s)

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

### See Also

inpoly,

### Examples

    library(geomapdata)
    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)

[Package GEOmap version 2.4-0 Index]