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

Chris Black cblack at CalAcademy.Org
Tue Mar 4 17:35:15 EST 2003


--------------090702040709000501040409
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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.
>
>  
>


--------------090702040709000501040409
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
Ok, I'll download the 3.7 binaries and see if that helps. &nbsp;Thanks for the
info.<br>
<br>
-- Chris<br>
<br>
Daniel Morissette wrote:<br>
<blockquote type="cite" cite="mid3E6526D6.1EF85B21 at dmsolutions.ca">
  <pre wrap="">Chris Black wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Eric Bridger wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">Chris,
1) pointObj-&gt;project() does not return a point, it just reprojects the
pointObj, so getting a null is not an error.

      </pre>
    </blockquote>
    <pre wrap="">In that case, the online PHP class documentation should be modified.
 The doc at
<a class="moz-txt-link-freetext" href="http://mapserver.gis.umn.edu/doc36/phpmapscript-class-guide.html#proj">http://mapserver.gis.umn.edu/doc36/phpmapscript-class-guide.html#proj</a>
has this code snippet:

    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

  </pre>
</blockquote>
<br>
</body>
</html>

--------------090702040709000501040409--




More information about the mapserver-users mailing list