Shape.File

Description

Name

class Tinman.Shape.File

Derived from

Shape

Reads the given shape file.

Fields / Required

data

Type

Data

Constraint

# != null

File data of shape.

Fields / Optional

format

Type

string

Default

'Any'

The shape format to use.
The following default shape file formats are available:

  • 'Any'

    Automatic shape format

  • 'CSH'

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

    IANA media type: none
    File extensions: .csh

  • 'JSON'

    The GeoJSON format (https://geojson.org).

    IANA media type: application/geo+json
    File extensions: .json, .geojson

    Third position number values (see '3.1.1. Position') are stored in Shape.Value.Vertical and fourth position number values are stored in Shape.Value.Custom.

  • 'SHP'

    The ESRI Shapefile format (https://support.esri.com/en/white-paper/279).

    IANA media type: application/vnd.shp
    File extensions: .shp

    Given a main file named filename.shp, the following additional files are used:

    • filename.shx
      An index file that holds the offset and length of each shape record in the main file. If existent, it will be used to access the shape records unless it contains inconsistent offsets and lengths, in which case it will be ignored. If the index file is not existent or ignored, the main file structure is traversed to access the shape records. In the latter case, the main file must be packed, i.e. there must not be any undefined data between shape records or after the last shape record.

    • filename.prj
      A text file that contains the coordinate system specification of the shape. If existent and georef is true, it will be read and its information will be accessible via Shape.Info.georef.

    • filename.dbf
      A dBASE table file that contains a row of metadata for each shape record. If existent and metadata is true it will be read and its information will be accessible via Shape.Info.metadata. The binary data of record fields that represent character strings is assumed to be encoded with UTF-8.

    Shape Z-coordinates are stored as Shape.Value.Vertical values and shape measure values are stored as Shape.Value.Custom.


georef

Type

bool

Default

true

Read georeference information from shape data, if present?


merge

Type

bool

Default

false

Merge contours of polygons into single shape? This will improve performance and reduce memory usage, but requires that polygon contours are disjoint.


metadata

Type

bool

Default

false

Read metadata information from shape data, if present?


values

Type

bool

Default

false

Read custom vertex values from shape data, if present?


modifier

Type

Modify

Default

null

The shape data modifier to use.


filter

Type

Filter

Default

null

The shape data filter to use.