get_country_shoreline: Determines Country Names for Coordinate Points Located in the...

Description Usage Arguments Details References Examples

View source: R/4_get_country_shoreline.R

Description

Determines country names for a list of coordinate points which are supposed to be located on land but without country names assigned by the function get_country because probably they are very close to the shoreline and have lack of precision. Due to this fact when the user runs get_sea over that points they get ocean/sea names assigned. The present function uses a SpatialPolygonsDataFrame with 50 m precision and a buffer zone around the coordinate points. The buffer represents the tolerance and is given by the user. If the tolerance is 500 m, for example, and the point gets a country name, means that it belongs to that country with an error until 500 m towards the sea.

Usage

1
get_country_shoreline(icoords, tol)

Arguments

icoords

data frame with three columns: id | lon | lat where: 'id' is the row identifier for the coordinates in the original list of coordinates, 'lon' is the longitude in the range (-180, +180) and 'lat' is the latitude. Both coordinates are in decimal degrees.

tol

is the tolerance in meters. By default, tol = 500 meters.

Details

Input:

Output:

References

Made with Natural Earth. Free vector and raster map data @ naturalearthdata.com.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
##
## First run
get_lon180(coords = ispd)
## Or
test_geocoord(coords = eraclim_uao_fp)
## Then run sequentially
get_country(icoords = coords_ok)
get_country_shoreline(icoords = miss_countries, tol)

## End(Not run)

mcmventura/stlocationqc documentation built on May 24, 2019, 11:43 p.m.