Shapefile — Roads Geometry (.shp, 3 PolyLine records)
Three single-part PolyLine records, each carrying its own bounding box, a part index and a run of little-endian coordinate doubles. PolyLine and Polygon share this layout, which is why the shape-type byte in the header is the only thing that distinguishes an open line from a closed ring.
| record | shape type | parts | vertices |
|---|---|---|---|
| 1 | PolyLine | 1 | 4 |
| 2 | PolyLine | 1 | 3 |
| 3 | PolyLine | 1 | 3 |
Specifications
- Format
- Esri shapefile component
- Crs
- WGS 84 (EPSG:4326)
- Byte Order
- mixed — big-endian headers, little-endian records
- Sidecar Set
- .shp/.shx/.dbf/.prj/.cpg
- Shape Type
- 3 (PolyLine)
- Records
- 3
- Parts Per Record
- 1
- Total Vertices
- 10
- Bbox
- -12.551,46.9725,-12.3915,47.112
Testing contract
Expected to pass- Scenario
- Read the three lines and compare their vertices with the master territory roads.
- Expected result
- Three lines of 4, 3 and 3 vertices load in ROADS order, matching the master GeoJSON coordinates exactly.
What is a .shp file?
The .shp file is the geometry component of an Esri shapefile. It stores a fixed 100-byte header followed by variable-length records, each holding one point, polyline, polygon, or multipoint feature as raw little-endian doubles. It is never usable alone: a shapefile is a set of sidecar files, minimally .shp with a .shx index and a .dbf attribute table, and usually a .prj holding the coordinate reference system.
How to use this file
Use an example .shp file — together with its sidecars — to test GIS readers and converters, checking ring orientation for polygons with holes, the bounding box in the header, and that record counts agree with the .shx index and .dbf table.
How to use this file for testing
“Shapefile — Roads Geometry (.shp, 3 PolyLine records)” is a deterministic Novus Examples fixture for Geospatial, Serialization testing, Conversion testing. GeoJSON, GPX, and KML files with points, lines, polygons, and tracks — for testing map tools, route parsers, and geo importers.
Documented properties for this file: 3 records · Esri shapefile component. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Geospatial fixtures publish one invented territory across formats, with the coordinate reference system and feature counts documented in specs. Convert or reproject and diff against the twin in the same group; edge-case geometries state exactly which assumption they are built to break.
Related files
- shpShapefile — Parcels Geometry (.shp, Polygon with a hole)Three Polygon records, one of which has two rings: the Mill Court parcel and its courtyard. Shapefile winds rings the opposite way to GeoJSON — exterior clockwise, holes anticlockwise — and it has no explicit hole marker, so winding is the only signal a reader has.

- shpShapefile — Towns Geometry (.shp, 5 Point records)The geometry half of a point shapefile: a 100-byte header carrying the shape type and bounding box, then five 20-byte Point records. The file is useless on its own — attributes live in the .dbf and the coordinate system in the .prj, which is the point of shipping the whole component set.

- txtEWKB — PostGIS Hex With an Embedded SRIDPostGIS EWKB, where the SRID is carried by OR-ing 0x20000000 into the geometry-type word and appending the code. A strict OGC WKB reader sees type 0x20000001 instead of 1 and either fails or, worse, reports an unknown geometry type.

- wktEWKT — PostGIS Extended WKT With an SRID PrefixPostGIS's extended WKT, which prefixes the geometry with `SRID=4326;`. It is not part of the OGC standard, so a strict WKT parser rejects the whole string — while a PostGIS-aware one gets the coordinate system for free.

- wktKestrel Bay Territory — One WKT Geometry Per LineEvery geometry in the territory as a bare WKT string, one per line and in master order. Attributes are deliberately absent so the file isolates geometry serialisation from attribute mapping.

- binWKB — Raw Little-Endian PointTwenty-one raw bytes: a byte-order flag, a little-endian geometry-type code of 1, and two float64 ordinates. This is the wire format PostGIS, GeoPackage and most spatial drivers actually move geometry in.

Generated by generation/geospatial.py. Free for any use, no attribution required — license.