[Mapserver-users] How to query (UTM) coordinates

Yusuf yusufad at myrealbox.com
Fri Jul 30 05:37:03 EDT 2004


Tyler Mitchell wrote:

>Hi Yusuf,
>I'm not quite clear on what you want to do, why don't you walk us through an 
>example of how a user would interact with your application.  Tell us what you 
>want to be able to do from an application use perspective, that will help us 
>out.
>
>Tyler
>  
>

Ok, I just want to have a pair of  text inputs in the map page where I
can write a UTM coordinate, and then be able to query mapserv CGI with
that coordinate.  Lets say that I want to ubicate 455000 mE 2105000 mN,
a UTM coordinate currently in my GPS, so I go to my CGI page, write
"455000" in the Easting field, and  "2105000 " in the Northing field,
and I get the query result from that coordinate (as if I had clicked in
that point in the map).

I believe queryByPoint() both in PHP/SWIGMapscript do exactly that (with
any coordinate system), but I would prefer a method not involving
*MapScript.  That would be a JavaScript function that converts the UTM
cordinates to the equivalent image point, and forges the proper URL,  or
a native metod in mapserv that would allow me to feed the coordinates
and get the query result.  The MapServer CGI Reference lists a mapserv
mode called COORDINATE, with a description of "To be clarified.", so I
don't know what it does nor how to use it, but sounds promising.

The second thing I wanted is the inverse: to obtain UTM coordinates from
the point clicked in the image (the IMGXY variable).

The third (this is brand new ;-) ) would be, after writing the UTM
coordinates in the form, to have them ubicated (with the + mark) in the
map.  But this one is really optional. ;-)






More information about the mapserver-users mailing list