[gdal-dev] reg GDALPolygonize

Srikanth srikanth1947 at gmail.com
Mon Nov 16 04:57:08 EST 2009


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091116/00b3988a/attachment.html


More information about the gdal-dev mailing list