Description Usage Arguments Value Author(s) Examples
Returns the limits of the area of a shape/kml file
1 | shapelim(shapefile, shapedir, shapeext = "shp", around = 0.05)
|
shapefile |
name of the shape/kml file. |
shapedir |
path to the shape/kml file. |
shapeext |
extension of the shape/kml file : "shp" for a Esri shapefile or "kml" for a kml file from Google earth . |
around |
extra space added around the area of the shapefile. By default, around=0.05. |
Returns a list with :
xlim |
a two dimensions vector with the longitude borders of the shapefile |
ylim |
a two dimensions vector with the latitude borders of the shapefile |
proj |
string containing the projection parameters of the shapefile |
Romain Frelat and Bruno Gerard
1 2 3 4 5 6 7 8 9 10 11 | #with a shape file :
shape="SLP_Mzimba"
shapedir=paste(system.file("extdata/shape", package="ndvits"), "/", sep="")
lim1=shapelim(shape,shapedir)
print(lim1)
#with a kml file
shape="SLP-SAs_CropLand"
shapedir=system.file("extdata/shape/SLP-SAs.kml", package="ndvits")
lim2=shapelim(shape,shapedir,shapeext="kml")
print(lim2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.