Description Usage Arguments Details Value Examples
Helper function to define an extent (in latitude and longitude) describing the area of interest for modelling. Opens a world map, on which you can click to twice to determine the area of interest.
1 2 3 4 5 | FindExtent(
initial_extent = c(-180, 180, -90, 90),
resolution = c("low", "medium"),
round = 3
)
|
initial_extent |
optional numeric vector or extent object defining the giving the extent (in latitude and longitude) of the world map to plot. This should be larger than the target extent so that you can click within it. Can be useful for 'zooming in' to an area to define an extent more precisely. |
resolution |
how detailed to make national borders in the plotted world map. "low" is less accurate, but faster to load than "medium" |
round |
to how many decimal places the extent should be reported. The
default value rounds to 3 decimal places. Set this to |
This is just a thin wrapper around raster::getExtent
,
providing the world map to click on and reporting the extent as a rounded
vector.
invisibly returns an extent object, also prints a vector version of that extent to the console.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# open a world map and click on two spots to print the extent to the console
FindExtent()
# you can get the corresponding extent object too
ext <- FindExtent()
ext
# you can zoom in on an area and increase the resolution, and precision of
# the extent vector
FindExtent(c(112, 156, -44, -8),
resolution = "medium",
round = 6)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.