i  am Trying To Find Area of A Polygon
       with the Following Code

int main()    {    OGRRegisterAll();    OGRLayer *poLayer;
OGRFeature *poFeature;    OGRDataSource       *poDS;    poDS =
OGRSFDriverRegistrar::Open( "first.shp");    poLayer =
poDS->*GetLayerByName*( "first");    int
nCount=poDS->*GetLayerCount*();    printf("%d",nCount);
poLayer->*ResetReading*();    OGRGeometry *poGeometry;
OGRGeometryCollection *PoGC;
while((poFeature=poLayer->*GetNextFeature*())!=NULL)    {        int
nCnt=poFeature->GetFieldCount();        printf("\n %d",nCnt);
qDebug()<<"entered";        poGeometry=poFeature->GetGeometryRef();
     if(poGeometry !=NULL             &&
wkbFlatten(poGeometry->*getGeometryType*()) == wkbPolygon)       {
        PoGC->*addGeometry*(poGeometry);             double area =
PoGC->*get_Area*() ;            qDebug() << area ;         }    }
return 0;}

i am getting Error
With Regards
siva
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to