[josm-dev] Problems creating TileSource for ArcGIS REST API

Josh Doe josh at joshdoe.com
Thu Feb 17 21:18:06 GMT 2011


>From that URL it appears your coordinates are already in ESRI:102113
(aka true EPSG:3857). If I convert my coordinates to 102113, and use
your URL, I get a blank image. If I drop imageSR=102113 from the URL,
I get an image but have the same problem of slight (5 meter or so)
misalignment between tiles.

I've looked at the actual response from the server (HTML or JSON
output) and it appears the requested tile corners aren't matching up
between adjacent tiles. Take these two tiles [1] [2]. From these URLs
the corners clearly match up, but the response from the server gives
different extents. This seems to be the problem, but I don't know the
resolution.

Thanks for your help, I may give up on this shortly and go for the
better but harder goal of using the ArcGIS REST tile cache. Not sure
how wise it is to start something harder before figuring out the
easier part however. :)

If anyone has ideas or I get inspiration I will try to get it working!

Thanks,
-Josh

[1]: http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/export?f=html&format=jpg&bbox=-8605127.770289,4691551.922088,-8604974.896232,4691399.048031&imageSR=&bboxSR=102113&size=256,256
[2]: http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/export?f=html&format=jpg&bbox=-8605127.770289,4691399.048031,-8604974.896232,4691246.173974&imageSR=&bboxSR=102113&size=256,256

On Thu, Feb 17, 2011 at 3:46 PM, Ian Dees <ian.dees at gmail.com> wrote:
> I don't have any more time to look at this right now, but this is the URL I
> use in my tile cache for this layer (I used it to map some of Virginia
> myself a while back):
> http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/export?f=image&format=jpg&bbox=$xmin,$ymin,$xmax,$ymax&imageSR=102113&bboxSR=102113&size=$width,$height&layers=show:0
> On Thu, Feb 17, 2011 at 2:39 PM, Josh Doe <josh at joshdoe.com> wrote:
>>
>> Ian,
>> Thanks for the fast response. I believe I tried that, but to make sure
>> I tried it again, and it doesn't work. For some reason with
>> imageSR=102113 I get a blank (white) image. For fun I also tried the
>> equivalent imageSR=102100 with no luck. You can see the request is
>> blank here [1], while clearing imageSR results in an image, though not
>> of the right projection. To be honest I don't really understand how
>> the imageSR relates to the bbox and bboxSR.
>>
>> Is it possible this instance of the ArcGIS server can't reproject the
>> image to this SR? I'm outside of my knowledge area if you haven't
>> guessed already. :)
>>
>> Thanks,
>> Josh
>>
>> [1]:
>> http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/export?bbox=-77.310791,38.794768,-77.308044,38.792627&size=256,256&bboxSR=4326&imageSR=102113&format=jpg&f=html
>> [2]:
>> http://gismaps.virginia.gov/arcgis2/rest/services/VBMP2006_2007/MapServer/export?bbox=-77.310791%2C38.794768%2C-77.308044%2C38.792627&bboxSR=4326&layers=&layerdefs=&size=256%2C256&imageSR=&format=jpg&transparent=false&dpi=&f=html
>>
>> On Thu, Feb 17, 2011 at 3:16 PM, Ian Dees <ian.dees at gmail.com> wrote:
>> > Use bboxSR=4326 (to specify the bounding box in 4326) and imageSR=102113
>> > to
>> > get the image back projected to Spherical Mercator.
>> > The imageSR parameter may be called something else, but I do know that
>> > an
>> > output projection option exists somewhere.
>> >
>> > On Thu, Feb 17, 2011 at 2:09 PM, Josh Doe <josh at joshdoe.com> wrote:
>> >>
>> >> Ian,
>> >> I've tried various combinations of spatial references and haven't
>> >> quite got it working. I use the tileYToLat/tileXToLon functions which
>> >> give me decimal degrees in WGS84 (EPSG:4326), so I can't use
>> >> bboxSR=102113 without converting those coordinates. With the Proj4J
>> >> plugin I used EPSG:3857 (equivalent to ESRI:102113 and ESRI:102100),
>> >> and that eliminates the gaps but now there are slight shifts between
>> >> each tile, so clearly something is still awry. I thought setting
>> >> imageSR=102113 would fix the slight shifts, but then I don't get any
>> >> image returned.
>> >>
>> >> Tobias,
>> >> I've found it very confusing to understand what spherical mercator is
>> >> and the various codes involved, so much so that I created a wiki page
>> >> on EPSG:3857 [1].
>> >>
>> >> All,
>> >> One thing that bothers me in JOSM is the Mercator projection claims to
>> >> be EPSG:3857, however it gives values in radians, not meters which
>> >> EPSG:3857 uses. I'm not even sure what EPSG/ESRI/etc identifier
>> >> corresponds to to this, but I think we should change it to avoid
>> >> confusion (took me a while to realize it was "wrong").
>> >>
>> >> Shouldn't we change this code to avoid confusion and to "be right"?
>> >> I'm guessing people use the projection, so we shouldn't "fix" it but
>> >> rather give it the correct code if we can find it or invent one,
>> >> probably via SpatialReference.org.
>> >>
>> >> Thanks,
>> >> -Josh
>> >>
>> >> [1]: http://wiki.openstreetmap.org/wiki/EPSG:3857
>> >>
>> >> On Thu, Feb 17, 2011 at 12:35 PM, Tobias Wendorff
>> >> <tobias.wendorff at tu-dortmund.de> wrote:
>> >> > Am 17.02.2011 17:15, schrieb Ian Dees:
>> >> >>
>> >> >> 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.
>> >> >
>> >> > Interesting information on this topic:
>> >> > http://forums.esri.com/Thread.asp?c=93&f=984&t=288073&g=1
>> >> >
>> >
>> >
>
>



More information about the josm-dev mailing list