[mapserver-users] Using Proj.4 from PHP MapScript

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri Dec 3 10:38:21 PST 2010


On 10-12-03 1:55 PM, Peter Hopfgartner wrote:
> In some elder posts i've found some reference to a PHP binding for Proj.4, http://stackoverflow.com/questions/1939837/gis-spatial-functions-in-php,  which seems it was included with MapServer.
> Anyway, if I have something like:
>
> <?php
> $projarray[0] = "proj=lcc";
>                $projarray[1] = "ellps=GRS80";
>                $projarray[2] = "lat_0=49";
>                $projarray[3] = "lon_0=-95";
>                $projarray[4] = "lat_1=49";
>                $projarray[5] = "lat_2=77";
>
>                $pj = pj_init($projarray);
> ?>
>
> I get
> PHP Fatal error:  Call to undefined function pj_init() in /data/sites/test/proj.php on line 9
>
> MapServer is version 5.6.5 from http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS, PHP MapScript is installed and included as a module.
>

Hello,

I'll be honest, I don't use these PHP/Proj bindings...but a quick search 
of the email archives returns instructions on how to compile this 
support: 
http://www.osgeo.org/pipermail/mapserver-users/2002-July/036165.html

Others may have more uptodate advice for you.

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/





More information about the MapServer-users mailing list