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

Integrate USGS TopoView into iD #599

Open
1ec5 opened this issue Sep 6, 2023 · 5 comments
Open

Integrate USGS TopoView into iD #599

1ec5 opened this issue Sep 6, 2023 · 5 comments

Comments

@1ec5
Copy link
Member

1ec5 commented Sep 6, 2023

iD currently features a USGS Topographic Maps layer courtesy of Caltopo (osmlab/editor-layer-index#290). This layer has been essential for expanding pre–2010s coverage of small towns in the United States. However, this mosaic has an ambiguous vintage, and at best it represents only a snapshot in time.

The USGS maintains its own TopoView service that makes it easy to find and preview georeferenced topographic maps all the way back to 1884. The service is primarily about accessing the original georeferenced scans, borders and all, which are also available individually from other USGS websites such as ScienceBase. However, we don’t need the borders, and we especially prefer a Web image format such as PNG over something desktop-oriented like GeoTIFF or PDF. The cropped overlays from the TopoView website itself would be more useful for tracing. It would be wonderful if we could somehow integrate these overlays into iD as a dynamic series of background layers to choose from.

/ref #582 (comment)

@1ec5
Copy link
Member Author

1ec5 commented Sep 6, 2023

From taking a cursory look at TopoView, I don’t think they advertise a WMS or TMS for the imagery. However, the application does use a MapService under the hood to discover the overlay images. It calls the MapService’s identify endpoint with a point geometry and viewport, such as:

https://ngmdb.usgs.gov/arcgis/rest/services/topoview/ustOverlay/MapServer/identify?sr=4326&layers=all&tolerance=3&returnGeometry=true&imageDisplay=995%2C468%2C96&mapExtent=-93.30422401428224%2C44.854773605970244%2C-93.26152324676514%2C44.869009599324826&geometry=-93.28010559082033%2C44.8598235278391&geometryType=esriGeometryPoint&f=json

The response contains metadata such as results[0].attributes.map_state and results[0].attributes.drg_name that indicate an image URL:

https://ngmdb.usgs.gov/img4/ht_icons/overlay/MN/MN_Minneapolis_805505_1901_62500_geo.jpg

along with a polygon geometry for georeferencing purposes. This is not a tiled image, but openstreetmap/iD#9291 added support for loading georeferenced images that should be adequate for overlaying this image on the map canvas during editing.

If there is a WMS somewhere with tiled images of these scans, that would be preferable in terms of being confident in the endpoint’s stability.

@1ec5
Copy link
Member Author

1ec5 commented Sep 6, 2023

This is not a tiled image, but openstreetmap/iD#9291 added support for loading georeferenced images that should be adequate for overlaying this image on the map canvas during editing.

Just kidding, that iD feature is about geotagging photos, not georeferencing images flat on the map. The images are already projected into Web Mercator in order to display them on a Mapbox GL JS map, but it would still require a bit of extra code to position the image correctly on the canvas. Another reason why a normal WMS would be wonderful.

@1ec5
Copy link
Member Author

1ec5 commented Sep 6, 2023

Some additional possibilities in OSMUS Slack.

@1ec5
Copy link
Member Author

1ec5 commented Dec 27, 2023

This ImageServer seems to have everything that’s on topoView already georectified and cropped. The public listing points to a different ImageServer that’s behind an ArcGIS login wall.

@1ec5
Copy link
Member Author

1ec5 commented Feb 5, 2024

Esri also publishes a Topo Map Explorer application. The ImageServer would be closer to what iD needs to consume though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo-Unknown path
Development

No branches or pull requests

1 participant