Friday 1 March 2019

openstreetmap - How can I create an adapter between the ArcGIS REST interface and WMS or TMS?


I'm trying to use imagery available via the ArcGIS REST tile cache interface, however the tool I'm using, JOSM, only supports WMS or TMS. In addition the data from the ArcGIS server is in a "special" projection, Virginia Lambert Conformal Conic, which doesn't have an ESRI or EPSG wkid but does have WKT provided by the server.


Is there a way using free or open source tools to convert the tiles available from the server to WMS/TMS? I know this would involve downloading multiple tiles, then mosaicking and reprojecting them to create tiles suitable for WMS/TMS. I've come across MapServer and GeoServer, which seem very capable, but I wouldn't know where to begin, so any pointers would be helpful.


The server I'm interested in is here: http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer



Answer



Yes, it should be possible to do this using the GDAL_WMS driver from GDAL. There is even an example at that page that points to another ArcGIS REST instance. However, I have not been able to make the concept work against this particular VBMP server. Against a slew of other ArcGIS servers with global-mercator output, no problem.



I believe I do not have the layer extents properly defined, or the tile levels, because I keep generating TMS requests that the server cannot respond to. Since I'm used to working with Spherical Mercator TMS requests, ones like this for TMS addresses in a local projection don't make much sense to me- http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/tile/0/83/68.jpg.


Below is the XML file I put together from the Service metadata page - http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer. You may be able to get some assistance in making this work from the GDAL developer forum. Once GDAL can properly access the service, you can point MapServer (the original one) at the XML file and run a WMS service that can reproject the data from EPSG:3698 to EPSG:900913 (or whatever code is now used).




http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/tile/${z}/${y}/${x}.jpg
VBMP
jpg
1.1.1



-384269.977874641
476583.633639972
404548.778455541
-48883.4062351487
13
1
1
top

EPSG:3968

512
512
3



Good luck.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...