Image output pixel coordinates

Karel Cernohorsky cernohor at CENTRUM.CZ
Mon Dec 13 04:30:46 PST 2004


Hello folks,

I need an advice,

I am trying to develop small java application
where I am displaying a map as a background.

I wasn't able to succesfuly compile and rum Java mapscript on Windows
platform.
(I will post some questions to this problem later)

Now I am using php to prepare the map using PHP/MapScript.
And this page is returned as an png image.

I have a set of GPS positions and I can display them as a points in the map
using php
(which is able to set another layer and write points symbols there.)

$image=$map->draw();
$layer=$map->getLayerByName('add_points');

for ($n = 0; $n <sizeof($map_pointx); $n++) {
   $point[$n] = ms_newPointObj();
   $point[$n]->setXY($map_pointx[$n],$map_pointy[$n]);
   $point[$n]->draw($map,$layer,$image,0,'yuhuu');
 }

Is there any way how can I get the pixel coordinates of each point object I
have drawn in the "add_points" layer?

My output projection is default

 PROJECTION
       "proj=latlong"
       "ellps=WGS84"
       "datum=WGS84"
  END

I thought It could be easy to simply calculate them from height and width
and from the min and max
latitude and longitude of the returned map extent., am I right or wrong?
Can anybody help me or give me any advice?

Looking forward to read your hints,
Karel Cernohorsky.


Karel


---
Odchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
Verze: 6.0.802 / Virová báze: 545 - datum vydání: 26.11.2004



More information about the MapServer-users mailing list