<div dir="auto">Hello,<div dir="auto">Is there a way to get the OGRGeometry object out of a GDALDataset object in c++?</div><div dir="auto">My GDALDataset is a raster and i would like to get the associated OGRPolygon out of it.</div><div dir="auto">I've used:</div><div dir="auto">srcDataset->GetLayer(0)->GetNextFeature()->GetGeometryRef()->toPolygon()</div><div dir="auto">However i keep getting segmentation faults error.</div><div dir="auto">Any help would be appreciated.</div><div dir="auto">Thanks</div></div>