[Shapelib] help with SHPWriteObject
Jeff Mosch
Jeff.Mosch at dtn.com
Fri Jun 16 12:53:11 EDT 2006
I am having problems whenever I call the SHPWriteObject routine. I'm
able call all of the other routines that I need. I get an 'Access
Violation' when making the call to SHPWriteObject. Are there any common
mistakes that I could check? Any guidance would be greatly appreciated.
Thanks... Jeff
hShape = SHPCreate( szRemotePath, SHPT_POLYGON );
hDBF = DBFCreate( szRemotePath );
vPolygonNum.vt = VT_I4;
vPolygonNum.iVal = 0;
KSHAPEFILES_AddFieldsToDBFNoConnection( hDBF, nTypeInteger,
vPolygonNum, nPrecision1, nNumericScale0, strPolygonNumber );
phObject = SHPCreateSimpleObject(
SHPT_POLYGON, knotCounter, dXPos, dYPos, dZPos );
// nObject = SHPWriteObject( hShape,
knotCounter, phObject );
SHPDestroyObject( phObject );
// Polygon Number
vPolygonNum.iVal = nThisPolygonNum;
KSHAPEFILES_WriteAttributeToDBF(
hDBF, knotCounter, 0, nTypeInteger, vPolygonNum.iVal );
DBFClose( hDBF );
SHPClose( hShape );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/shapelib/attachments/20060616/5010e85d/attachment.html
More information about the Shapelib
mailing list