Dear All , I am trying to convert a raster to vector using GDALPolygonize function . Below is the code I am using GDALAllRegister();
String pszFilename = "C:\\Images\\image.tiff"; poDataset = (GDALDataset *) GDALOpen( pszFilename , GA_ReadOnly ); GDALRasterBand *poBandR,*poBandG,*poBandB; poBandR = poDataset->GetRasterBand(1); OGRLayer* poLayer; GDALPolygonize(poBandR , NULL , poLayer ,1,NULL,NULL,NULL); The process is crashed in the polygonize function. I wonder what might be wrong with the above. (or should I assign memory to OGRLayer ?) Any suggestions/examples regarding the same are appreciated. -- Regards, Srikanth K.
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev