ShapeFormat

Description

[ShutdownSurvive]
abstract class Tinman.Terrain.Shapes.ShapeFormat

Derived from

FileFormat abstract

The supported 2D vector shape file formats.

Public / Constants

Any


public static readonly attribute Any → (ShapeFormat)

The file format is unknown and will be determined automatically.

Use IFileFormat.Next to walk through all registered formats.

CSH


public static readonly attribute CSH → (ShapeFormat)

The CSH shape file format ('Compiled SHape', proprietary).

IANA media type: none
File extensions: .csh
Prefix sequence: yes

See also

Shape.ReadCSH2

SHP


public static readonly attribute SHP → (ShapeFormat)

The ESRI Shapefile format.

IANA media type: application/vnd.shp
File extensions: .shp
Prefix sequence: yes

The file ending *.shp indicates the main shapefile. Geo-referencing is provided by a file in the same directory, having the file ending *.prj. Metadata is provided by a file with the suffix *.dbf.

Public / Methods

ForName


public static method ForName → (1)

name in : string

[not-empty]
The shape file format name.

returns → ShapeFormat

The shape file format or Any if not found.

Returns a shape file format by its IFileFormat.Name.

ReadShapes

2 overloads


[OwnerReturn]
public method ReadShapes1 → (2)

data in : Path

[not-null]
The shape data file.

flags in : ReadShapeFlags

The shape reading flags.

returns → IShapeReader

The IShapeReader for reading the shape data.

Reads the given shape.

IOException

If an I/O error has occurred while opening the shape data.

ValidatingException

If a validation error has occurred on data in or the returned shape reader.


[OwnerReturn]
public method ReadShapes2 → (2)

data in : IFileData

[not-null]
The shape data provider.

flags in : ReadShapeFlags

The shape reading flags.

returns → IShapeReader

The IShapeReader for reading the shape data.

Reads the given shape.

IOException

If an I/O error has occurred while opening the shape data.

ValidatingException

If a validation error has occurred on data in or the returned shape reader.

Protected / Constructors

ShapeFormat


protected constructor ShapeFormat → (4)

name in : string

[not-empty]
Value for IFileFormat.Name

description in : string

[not-empty]
Value for IFileFormat.Description

mime in : string

Value for IFileFormat.Mime

isAny opt : bool = false

Is this an automatic file format?

Creates a new instance of ShapeFormat.

Protected / Methods

DoReadShapes


[OwnerReturn]
protected abstract method DoReadShapes → (2)

data in : IFileData

The shape data provider: will never be null and IValidatable.Validate did not report any errors.

flags in : ReadShapeFlags

The shape reading flags.

returns → IShapeReader

The IShapeReader for reading the shape data. The IValidatable.Validate has not yet been called on it.

Reads the given shape.

IOException

If an I/O error has occurred while opening the shape.