[Shapelib] .NET wrapper available

shapelib-admin at lists.maptools.org shapelib-admin at lists.maptools.org
Fri Jan 9 10:29:59 PST 2004


A first cut at developing .NET wrapper class for shapelib is now available 
on the shapelib site at 
http://shapelib.maptools.org/dl/contrib/DotNET_Framework_Support.zip. The 
zip file contains the following:

shapelib.cs is the C# wrapper for shapelib.  It is sprinkled liberally 
with C# XML documentation tags, both to provide intellisense capability 
for the the VS IDE, and to produce documentation.  Code comments are taken 
directly from the original shapelib documentation, with only a few minor 

The included shapelib.dll is compiled for Win32.

doc.xml was generated w/ Visual Studio  from the documentation tags.  It 
is included along with Anders Hejlsberg's doc.css and doc.xsl, which 
format doc.xml to HTML.

test.cs is a console app to test and demonstrate the wrapper.  The 
compiled version is also included as test.exe.

The wrapper class is pretty much a straight up implementation of shapelib, 
with the following exceptions:

1) In the DBFRead/WriteLogical functions I pass .NET boolean values
2) I made SHPT_* and SHPP_* constants into enumerations to be in keeping 
with .NET coding conventions.

I have not done anything with the quadtree functions in shapelib. 

Please send any comments, suggestions, bug reports, or whatever, to me at 
dgancarz at cfl.rr.com or david.gancarz at cityoforlando.net

David Gancarz, P.E.


I also posted some files for calling shapelib.dll from VB6, if anyone is 
interested.  See http://shapelib.maptools.org/dl/contrib/testvb/TestVB.zip 
and http://shapelib.maptools.org/dl/contrib/testvb/readme.pdf.  Please 
note that, in the VB test program, I incorrectly define my polygon 
vertices in counterclockwise order.  The shapefile format requires that 
polygon interiors be traversed in clockwise order (standard mathematical 
conventions notwithstanding :-( 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20040109/3a20043d/attachment.html>

More information about the Shapelib mailing list