[mapserver-users] Strange coordinates used in GetFeatureInfo request
Daniel Morissette
dmorissette at mapgears.com
Sat Jun 23 08:08:39 PDT 2012
On 12-06-23 11:00 AM, Daniel Morissette wrote:
> I didn't read your whole mail, but short answer is that I suspect you
> are overlooking the fact that in GetFeatureInfo, the X and Y coordinates
> are in pixels within the view of the map (which is 500x500 pixels in
> your example).
>
> So when you write x=0&y=0 that refers to the top-left corner of the map
> view, and not the 0,0 of the SRS coordinate system... which corresponds
> to longitude=-10, and latitude=+10. Actually, the x,y value is
> translated to be the center of the top-left pixel (and not its top-left
> boundary), which explains why you get lon,lat=9.98,9.98 in the query.
>
Please let me reword this last paragraph to make it a little more clear:
When you write X=0&Y=0 in your GetFeatureInfo request that refers to the
top-left corner of the map view which is located at longitude=-10, and
latitude=+10, and not to the 0.0,0.0 of the SRS=EPSG:4326 coordinate
system. Actually, the X,Y value is translated to be the center of the
top-left pixel (and not its top-left boundary), which explains why you
get lon,lat=-9.98,9.98 in the query.
--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000
More information about the MapServer-users
mailing list