[mapserver-users] catching GEOS errors in PHP mapscript

Joshua Hevenor jhevenor at rogers.com
Wed Oct 14 10:29:36 EDT 2009


I'm doing a fairly simple geo-processing script in PHP but I'm running into some trouble.  I have two polygon layers and I'm trying to look up all polygons from layer A that are not disjoint from layer B.  I'm also looking at specific area so if the polygon from layer B is bigger than my map extent I'm trying to clip (using shapeobj::intersection) to the map extent.   On occasion I'm getting GEOS errors that show up in my PHP error log and kill my script. The errors are from bad shapes (things like a rectangle built wrong so that it looks more like an hour glass). Is there a function to verify the shape?  I don't see one in the PHP documentation. Can I catch these errors somehow?  

Thanks in advance, 

Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091014/2b2d16ff/attachment.html


More information about the mapserver-users mailing list