C# Класс Shapefile.Shape

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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).

Описание методов

GetMetadata() публичный Метод

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
Результат string

GetMetadataNames() публичный Метод

Gets an array of valid metadata names (keys) for this shape. Returns null if not metadata exists.
public GetMetadataNames ( ) : string[]
Результат string[]

ParseBoundingBox() защищенный Метод

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
Результат RectangleD

ParsePolyLineOrPolygon() защищенный Метод

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
Результат void

ParsePolygonZ() защищенный Метод

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
Результат void

Shape() защищенный Метод

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
Результат System