[Mapserver-users] Map projections continued

Krzysztof Chodak k.chodak at autoguard.pl
Thu Mar 27 12:14:36 EST 2003


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




More information about the mapserver-users mailing list