OGRGeometry::exportToWkb return buffer empty

المشرف العام

Administrator
طاقم الإدارة
I would like to export OGR Geometry in WKB format, so I used the function OGRGeometry::exportToWkb from OGR, the problem that the buffer returned by the function is empty and OGRERR_NONE is always returned.

int iSize = poGeom->WkbSize() ; // poGeom is OGRGeometry*if( iSize == 0 ) return 0;unsigned char *pabyData= new unsigned char[iSize] ;OGRErr eStatus = poGeom->exportToWkb( wkbXDR, pabyData) ;if( eStatus != OGRERR_NONE ) { delete[] pabyData; pabyData= 0; return 0 ;}Is anyone have a solution that solves the problem, please?

Best regards,



أكثر...
 
أعلى