Hi, Using C++ I try to buffers from LineStrings,Then I want to union the resulting polygons with UnionCascaded. But at UnionCascaded operation failed with: "error: ‘class std::vector<OGRPolygon*>’ has no member named ‘UnionCascaded’ OGRGeometry *result=polyCollect.UnionCascaded(); " Can you tell me what I am doing wrong?
here is the related code fragment: std::vector<OGRPolygon * > polyCollect ; //OGRGeometryCollection *polyCollect ; while( (poFeature = poLayer->GetNextFeature()) != NULL ) { OGRGeometry *poGeometry = poFeature->GetGeometryRef(); if( poGeometry != NULL && wkbFlatten(poGeometry->getGeometryType()) == wkbLineString ) { OGRLineString *poLine = (OGRLineString *) poGeometry; // OGRGeometry *bufGeometry = poLine->Buffer(100,30); OGRPolygon *bufPoly= static_cast<OGRPolygon *> (bufGeometry) ; printf( "%s \n", bufPoly->getGeometryName()); //polyCollect->addGeometryDirectly (bufPoly ); polyCollect.push_back(bufPoly ); } else { printf( "no point geometry\n" ); } OGRFeature::DestroyFeature( poFeature ); } OGRGeometry *result=polyCollect.UnionCascaded(); -- Ahmet Temiz Jeoloji Müh. Afet ve Acil Durum Yönetimi Başkanlığı Bilgi İşlem Dairesi Başkanlığı-CBS Grubu ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev