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

Daniel Morissette morissette at dmsolutions.ca
Tue Mar 4 22:38:08 EST 2003


FYI I have applied the 3.7 fix for this problem in the 3.6.5-dev version
in CVS.  You can get it using 'cvs update -r rel-3-6-0-beta1'.

With this fix, the project() methods return MS_SUCCESS/MS_FAILURE and
operate on the object itself, so they do not try to return a new object
instance.

Daniel


Chris Black wrote:
> 
> Ok, I'll download the 3.7 binaries and see if that helps.  Thanks for
> the info.
> 
> -- Chris
> 
> Daniel Morissette wrote:
> 
> > 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.
> >
> >
> >



More information about the mapserver-users mailing list