Skip to main content

Module header

Module header 

Source
Expand description

The 100-byte file header shared by .shp and .shx.

Layout per Esri J-7855 (July 1998):

BytesFieldEndian
0..4File code 9994Big
24..28File length in 16-bit wordsBig
28..32Version 1000Little
32..36Shape typeLittle
36..68XY bbox (xmin,ymin,xmax,ymax)Little
68..100Z + M bboxLittle

Structs§

ShpHeader
Parsed .shp / .shx file header (the format is byte-identical between the two files; only the records that follow differ).

Enums§

ShapeType
Esri Shapefile shape type codes (2D + Z/M variants). v0.1 of this crate only decodes the four 2D variants (Point, Polyline, Polygon, Multipoint); Z/M / MultiPatch return ShpError::Unsupported at the decoder.

Constants§

SHP_FILE_CODE
SHP_HEADER_BYTES
SHP_VERSION

Functions§

parse