[gdal-dev] OGR Multiple features to Shapefile
Frank Warmerdam
warmerdam at pobox.com
Wed May 7 15:31:08 EDT 2008
Andrea Battisti wrote:
>
> /* segfaulting: */
>
> #include "ogrsf_frmts.h"
>
> int main()
> {
>
> OGRMultiPoint * dpoly = new OGRMultiPoint();
>
> OGRPoint * point = new OGRPoint();
> point->setX( 42.0 );
> point->setY( 42.0 );
>
> OGRPoint * point2 = new OGRPoint();
> point2->setX( 4242.0 );
> point2->setY( 4242.0 );
>
> dpoly->addGeometryDirectly( point );
> dpoly->addGeometryDirectly( point2 );
>
> }
Andrea,
This runs cleanly for me on Linux.
I can't see any obvious reason it would fail on win32, though if you
explicitly destroyed dpoly with delete, the points would potentially
get deallocated on the wrong heap.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list