sl.lonlat.identical | R Documentation |
Check if two pairs of longitude and latitude vectors have identical element pairs. Note that the comparison is done element-wise: if identical coordinates are contained but at different positions in the vector pairs, that's not identified.
sl.lonlat.identical(lon1, lat1, lon2, lat2, recycle = FALSE, tolerance = 0)
lon1 |
a vector giving the longitudes of the first set of points. |
lat1 |
a vector giving the latitudes of the first set of points. |
lon2 |
a vector giving the longitudes of the second set of points. |
lat2 |
a vector giving the latitudes of the second set of points. |
recycle |
a logical value indicating whether the coordinate vectors shall be recycled if they are shorter than the longest one of them. |
tolerance |
a scalar giving the numerical tolerance, that is, by how much coordinates may differ to be counted as 'identical' (in degrees, applied separately to the longitudes and the latitudes). |
A vector with logical values indicating at which positions points are identical (or closer than the tolerance).
This function is used in sl.plot.polygon
.
Helge Goessling
sl.lonlat.identical(lon1=1:5,lat1=rep(10,5),lon2=rep(4,5),lat2=13:9)
## Should return:
## [1] FALSE FALSE FALSE TRUE FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.