DBF
DBF is the dBase database format. It's best known as the attribute-table half of a Shapefile, but Mapshaper can also import a .dbf on its own as a tabular layer with no geometry. CSV is generally preferred as an exchange format for tabular data.
File extension: .dbf · Read: ✓ · Write: ✓ · Geometry: none
CLI examples
mapshaper provinces.dbf -info
mapshaper provinces.dbf -filter '"BC,AB,SK".indexOf(prov) > -1' -o subset.csv
mapshaper data.csv -o data.dbf
Format-specific input options
encoding=— text encoding. If omitted, Mapshaper auto-detects, falling back to a.cpgsidecar file if present. Runmapshaper -encodingsfor the list of supported encodings.
Format-specific output options
encoding=— output text encoding. Default UTF-8 (with a matching.cpgsidecar).field-order=ascending— sort columns alphabetically.
Practical notes
- DBF holds tabular data only — no geometry.
- DBF files do not declare their text encoding internally. Mapshaper auto-detects against UTF-8, Windows-1252 and a few other common encodings. See the Shapefile encoding notes for the full picture.
- Field names are limited to 10 ASCII characters. Longer names are truncated on write; duplicate truncated names are disambiguated with numeric suffixes.
- Field values are limited to 254 characters; longer strings will have been truncated when the file was written.
External resources
- Wikipedia: .dbf — useful overview of the format's history and dialects.
- Xbase File Format Description — Erik Bachmann's reference for the dBase / xBase family. The standard external citation for byte-level DBF details.