Shapefile — Towns Attributes (.dbf, dBase III)
The attribute table as a dBase III file: fixed-width, space-padded, ASCII numerics. Field names are capped at ten characters and there is no type for dates-with-time or for nested values, which is why shapefile export loses so much of a modern schema.
| CODE | NAME | POP | FOUNDED |
|---|---|---|---|
| KB | Kestrel Bay | 4820 | 1786 |
| MR | Marram | 1180 | 1834 |
| HW | Holloway | 2670 | 1801 |
| NP | Ninepin | 640 | 1902 |
| QC | Quillan Cross | 310 | 1877 |
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
- Records
- 5
- Fields
- 4
- Field Names
- CODE, NAME, POP, FOUNDED
- Field Types
- C(4), C(24), N(8,0), N(6,0)
- Encoding Declared By
- .cpg sidecar
- Date Stamp
- 2026-01-01 (fixed for reproducibility)
Testing contract
Expected to pass- Scenario
- Read the table and check the field widths and padding.
- Expected result
- Five rows load with CODE, NAME, POP and FOUNDED; numeric fields are right-justified and space-padded, and no field name exceeds ten characters.
What is a .dbf file?
A dBASE table (.dbf) is a legacy binary tabular format with a fixed-width header describing columns (name, type, length) followed by fixed-length records. It persists today as the attribute table of GIS shapefiles and in legacy database exchange.
How to use this file
Use an example .dbf file to test dBASE/xBase readers, shapefile attribute parsing, and DBF-to-CSV conversion.
How to use this file for testing
“Shapefile — Towns Attributes (.dbf, dBase III)” is a deterministic Novus Examples fixture for Geospatial, Data import, Serialization 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: 5 records · 4 fields · 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
- dbfShapefile — Parcels Attributes (.dbf)The parcel attribute table, joined to the .shp purely by record order — there is no key and no explicit link. Deleting a geometry without deleting its row shifts every subsequent attribute onto the wrong shape, silently.

- dbfShapefile — Roads Attributes (.dbf with a decimal field)The road attribute table, including a numeric field declared with two decimal places. DBF stores numbers as right-justified ASCII, so the declared width and decimal count are the only thing that says 9.40 is not 940.

- 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.

- shxShapefile — Parcels Index (.shx)The parcel index, whose second entry is markedly longer than the others because that record carries two rings. Use it together with the roads index to check that seek logic handles multi-part records as well as multi-record files.

- shpShapefile — 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.

- shxShapefile — Roads Index (.shx)Unlike the point index, these entries have different lengths because each PolyLine holds a different number of vertices. That makes it the useful case for testing seek logic — a reader that assumes a fixed stride reads the first record correctly and then garbage.

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