[Shapelib] help with SHPWriteObject
David.Gancarz at ci.orlando.fl.us
David.Gancarz at ci.orlando.fl.us
Fri Jun 16 10:04:16 PDT 2006
Jeff: Are you using the .NET bindings? If so, there is a newer version
that resolves some errors in the binding.
David Gancarz
"Jeff Mosch" <Jeff.Mosch at dtn.com>
Sent by: shapelib-bounces at lists.maptools.org
06/16/2006 12:53 PM
Please respond to
Shapelib Development <shapelib at lists.maptools.org>
To
<shapelib at lists.maptools.org>
cc
Subject
[Shapelib] help with SHPWriteObject
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 );
_______________________________________________
Shapelib mailing list
Shapelib at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/shapelib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20060616/530defa7/attachment.html>
More information about the Shapelib
mailing list