Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
1  
I'm probably missing something, but why don't you enable the WMS capability of your map service: help.arcgis.com/en/arcgisserver/10.0/help/… –  GuillaumeC Feb 18 '11 at 7:22
    
I presume you have no access to the ESRI REST server / cannot make changes. Do you have rights to download and modify the data? –  geographika Feb 18 '11 at 11:20
    
I certainly don't have access. I'm only a lowly resident of Virginia hoping to use the data. I suppose I could ask for the data or make a FOIA request, but I'm not sure if I could cope with that amount of data, especially to make it available to other OpenStreetMap contributors. I did just ask the agency hosting the server if they're considering enabling WMS/TMS. –  joshdoe Feb 18 '11 at 12:50
    
prj2epsg claims the projection is epsg:3968 which will help somewhat. –  iant Feb 18 '11 at 15:16
add comment

1 Answer

up vote 1 down vote accepted

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).

<GDAL_WMS>
  <Service name="TMS">        
  <ServerUrl>http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/tile/${z}/${y}/${x}.jpg</ServerUrl>
    <Layer>VBMP</Layer>
    <Format>jpg</Format>
    <Version>1.1.1</Version>
  </Service>
  <DataWindow>
    <UpperLeftX>-384269.977874641</UpperLeftX>
    <UpperLeftY>476583.633639972</UpperLeftY>
    <LowerRightX>404548.778455541</LowerRightX>
    <LowerRightY>-48883.4062351487</LowerRightY>
    <TileLevel>13</TileLevel>
    <TileCountX>1</TileCountX>
    <TileCountY>1</TileCountY>
    <YOrigin>top</YOrigin>
  </DataWindow>
  <Projection>EPSG:3968</Projection>
  <BlockSizeX>512</BlockSizeX>
  <BlockSizeY>512</BlockSizeY>
  <BandsCount>3</BandsCount>
  <Cache />
</GDAL_WMS>

Good luck.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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