4.15.
ProjectionObj Class
Up one level
Constructor.
- Constant names and class member variable names are case-sensitive in PHP.
- Several MapScript functions (all those that access files in the back end such as ms_newMapObj(), drawMap(), etc.) will affect the value of the current working directory (CWD) in the PHP environment. This will be fixed eventually but in the meantime you should be careful about these side-effects.
Constructor:
ProjectionObjObj ms_newProjectionObj(string projectionstring)
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);