[mapserver-users] Mapscript shapeObj->toWKt() orms_shapeObjfromWkt problem.

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Apr 3 12:35:07 EDT 2009


Just an update, this will be fixed in the upcoming 5.4 release.

Steve

>>> "Moen, Paul T." <pmoen at nd.gov> 04/01/09 3:55 PM >>>
I changed my Geos to version 3.0.3 and the error changed from "Segmentation fault" to "Bus error".
I also looked at the ticket Assefa indicated below and am wondering if that was related to the buffer or to the same problem I am having?  The script I am having problems does nothing more than create a new shape object from a wkt and then re-output the wkt from the shape object.  The object seems to be created fine, because I can get the number of lines with $drawnShp->numlines.  I can also create a new shape object with the other shape object constructer as follows and the output works.

<Xphp
    dl('php_mapscript.so');
    $drawnShp = ms_newShapeObj(MS_SHAPE_POLYGON);
    $line = ms_newLineObj();
    $line->addXY(1207657,478875);
    $line->addXY(1208230,478275);
    $line->addXY(1207452,477811);
    $line->addXY(1207043,478520);
    $line->addXY(1207657,478875);
    $drawnShp->add($line);
    error_log($drawnShp->numlines);
    error_log($drawnShp->towkt());
?>

Is this specifically a problem with Geos 3.1 and the function ms_shapeObjFromWkt()?  Which version of Mapserver will have the patch in ticket 2929?

Thanks,

Paul

On 4/1/09 12:33 PM, "Yewondwossen Assefa" <yassefa at dmsolutions.ca> wrote:

Not helping here but I have tested your script on windows with Mapserver
  5.2.2 and 5.4 and the script runs ok. The geos version used in this
case is geos 2.2.3. Do you know what version of geos you are using?
There was a recent fix done toward geos support in MapServer and the
problem from what I remember was occurring with geos 3.1 (Is that
correct Tom ?)

  (http://trac.osgeo.org/mapserver/ticket/2929

Best Regards

Moen, Paul T. wrote:
> I get a segmentation fault when I run the following simple script with
> PHP MapScript on Mac OSX 10.5.6 running the latest versions from
> www.kyngchaos.com
>
> #!/usr/local/php5cgi/bin/php -q
> <Xphp
>     dl('php_mapscript.so');
>     $newwkt = 'MULTIPOLYGON(((1207657 478875,1208230 478275,1207452
> 477811,1207043 478520,1207657 478875)))';
>     $drawnShp = ms_shapeObjFromWkt($newwkt);
>     echo $drawnShp->toWKT();
> ?>
>
> /Library/WebServer/CGI-Executables/mapserv -v
> MapServer version 5.2.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
> SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
>
> The only output is;
> Segmentation fault
>
> The php version is 5.2.9 and the same thing happens with php versions
> 5.2.8, 5.2.5.
>
> *MapServer Version    *MapServer version 5.2.2 OUTPUT=GIF OUTPUT=PNG
> OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG
> SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
> *PHP MapScript Version    *($Revision: 7937 $ $Date: 2008-09-30 07:37:46
> -0700 (Tue, 30 Sep 2008) $)
>
>
> Anybody else run into this this error?  How do I get more debug information?
>
>
> Thanks,
>
> Paul
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list