ShapeFormat
Description
- Derived from
-
FileFormat abstract
The supported 2D vector shape file formats.
Public / Constants
Any
The file format is unknown and will be determined automatically.
Use IFileFormat.Next to walk through all registered formats.
CSH
The CSH shape file format ('Compiled SHape', proprietary).
IANA media type: none
File extensions: .csh
Prefix sequence: yes
- See also
JSON
The GeoJSON format (https://geojson.org).
IANA media type: application/geo+json
File extensions: .json
, .geojson
Prefix sequence: no
Third position number values (see '3.1.1. Position') are stored in ShapeValue.Vertical and fourth position number values are stored in ShapeValue.Custom.
SHP
The ESRI Shapefile format (https://support.esri.com/en/white-paper/279).
IANA media type: application/vnd.shp
File extensions: .shp
Prefix sequence: yes
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 ReadShapeFlags.Geo is used, it will be read with CoordinateSystem.FromWkt and its information will be accessible via IShapeInfo.Georef. -
filename.dbf
A dBASE table file that contains a row of metadata for each shape record. If existent and ReadShapeFlags.Meta is used, it will be read and will be accessible via IShapeInfo.Metadata. The binary data of record fields that represent character strings is assumed to be encoded with UTF-8.
The unique ordinal number identifiers (see IShapeReaderInfo.PeekId) have the same values as the shape record numbers, minus one.
Shape Z-coordinates are stored as ShapeValue.Vertical values and shape measure values are stored as ShapeValue.Custom.
Public / Methods
ReadShapes
2 overloads
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.
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 / Methods
DoReadShapes
Reads the given shape.
- IOException
-
If an I/O error has occurred while opening the shape.