1

Everything I know about GIS I've learned myself.

I wrote a small utility for my non-profit employer that used the USGS 'The National Map's online services to pull a sized image of USGS Topographical Quad. I wrote the utility many years ago, and it was not only a crash-course in GIS, but in accessing a WMS.

The URL I had been using was similar to:

http://raster.nationalmap.gov/arcgis/services/Scanned_Maps/USGS_EROS_DRG_SCALE/ImageServer/WMSServer?service=WMS&request=GetMap&version=1.3.0&format=image/png&bbox=-105.6828,36.35569,-105.4633,36.45874&layers=0&width=1000&height=1000&crs=CRS:84&styles=default

..which would give an image of 1000px x 1000px around Taos, New Mexico. (Coordinates and image size would change, depending on user's area of curiosity.)

Now, however, that service was shut down. In my infinite glory, I had completely missed the posted notification and am now stuck without a running utility.

According to the USGS, the service has moved to 'services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer'

So, learning what I could about the service, apparently WMS isn't available and I need to use the ExportMap functionality. This is the new URL I was able to translate the above to:

https://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer/export?bbox=-105.6828,36.35569,-105.4633,36.45874&bboxSR=EPSG:900913&layers=0&layerDefs=&size=1000,1000&imageSR=EPSG:900913&format=png&f=image

However, if you click on that, you'll see I get an awesomely helpful error of "bytes", code 500. (As a developer, I know Code 500 is Internal Server Error, of course..) But without a more helpful message, I'm not sure where I bungled it up.

Any thoughts?

  • 1
    Well, your BBOX SR is 4269 (NAD83, decimal degrees), not 900913. ArcGIS wouldn't understand 900913 anyway. If you want the image in Web Mercator, use EPSG:3857 instead. The values may need to be given in latitude,longitude order, but I'm not sure. Try fixing the CRS (SR) info first. – mkennedy Dec 29 '16 at 20:23
  • Ah, thanks for that! Tried the correct values there, same response.(The online reference I found said to have lon first; but I tried it lat first, and same error.) From other searches about the '500 Bytes' error, it almost sounds like a server misconfiguration.. I'm going to contact them and just verify that.. – Coyttl Dec 31 '16 at 1:48
  • The following URL works, in that it returns a map, so the service appears to be correctly configured: services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/… – nmtoken Jan 2 '17 at 19:23
  • Yes, it's highly likely, it may only support one, after all services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/… tells us only Spatial Reference: 102100 – nmtoken Feb 3 '17 at 16:05
  • Thanks @nmtoken - that's it. Now I'll need to add code in my utility to convert the values I'm getting over. Whohoo. – Coyttl Feb 3 '17 at 16:19
1

You are correct the service for the old raster maps doesn't appear to offer a WMS service.

Looking at the metadata for the service at the following URL:

https://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer

It appears that only one coordinate reference system is supported:

Spatial Reference: 102100 (3857)

The service appears to be correctly configured in that the following request returns a map:

https://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer/export?bbox=--11842393.870825948,4268163.373404469,-11651594.043536967,4434966.388642153&bboxSR=EPSG:102100&layers=0&layerDefs=&size=1000,1000&imageSR=EPSG:102100&format=png&f=image&

like:

Example output of USA_Topo_Maps service

| improve this answer | |
  • Thanks again, good summary of our comments and what worked in the end! – Coyttl Feb 5 '17 at 1:06
0

The USGS still supply a WMS service for the map in question.

Try using this URL to access it: https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer?service=WMS&request=GetMap&version=1.3.0&format=image/png&bbox=-105.6828,36.35569,-105.4633,36.45874&layers=0&width=1000&height=1000&crs=CRS:84&styles=default&

You can access the Capabilities file here: https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer?request=GetCapabilities&service=WMS&

| improve this answer | |
  • True - but wrong map. :) I actually still use that service in my utility. The service I have linked above is the 'Historic' Topo maps.. – Coyttl Jan 2 '17 at 17:23
  • @Coyttl The URL now returns topo for Taos, is it the wrong topo? – nmtoken Jan 2 '17 at 19:03
  • Thanks for fixing the issues with the URL, @nmtoken. I think the old srs parameter was ignored but it really shouldn't be there as you stated – Peter Horsbøll Møller Jan 3 '17 at 14:58
  • @nmtoken It's the latest version of their 'USTopo' - the latest version of their topo maps. The URL I've been using above is the older, raster US Topographic maps. The older, 'scanned' map. – Coyttl Feb 3 '17 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.