Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USGS tileset options #23

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

FishheadNate
Copy link

@FishheadNate FishheadNate commented Sep 25, 2023

Expand map_service and map_type options to include U.S. Geological Survey (USGS) tilesets:

  • USGS Hydro Cached

    basemap_ggplot(ext, map_service = "usgs", map_type = "hydro_cached") + theme_void()
  • USGS Imagery Only

    basemap_magick(ext, map_service = "usgs", map_type = "imagery_only")
  • USGS Imagery Topo

    basemap_magick(ext, map_service = "usgs", map_type = "imagery_topo")
  • USGS Shaded Relief Only

    basemap_magick(ext, map_service = "usgs", map_type = "shaded_relief")
  • USGS Topo

    basemap_magick(ext, map_service = "usgs", map_type = "topo")

@FishheadNate FishheadNate deleted the nate/add-custom-tileset-option branch September 25, 2023 19:05
@FishheadNate FishheadNate changed the title print tile URL Add USGS tileset options Sep 26, 2023
@FishheadNate FishheadNate reopened this Sep 26, 2023
@16EAGLE
Copy link
Owner

16EAGLE commented Mar 3, 2024

Thank you for taking the time to add this tile service! Would be nice to have this in the package.

When testing this with the default ext object of basemaps, I am getting 404 errors. Is there a limitation on the zoom level for these tile servers?

library(basemaps)
data(ext)

set_defaults(map_service = "usgs", map_type = "imagery_topo")
basemap_ggplot(ext)
#> Loading basemap 'imagery_topo' from map service 'usgs'...
#>  |                                                                                                     | 0 % ~calculating  
#> Error: Tile download failed: HTTP error 404.

Also, when I check the start tile and end tile links at https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer, I get 404 errors starting with Level 9.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants