[Gdal-dev] segfault in SHPCreateObject

Ari Jolma ari.jolma at tkk.fi
Mon Sep 12 10:41:16 EDT 2005


Any ideas why this segfaults:

my $fd = new ogr::FeatureDefn;
my $f = new ogr::Feature($fd);
my $g = new ogr::Geometry($ogr::wkbPolygon);
my $r = new ogr::Geometry($ogr::wkbLinearRing);
do this many times:        $r->AddPoint($lon,$lat);
$g->AddGeometry($r);
$g->CloseRings;
$f->SetGeometry($g);
$layer->CreateFeature($f);

layer should be ok, I probably need something more into those new's?

Ari

-- 
Prof. Ari Jolma
Kartografia ja Geoinformatiikka / Cartography and Geoinformatics
Teknillinen Korkeakoulu / Helsinki University of Technology
POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma




More information about the Gdal-dev mailing list