On the fly RASTER warping
Marc Monnerat
marc.monnerat at BLUEWIN.CH
Wed Apr 12 09:33:29 PDT 2006
Hi,
I think you could use the ProjectionObj in Mapscript to convert your points:
http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/classes/projectionobj
Copied/pasted from the above link::
Creates a projection object based on the projection string passed as
argument.
Eg : $projInObj = ms_newprojectionobj("proj=latlong") will create a
geographic projection class.
Eg of usage : the following example will convert a lat/long point to an
LCC projection :
$projInObj = ms_newprojectionobj("proj=latlong");
$projOutObj = ms_newprojectionobj("proj=lcc,ellps=GRS80,lat_0=49,".
"lon_0=-95,lat_1=49,lat_2=77");
$poPoint = ms_newpointobj();
$poPoint->setXY(-92.0, 62.0);
$poPoint->project($projInObj, $projOutObj);
So replace the parameters according to your projections
Marc Monnerat
Michael S. Birkmose wrote:
>> Hello,
>>
>> If your EXTENT are degrees (-180 -90 180 90), so your UNITS should be
> DD
>> and not METERS and this should match your map projection setting.
>> And if your wms server is Danmark only, try focusing on Danmark, not
> the
>> world!
>>
>> Didn't found any epsg:54004, is it standard ?
>>
>> Marc Monnerat
>
> Hi Marc
>
> Your input helped me further - now I can actually generate the map with
> the 54004 (Mercator) projection).
>
> However I have a bit of a problem.
>
> In my PHP mapscript I can only display something by using the
> coordinates in meters as you supplied it:
>
>
> $gpoMap = ms_newMapObj("wmsmmap.map");
> $gpoMap->setExtent(868292.03, 7135562.57, 1447153.38, 7931049.58);
>
> However I would like to set the extent using degrees - i.e:
>
> $gpoMap->setExtent(7.8, 54, 13, 58);
>
> How would I do this?
> Alternativly how could I convert my degrees to meters as you supplied
> it?
>
> Best regards,
> Michael
>
>
More information about the MapServer-users
mailing list