<div>Dear All ,</div>
<div> </div>
<div>I am trying to convert a raster to vector using GDALPolygonize function . Below is the code I am using<br clear="all"></div>
<div>GDALAllRegister(); 
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">String pszFilename = &quot;C:\\Images\\image.tiff&quot;;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">poDataset = (GDALDataset *) GDALOpen( pszFilename , GA_ReadOnly );</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">GDALRasterBand *poBandR,*poBandG,*poBandB;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">poBandR = poDataset-&gt;GetRasterBand(1);</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">OGRLayer* poLayer;</p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"></p>
<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">GDALPolygonize(poBandR , NULL , poLayer ,1,NULL,NULL,NULL);</p></div>
<div> </div>
<div> </div>
<div>The process is crashed in the polygonize function. I wonder what might be wrong with the above. (or should I assign memory to OGRLayer ?) </div>
<div> </div>
<div>Any suggestions/examples regarding the same are appreciated.</div>
<div> </div>
<div><br>-- <br>Regards,<br>Srikanth K.<br><br><br></div>