Geographical point selection.

Description

Select geographical data points by arbitrary criterion.

Usage

1
selpos(lat, lon=NULL, ind)

Arguments

lat

Latitude of points or list containing lat,lon.

ind

Selection criterion.

lon

Longitude of data points. If missing, this must be part of the lat argument.

Details

The normal way of working with geographical data is to store positions as a list with names lat and lon. This is easier for most applications, except selection of subsets, where it is essential to access individual elements. The purpose of this routine is merely to ease the selection process.

Value

Returns list with elements lat,lon which satisfy the criterion.

See Also

geoplot,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
             subs<-selpos(pos,,z>6)# Select positions where z>6

       The Function is trivially defined as
       function(lat, lon = NULL, ind)
       {
                      if(is.null(lon)) {
                           lon <- lat$lon
                           lat <- lat$lat
                      }
                      lat <- lat[ind]
                      lon <- lon[ind]
                      return(lat, lon)
       }

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.