Description Usage Arguments Value Examples
View source: R/get_heightmap.R
This function retrieves elevation data from the USGS national map API and converts it into a matrix appropriate for further usage with tools such as rayshader. It requires a functioning internet connection to retrieve data.
1 2 3 4 5 6 7 8 9 10 11 12 |
bbox |
Bounding box to download imagery for |
img.width |
Image width, in pixels |
img.height |
Image size, in pixels |
lat |
A quoted string indicating what named value in the bounding box represents latitude. If NULL, will be inferred from bounding box names. |
lng |
A quoted string indicating what named value in the bounding box represents longitude. If NULL, will be inferred from bounding box names. |
save.tif |
Logical: should the downloaded imagery be saved as a file? |
tif.filename |
If |
sr_bbox |
Spatial reference code (ISO 19111) for bounding box |
sr_image |
Spatial reference code (ISO 19111) for image |
verbose |
Logical: print out debug information while trying to query the elevation map server? |
A matrix object containing elevation data suitable for use with mapping functions. Returned invisibly.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
bbox <- get_centroid_bounding_box(c(
"lat" = 44.121268,
"lng" = -73.903734
),
distance = 10
)
heightmap <- get_heightmap(bbox)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.