[mapserver-users] Strange coordinates used in GetFeatureInfo request

Anzel, Phil - NRCS, Fort Collins, CO Phil.Anzel at ftc.usda.gov
Mon Jun 25 06:49:05 PDT 2012


Hi, Daniel,

What a relief. Thank you so much for the clarification.

- Phil Anzel
       Contractor for USDA/NRCS
       ITC Web Soil Survey Team Member

Date: Sat, 23 Jun 2012 11:08:39 -0400
From: Daniel Morissette <dmorissette at mapgears.com>
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Strange coordinates used in
        GetFeatureInfo request
Message-ID: <4FE5DBF7.9000504 at mapgears.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

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.






This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.



More information about the mapserver-users mailing list