C# Class Shapefile.Shape

Afficher le fichier Open project: TNOCS/csTouch Class Usage Examples

Méthodes publiques

Méthode Description
GetMetadata ( string name ) : string

Gets the metadata (as a string) for a given name (key). Valid names for this shape can be retrieved by calling GetMetadataNames().

GetMetadataNames ( ) : string[]

Gets an array of valid metadata names (keys) for this shape. Returns null if not metadata exists.

Méthodes protégées

Méthode Description
ParseBoundingBox ( byte value, int startIndex, ProvidedOrder order ) : RectangleD

Extracts a double precision rectangle (RectangleD) from a byte array - assumes that the called has validated that there is enough space in the byte array for four doubles (32 bytes)

ParsePolyLineOrPolygon ( byte shapeData, RectangleD &boundingBox, List &parts ) : void

The PolyLine and Polygon shapes share the same structure, this method parses the bounding box and list of parts for both

ParsePolygonZ ( byte shapeData, RectangleD &boundingBox, List &parts ) : void

The PolygonZ shape share the same structure, this method parses the bounding box and list of parts for both

Shape ( ShapeType shapeType, int recordNumber, StringDictionary metadata, IDataRecord dataRecord ) : System

Base Shapefile shape - contains only the shape type and metadata plus helper methods. An instance of Shape is the Null ShapeType. If the Type field is not ShapeType.Null then cast to the more specific shape (i.e. ShapePolygon).

Method Details

GetMetadata() public méthode

Gets the metadata (as a string) for a given name (key). Valid names for this shape can be retrieved by calling GetMetadataNames().
public GetMetadata ( string name ) : string
name string The name to retreieve
Résultat string

GetMetadataNames() public méthode

Gets an array of valid metadata names (keys) for this shape. Returns null if not metadata exists.
public GetMetadataNames ( ) : string[]
Résultat string[]

ParseBoundingBox() protected méthode

Extracts a double precision rectangle (RectangleD) from a byte array - assumes that the called has validated that there is enough space in the byte array for four doubles (32 bytes)
protected ParseBoundingBox ( byte value, int startIndex, ProvidedOrder order ) : RectangleD
value byte byte array
startIndex int start index in the array
order ProvidedOrder byte order of the doubles to be extracted
Résultat RectangleD

ParsePolyLineOrPolygon() protected méthode

The PolyLine and Polygon shapes share the same structure, this method parses the bounding box and list of parts for both
protected ParsePolyLineOrPolygon ( byte shapeData, RectangleD &boundingBox, List &parts ) : void
shapeData byte The shape record as a byte array
boundingBox RectangleD Returns the bounding box
parts List Returns the list of parts
Résultat void

ParsePolygonZ() protected méthode

The PolygonZ shape share the same structure, this method parses the bounding box and list of parts for both
protected ParsePolygonZ ( byte shapeData, RectangleD &boundingBox, List &parts ) : void
shapeData byte The shape record as a byte array
boundingBox RectangleD Returns the bounding box
parts List Returns the list of parts
Résultat void

Shape() protected méthode

Base Shapefile shape - contains only the shape type and metadata plus helper methods. An instance of Shape is the Null ShapeType. If the Type field is not ShapeType.Null then cast to the more specific shape (i.e. ShapePolygon).
protected Shape ( ShapeType shapeType, int recordNumber, StringDictionary metadata, IDataRecord dataRecord ) : System
shapeType ShapeType The ShapeType of the shape
recordNumber int The record number in the Shapefile
metadata System.Collections.Specialized.StringDictionary Metadata about the shape (optional)
dataRecord IDataRecord IDataRecord associated with the shape
Résultat System