Don't reproject your coordinates to Virginia, just tell ArcGIS that your request bounding box is in Spherical Mercator projection by passing in a projection id of 102113.
On Thu, Feb 17, 2011 at 10:04 AM, Josh Doe <[email protected]> wrote: > As I've mentioned on this list, I'm interested in support in JOSM for > the ArcGIS REST API [1], as my location (Virginia, USA [2]) has very > good quality (1ft resolution, off-leaf), public domain imagery, but is > only available via that API. > > Ian Dees suggested I extend AbstractOsmTileSource and convert the > requested tile x/y/zoom to coordinates, and then use the export > interface of Arc GIS REST [3] to request the tile. I've implemented > this, and I'm happy to see that the imagery lines up correctly, > however there are gaps between vertical tiles, which you can see in > this image [4]. You can view the code here [5]. > > Why might this be happening? I'm guessing it has something to do with > projection differences, but I don't really know. > > The Virginia ArcGIS REST server uses the Virginia LCC projection, so I > first convert the tile x/y/zoom to WGS84 lat/lon corners, convert > those to Virginia LCC using the Proj4J plugin [6], then submit the URL > to the server. > > I know this should be a temporary solution anyways, as I should be > using the tile cache provided by the server, however it seems more > difficult to implement considering the tiling scheme is completely > different than the mercator system used by TMS, so I'd need to do more > than just create a TileSource, but rather assumptions about resolution > and zoom levels must be changed in other JOSM code. > > Any thoughts would be appreciated, thanks! > -Josh > > [1]: http://resources.esri.com/help/9.3/arcgisserver/apis/rest/index.html > [2]: > http://wiki.openstreetmap.org/wiki/Virginia#2006.2F2007_VBMP_Orthoimagery > [3]: http://resources.esri.com/help/9.3/arcgisserver/apis/rest/export.html > [4]: http://postimage.org/image/7g16nd6s/ > [5]: http://java.pastecode.com/2183 > [6]: http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Proj4J > > _______________________________________________ > josm-dev mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/josm-dev > _______________________________________________ josm-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/josm-dev

