[mapserver-users] projections [shpmidx] [shpmidy]
Marco
marco at mediaeval.nl
Wed Sep 11 00:14:48 PDT 2002
Hi list,
If the next question is a stupid one, excuse me. I am newbe.
context:
I use mapserv CGI (no mapscript) and a Apache webserver with PHP (on a windows machine for testing). I am building a web-application with dynamic maps.
problem:
I use a template file to get information about the map-features on the current map. The tags [shpmidx] and [shpmidy] provides information on the exact position of a feature (see http://mapserver.gis.umn.edu/doc36/template-reference.html ).
With simple lineair algebra it is possible to calculate the xy-position of this feature on the actual generated image. (a lineair transformation from "real world" lat-lon coordinates to "image" x-y pixelcoordinates).
I use these information to create some kind of javascript rollover interface; if the mouse hovers a feature, the webapplication respons immediately, without the need of connecting to the server.
So far so good. Everything works fine. So now for the problem. If I deploy a projection ("proj=stere") Nothing works anymore. That is because [shpmidx] and [shpmidy] gives the lon-lat stuff, but i need the xy coordanates on the generated image of the map. Sure it should be possible to write transformations for projected maps (a lot of sinus and cosinus, arctangens etcetera i suppose) but i believe that's a ticket to the nearest snake pit.
Is there a solution for this (withhout the need of writing my own transformation formulas)
Or, if I have to write transformation, does anybody now the formulas for this projection:
PROJECTION
"proj=stere"
"lat_0=52.156160556"
"lon_0=5.387638889"
"k=0.0000999908"
"x_0=0.000"
"y_0=0.000"
"ellps=bessel"
END
Cheers,
Marco
Marco Pieck, marco at mediaeval.nl
Mediaeval Vorm & Visie
http://www.mediaeval.nl/
postbus 1050, 6501 BB Nijmegen, the Netherlands
tel: ++ 31 24-3818196, fax: ++ 31 24-3818183
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020911/2ecec574/attachment.htm>
More information about the MapServer-users
mailing list