<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I had the same problem. The solution was to change the Mapserver,
before compiling, to use the "OGR" instead of "GEOS" in the routine
generation of WKT<br>
<br>
Moen, Paul T. escreveu:
<blockquote cite="mid:C5F93ECA.1B49C%25pmoen@nd.gov" type="cite">
<meta http-equiv="Context-Type"
content="text/html; charset=iso-8859-1">
<title>Re: [mapserver-users] Mapscript shapeObj->toWKt() or
ms_shapeObjfromWkt problem.</title>
<span>I changed my Geos to version 3.0.3 and the error changed from
“Segmentation fault” to “Bus error”.<br>
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.<br>
<br>
<?php<br>
dl('php_mapscript.so');<br>
$drawnShp = ms_newShapeObj(MS_SHAPE_POLYGON);<br>
$line = ms_newLineObj();<br>
$line->addXY(1207657,478875);<br>
$line->addXY(1208230,478275);<br>
$line->addXY(1207452,477811);<br>
$line->addXY(1207043,478520);<br>
$line->addXY(1207657,478875);<br>
$drawnShp->add($line);<br>
error_log($drawnShp->numlines);<br>
error_log($drawnShp->towkt());<br>
?><br>
<br>
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?<br>
<br>
Thanks,<br>
<br>
Paul<br>
<br>
On 4/1/09 12:33 PM, "Yewondwossen Assefa" <<a moz-do-not-send="true"
href="yassefa@dmsolutions.ca">yassefa@dmsolutions.ca</a>> wrote:<br>
<br>
</span>
<blockquote> <span>Not helping here but I have tested your script on
windows with Mapserver<br>
5.2.2 and 5.4 and the script runs ok. The geos version used in this<br>
case is geos 2.2.3. Do you know what version of geos you are using?<br>
There was a recent fix done toward geos support in MapServer and the<br>
problem from what I remember was occurring with geos 3.1 (Is that<br>
correct Tom ?)<br>
<br>
(<a moz-do-not-send="true"
href="http://trac.osgeo.org/mapserver/ticket/2929">http://trac.osgeo.org/mapserver/ticket/2929</a><br>
<br>
Best Regards<br>
<br>
Moen, Paul T. wrote:<br>
> I get a segmentation fault when I run the following simple script
with<br>
> PHP MapScript on Mac OSX 10.5.6 running the latest versions from<br>
> <a class="moz-txt-link-abbreviated" href="http://www.kyngchaos.com">www.kyngchaos.com</a><br>
><br>
> #!/usr/local/php5cgi/bin/php -q<br>
> <?php<br>
> dl('php_mapscript.so');<br>
> $newwkt = 'MULTIPOLYGON(((1207657 478875,1208230 478275,1207452<br>
> 477811,1207043 478520,1207657 478875)))';<br>
> $drawnShp = ms_shapeObjFromWkt($newwkt);<br>
> echo $drawnShp->toWKT();<br>
> ?><br>
><br>
> /Library/WebServer/CGI-Executables/mapserv -v<br>
> MapServer version 5.2.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP<br>
> OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE<br>
> SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT<br>
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER<br>
> SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS
INPUT=OGR<br>
> INPUT=GDAL INPUT=SHAPEFILE<br>
><br>
> The only output is;<br>
> Segmentation fault<br>
><br>
> The php version is 5.2.9 and the same thing happens with php
versions<br>
> 5.2.8, 5.2.5.<br>
><br>
> *MapServer Version *MapServer version 5.2.2 OUTPUT=GIF
OUTPUT=PNG<br>
> OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ
SUPPORTS=AGG<br>
> SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT<br>
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER<br>
> SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS
INPUT=OGR<br>
> INPUT=GDAL INPUT=SHAPEFILE<br>
> *PHP MapScript Version *($Revision: 7937 $ $Date: 2008-09-30
07:37:46<br>
> -0700 (Tue, 30 Sep 2008) $)<br>
><br>
><br>
> Anybody else run into this this error? How do I get more debug
information?<br>
><br>
><br>
> Thanks,<br>
><br>
> Paul<br>
><br>
><br>
>
------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> <a moz-do-not-send="true" href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<br>
--<br>
----------------------------------------------------------------<br>
Assefa Yewondwossen<br>
Software Analyst<br>
<br>
Email: <a moz-do-not-send="true" href="assefa@dmsolutions.ca">assefa@dmsolutions.ca</a><br>
<a moz-do-not-send="true" href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</a><br>
<br>
Phone: (613) 565-5056 (ext 14)<br>
Fax: (613) 565-0925<br>
----------------------------------------------------------------<br>
</span> </blockquote>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Edmar Moretti
CGTI/MMA
Área de Gestão de Geotecnologias
Gerente de Projetos
blog: <a class="moz-txt-link-freetext" href="http://edmarmoretti.blogspot.com/">http://edmarmoretti.blogspot.com/</a>
skype: edmar.moretti</pre>
</body>
</html>