C# 클래스 TestShapeFile.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.
파일 보기 프로젝트 열기: TNOCS/csTouch

공개 메소드들

메소드 설명
Read ( string fileName ) : void

Read both shapes and attributes from the given shapefile (and its corresponding dBASE file). This is the top-level method for reading an ESRI shapefile.

ReadAttributes ( string dbaseFile ) : void

Read the table from specified dBASE (DBF) file and merge the rows with shapefile records.

The filename of the dBASE file is expected to follow 8.3 naming conventions. If it doesn't follow the convention, we try to determine the 8.3 short name ourselves (but the name we come up with may not be correct in all cases).

ReadShapeFileHeader ( Stream stream ) : void

Read the file header of the shapefile.

ReadShapeFileRecord ( Stream stream ) : ShapeFileRecord

Read a shapefile record.

ReadShapes ( Stream stream ) : void

Read shapes (geometry) from the given stream.

ReadShapes ( string fileName ) : void

Read shapes (geometry) from the given shapefile.

ShapeFile ( ) : System

Constructor for the ShapeFile class.

ToString ( ) : string

Output the File Header in the form of a string.

비공개 메소드들

메소드 설명
MergeAttributes ( DataTable table ) : void

Merge data rows from the given table with the shapefile records.

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.

메소드 상세

Read() 공개 메소드

Read both shapes and attributes from the given shapefile (and its corresponding dBASE file). This is the top-level method for reading an ESRI shapefile.
public Read ( string fileName ) : void
fileName string Full pathname of the shapefile.
리턴 void

ReadAttributes() 공개 메소드

Read the table from specified dBASE (DBF) file and merge the rows with shapefile records.
The filename of the dBASE file is expected to follow 8.3 naming conventions. If it doesn't follow the convention, we try to determine the 8.3 short name ourselves (but the name we come up with may not be correct in all cases).
public ReadAttributes ( string dbaseFile ) : void
dbaseFile string Full file path of the dBASE (DBF) file.
리턴 void

ReadShapeFileHeader() 공개 메소드

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

ReadShapeFileRecord() 공개 메소드

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

ReadShapes() 공개 메소드

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

ReadShapes() 공개 메소드

Read shapes (geometry) from the given shapefile.
public ReadShapes ( string fileName ) : void
fileName string Full pathname of the shapefile.
리턴 void

ShapeFile() 공개 메소드

Constructor for the ShapeFile class.
public ShapeFile ( ) : System
리턴 System

ToString() 공개 메소드

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