NetTopologySuite
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
NetTopologySuite.IO.ShapefileWriter Class Reference

This class writes ESRI Shapefiles. More...

Inheritance diagram for NetTopologySuite.IO.ShapefileWriter:

Public Member Functions

 ShapefileWriter (string filename, ShapeGeometryType geomType)
 Initializes a buffered writer where you can write shapes individually to the file. More...
 
 ShapefileWriter (IGeometryFactory geometryFactory, string filename, ShapeGeometryType geomType)
 
 ShapefileWriter (IGeometryFactory geometryFactory)
 Initializes a new instance of the ShapefileWriter class with the given GeometryFactory. More...
 
void Close ()
 
void Write (IGeometry geometry)
 Adds a shape to the shapefile. You must have used the constrcutor with a filename to use this method! More...
 
void Write (string filename, IGeometryCollection geometryCollection)
 Method to write a collection of IGeometrys to a file named filename More...
 
void Dispose ()
 

Static Public Member Functions

static void WriteGeometryCollection (string filename, IGeometryCollection geometryCollection)
 Method to write a collection of geometries to a shapefile on disk. More...
 
static void WriteDummyDbf (string filename, int recordCount)
 

Properties

IGeometryFactory Factory [get, set]
 

Detailed Description

This class writes ESRI Shapefiles.

Constructor & Destructor Documentation

NetTopologySuite.IO.ShapefileWriter.ShapefileWriter ( string  filename,
ShapeGeometryType  geomType 
)

Initializes a buffered writer where you can write shapes individually to the file.

Parameters
filenameThe filename
geomTypeThe geometry type
NetTopologySuite.IO.ShapefileWriter.ShapefileWriter ( IGeometryFactory  geometryFactory)

Initializes a new instance of the ShapefileWriter class with the given GeometryFactory.

Parameters
geometryFactory

Member Function Documentation

void NetTopologySuite.IO.ShapefileWriter.Write ( IGeometry  geometry)

Adds a shape to the shapefile. You must have used the constrcutor with a filename to use this method!

Parameters
geometry
void NetTopologySuite.IO.ShapefileWriter.Write ( string  filename,
IGeometryCollection  geometryCollection 
)

Method to write a collection of IGeometrys to a file named filename

Assumes the type given for the first geometry is the same for all subsequent geometries. For example, is, if the first Geometry is a Multi-polygon/ Polygon, the subsequent geometies are Muli-polygon/ polygon and not lines or points. The dbase file for the corresponding shapefile contains one column called row. It contains the row number.

Parameters
filenameThe name of the file
geometryCollectionThe collection of geometries
static void NetTopologySuite.IO.ShapefileWriter.WriteDummyDbf ( string  filename,
int  recordCount 
)
static

Parameters
filename
recordCount
static void NetTopologySuite.IO.ShapefileWriter.WriteGeometryCollection ( string  filename,
IGeometryCollection  geometryCollection 
)
static

Method to write a collection of geometries to a shapefile on disk.

Assumes the type given for the first geometry is the same for all subsequent geometries. For example, is, if the first Geometry is a Multi-polygon/ Polygon, the subsequent geometies are Muli-polygon/ polygon and not lines or points. The dbase file for the corresponding shapefile contains one column called row. It contains the row number.

Parameters
filenameThe filename to write to (minus the .shp extension).
geometryCollectionThe GeometryCollection to write.

The documentation for this class was generated from the following file: