[geos-devel] segfault against 3.3.0 C++

Matt Perry perrygeo at gmail.com
Fri Sep 9 13:54:01 EDT 2011


On Fri, Sep 9, 2011 at 10:46 AM, Peter Körner <osm-lists at mazdermind.de> wrote:
>> src/traverser/traverser.cc: In member function ‘void
>> Traverser::processPolygon(OGRPolygon*)’:
>> src/traverser/traverser.cc:407:71: error: cannot dynamic_cast
>>
>> ‘poly->OGRPolygon::<anonymous>.OGRSurface::<anonymous>.OGRGeometry::exportToGEOS()’
>> (of type ‘struct GEOSGeom_t*’) to type ‘class geos::geom::Polygon*’
>> (source is a pointer to incomplete type)
>
> GEOSGeom_t is from the C-interface of GEOS while Polygon* is from the C++
> interface.
>
> Seems OGR's exportToGEOS() followed the recommendation* and implemented the
> C-wrapper instead of the C++ library.
>
> Peter
>
>
> *) the docs say, that the C-wrapper is recommended and the C++ interface is
> not, although I don't really know why.

Interesting. Well that likely explains it but I'm somewhat at a loss
as to why this changed from GEOS 3.2.2 to 3.3.0.

Any ideas on potential solutions?

-- 
·´¯`·.¸. , . .·´¯`·.. ><((((º>`·.¸¸.·´¯`·.¸.·´¯`·...¸><((((º>
"The best way to predict the future is to invent it."  -- Alan Kay
Matthew T. Perry
http://www.perrygeo.net
http://viedevelo.wordpress.com


More information about the geos-devel mailing list