C# Class Vishcious.ArcGIS.SLContrib.ShapeFile

The ShapeFile class represents the contents of a single ESRI shapefile. This is the class which contains functionality for reading shapefiles and their corresponding dBASE attribute files.
You can call the Read() method to import both shapes and attributes at once. Or, you can open the file stream yourself and read the file header or individual records one at a time. The advantage of this is that it allows you to implement your own progress reporting functionality, for example.
Datei anzeigen Open project: OliveiraThales/GeoCache Class Usage Examples

Public Methods

Method Description
Read ( FileInfo shapeFile, FileInfo dbfFile ) : void
ReadAttributes ( Stream stream ) : void
ReadDBFFile ( Stream stream ) : object>>.List
ReadShapeFileHeader ( Stream stream ) : void

Read the file header of the shapefile.

ReadShapeFileRecord ( Stream stream ) : ShapeFileRecord

Read a shapefile record.

ReadShapes ( FileInfo shapeFile ) : void

Read shapes (geometry) from the given shapefile.

ReadShapes ( Stream stream ) : void

Read shapes (geometry) from the given stream.

ShapeFile ( ) : System

Constructor for the ShapeFile class.

ToString ( ) : string

Output the File Header in the form of a string.

Private Methods

Method Description
ReadDouble64_LE ( Stream stream ) : double

Read an 8-byte double using little endian (Intel) byte ordering.

ReadInt32_BE ( Stream stream ) : int

Read a 4-byte integer using big endian byte ordering.

ReadInt32_LE ( Stream stream ) : int

Read a 4-byte integer using little endian (Intel) byte ordering.

ReadMultipoint ( Stream stream, ShapeFileRecord record ) : void

Read a shapefile MultiPoint record.

ReadPoint ( Stream stream, ShapeFileRecord record ) : void

Read a shapefile Point record.

ReadPolygon ( Stream stream, ShapeFileRecord record ) : void

Read a shapefile Polygon record.

Method Details

Read() public method

public Read ( FileInfo shapeFile, FileInfo dbfFile ) : void
shapeFile System.IO.FileInfo
dbfFile System.IO.FileInfo
return void

ReadAttributes() public method

public ReadAttributes ( Stream stream ) : void
stream Stream
return void

ReadDBFFile() public method

public ReadDBFFile ( Stream stream ) : object>>.List
stream Stream
return object>>.List

ReadShapeFileHeader() public method

Read the file header of the shapefile.
public ReadShapeFileHeader ( Stream stream ) : void
stream Stream Input stream.
return void

ReadShapeFileRecord() public method

Read a shapefile record.
public ReadShapeFileRecord ( Stream stream ) : ShapeFileRecord
stream Stream Input stream.
return ShapeFileRecord

ReadShapes() public method

Read shapes (geometry) from the given shapefile.
public ReadShapes ( FileInfo shapeFile ) : void
shapeFile System.IO.FileInfo
return void

ReadShapes() public method

Read shapes (geometry) from the given stream.
public ReadShapes ( Stream stream ) : void
stream Stream Input stream for a shapefile.
return void

ShapeFile() public method

Constructor for the ShapeFile class.
public ShapeFile ( ) : System
return System

ToString() public method

Output the File Header in the form of a string.
public ToString ( ) : string
return string