[Mapserver-users] Map projections continued

Krzysztof Chodak k.chodak@autoguard.pl
Thu, 27 Mar 2003 18:14:36 +0100


Hello again,

after some theoretical problems now I got practical one. Maybe someone have
an idea...

I use MapServer to serve some maps in Mercator. In server response I got an
extent.
My task is to tell in which coordinate of map image I should place another
symbol.
I got geographic coordinated of that symbol but non-projected (in WGS84
datum).
My first idea was to convert coordinates of that symbol into Mercator and
then compute image coordinates using simple proportion:
img_pixel_x = round ( (mercator_symbol_x - mercator_extent_min_x) *
image_width_in_pixels / (mercator_extent_max_x - mercator_extent_min_x) )
and similar one for y-coordinate.

As my symbols are floating around proper position on map image I know that a
have made a mistake.
Can anyone point it out for me?

Thanks in advance for any information,

Best regards,

Krzysztof Chodak

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users