[Mapserver-users] documentation bug (was Re: projecting a point in PHP MapScript)

Daniel Morissette morissette at dmsolutions.ca
Tue Mar 4 17:21:10 EST 2003


Chris Black wrote:
> 
> Eric Bridger wrote:
> 
> >Chris,
> >1) pointObj->project() does not return a point, it just reprojects the
> >pointObj, so getting a null is not an error.
> >
> 
> In that case, the online PHP class documentation should be modified.
>  The doc at
> http://mapserver.gis.umn.edu/doc36/phpmapscript-class-guide.html#proj
> has this code snippet:
> 

Actually the 3.6 version "tries to" return a point but it's broken, it
returns a point with an invalid internal poinObj reference, and the
initial object is updated internally but the PHP wrapper is not, if you
continue to play with the returned object you'll eventually end up with
a crash.  In 3.7 it won't return a point any more, instead it updates
the point on which the project() method is called.

I think your problem is simply that the project() method is broken in
3.6 and cannot be relied upon.  I'll see if I could backport the 3.7
changes to 3.6, I just hoped that we could avoid that since very few
people seemed to use those methods.  The other option would be for you
to use 3.7 in which the project() method works very well.

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-users mailing list