C# 클래스 MapAround.IO.ShapeFile

Represents an ESRI Shape-file. Implements methods for reading and writing.
파일 보기 프로젝트 열기: gkrsu/maparound.core 1 사용 예제들

공개 메소드들

메소드 설명
GetDbaseHeader ( DbaseFieldDescriptor dbFields, int count ) : DbaseFileHeader

Generates a dBase file header.

GetDbaseHeader ( Feature feature, List attributeNames, int count ) : DbaseFileHeader

Gets a stub of dBase file header

GetDbaseHeader ( string dbfFile ) : DbaseFileHeader

Gets the header from a dbf file.

GetShapeType ( IGeometry geom ) : ShapeType

Given a geomtery object, returns the equilivent shape file type.

Read ( string fileName, BoundingRectangle bounds ) : void

Reads a shape-file data (geometries and attributes).

ReadAttributes ( string dbaseFile ) : void

Reads a dBase file and merges dBase records with shapes.

ReadHeader ( Stream stream ) : void

Reads the header oe shape-file. Headers are placed into .shp and .shx files.

ReadIndex ( string fileName ) : int[]

Reads the index of shape-file.

ReadRecord ( Stream stream, int recordOffset, BoundingRectangle bounds ) : ShapeFileRecord

Reads a record from the specified stream.

ReadShapes ( Stream stream, int offsets, BoundingRectangle bounds ) : void

Reads the shapes from specified stream.

ReadShapes ( string fileName, int offsets, BoundingRectangle bounds ) : void

Reads the shapes of shape-file.

ShapeFile ( ) : System

Initializes a new instance of MapAround.IO.Shapefile.

ToString ( ) : string

Returns a System.String that represents the current MapAround.IO.ShapeFiler.

Write ( string fileName, ICollection features ) : void

Writes a collection of features into the shape-file.

WriteAttributes ( string dbaseFile, ICollection featureCollection ) : void

Writes the attribute file.

WriteShapes ( string filename, GeometryCollection geometryCollection ) : void

Writes shapes.

비공개 메소드들

메소드 설명
GetShapeHandler ( ShapeType type ) : ShapeHandler

Returns the appropriate class to convert a shaperecord to an MapAround geometry given the type of shape.

MergeAttributes ( DataTable table ) : void

Merges attribute rows with the shape file records.

RecountColumnLengths ( DbaseFileHeader DbaseHeader, IEnumerable Features ) : void

Computes the sizes of attribute fileds taking into accound attribute values of the features.

RecountRecords ( DbaseFileHeader DbaseHeader, IEnumerable Features ) : void

Computes the count of DBF records

isRecordInView ( BoundingRectangle bounds, ShapeFileRecord record ) : bool

메소드 상세

GetDbaseHeader() 공개 정적인 메소드

Generates a dBase file header.
public static GetDbaseHeader ( DbaseFieldDescriptor dbFields, int count ) : DbaseFileHeader
dbFields DbaseFieldDescriptor An array containing the dBase filed descriptors
count int The record count
리턴 DbaseFileHeader

GetDbaseHeader() 공개 정적인 메소드

Gets a stub of dBase file header
public static GetDbaseHeader ( Feature feature, List attributeNames, int count ) : DbaseFileHeader
feature Feature The feature
attributeNames List A list containing the attribute names
count int The record count
리턴 DbaseFileHeader

GetDbaseHeader() 공개 정적인 메소드

Gets the header from a dbf file.
public static GetDbaseHeader ( string dbfFile ) : DbaseFileHeader
dbfFile string The DBF file.
리턴 DbaseFileHeader

GetShapeType() 공개 정적인 메소드

Given a geomtery object, returns the equilivent shape file type.
public static GetShapeType ( IGeometry geom ) : ShapeType
geom IGeometry A Geometry object.
리턴 ShapeType

Read() 공개 메소드

Reads a shape-file data (geometries and attributes).
public Read ( string fileName, BoundingRectangle bounds ) : void
fileName string The file name
bounds BoundingRectangle The bounding rectangle. Only those records are read, /// which bounding rectangles intersect with this rectangle
리턴 void

ReadAttributes() 공개 메소드

Reads a dBase file and merges dBase records with shapes.
public ReadAttributes ( string dbaseFile ) : void
dbaseFile string The dBase file name
리턴 void

ReadHeader() 공개 메소드

Reads the header oe shape-file. Headers are placed into .shp and .shx files.
public ReadHeader ( Stream stream ) : void
stream Stream A System.IO.Stream instance to read
리턴 void

ReadIndex() 공개 메소드

Reads the index of shape-file.
public ReadIndex ( string fileName ) : int[]
fileName string The file name
리턴 int[]

ReadRecord() 공개 메소드

Reads a record from the specified stream.
public ReadRecord ( Stream stream, int recordOffset, BoundingRectangle bounds ) : ShapeFileRecord
stream Stream A System.IO.Stream instance to read
recordOffset int An offset of record
bounds BoundingRectangle An object representing a bounds of the reading area
리턴 ShapeFileRecord

ReadShapes() 공개 메소드

Reads the shapes from specified stream.
public ReadShapes ( Stream stream, int offsets, BoundingRectangle bounds ) : void
stream Stream A System.IO.Stream instance to read shapes
offsets int An array containing the offset of records to read
bounds BoundingRectangle The bounding rectangle. Only those records are read, /// which bounding rectangles intersect with this rectangle
리턴 void

ReadShapes() 공개 메소드

Reads the shapes of shape-file.
public ReadShapes ( string fileName, int offsets, BoundingRectangle bounds ) : void
fileName string The file name
offsets int An array containing offsets of the records to read
bounds BoundingRectangle The bounding rectangle. Only those records are read, /// which bounding rectangles intersect with this rectangle
리턴 void

ShapeFile() 공개 메소드

Initializes a new instance of MapAround.IO.Shapefile.
public ShapeFile ( ) : System
리턴 System

ToString() 공개 메소드

Returns a System.String that represents the current MapAround.IO.ShapeFiler.
public ToString ( ) : string
리턴 string

Write() 공개 메소드

Writes a collection of features into the shape-file.
public Write ( string fileName, ICollection features ) : void
fileName string The string defining file name without .shp extension
features ICollection The collection of features to write
리턴 void

WriteAttributes() 공개 메소드

Writes the attribute file.
public WriteAttributes ( string dbaseFile, ICollection featureCollection ) : void
dbaseFile string file attributes
featureCollection ICollection A collection containing features which attributes is to be written
리턴 void

WriteShapes() 공개 메소드

Writes shapes.
public WriteShapes ( string filename, GeometryCollection geometryCollection ) : void
filename string The string value defining shape file name without .shp extension
geometryCollection GeometryCollection MapAround.Geometry.GeometryCollection instance containing /// the geometries to write to shape file
리턴 void