Skip to content

Add Map category with empty geospatial files - #248

Merged
SimonCropp merged 3 commits into
mainfrom
map-files
Oct 3, 2026
Merged

SimonCropp merged 3 commits into
mainfrom
map-files

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Adds a new Map category with empty template files for geospatial formats.

Extension Size Contents
.shp 100 bytes Shapefile header only, Null shape type, zero records
.shx 100 bytes Matching shapefile index header
.gpkg 5 KB GeoPackage with the two mandatory core tables and the three required spatial reference rows
.mbtiles 2 KB metadata and tiles tables, with the two required metadata rows (name, format)
.pmtiles 130 bytes PMTiles v3 header, empty root directory, {} metadata

API

  • Category.Map, appended after Binary so existing enum values do not shift.
  • AllFiles.Maps, AllFiles.MapPaths and AllFiles.MapExtensions.
  • Map is handled by UseFile and WriteAllTo.

Text extensions

.geojson, .gpx and .kml are added to the known text extensions, so CreateFile/TryCreateFile with useEmptyStringForTextFiles handle them.

Verification

  • Build and all tests pass on every target framework.
  • The two SQLite based files (.gpkg, .mbtiles) pass PRAGMA integrity_check, and the GeoPackage has the GPKG application id.
  • .shp, .shx and .pmtiles are written to their specs but have not been opened in a GIS tool.

Not included

  • .kmz stays in Archive; moving it would break AllFiles.Archives[".kmz"].
  • Text formats (.kml, .gpx, .geojson) have no template, matching how .svg and .csv are handled; they are covered as text extensions instead.
  • .dbf is skipped since it is a general dBASE format rather than a map.

Adds .shp, .shx, .gpkg, .mbtiles and .pmtiles templates under a new Map category, exposed via AllFiles.Maps, MapPaths and MapExtensions.
@SimonCropp
SimonCropp merged commit bad08f2 into main Oct 3, 2026
1 check passed
@SimonCropp
SimonCropp deleted the map-files branch October 3, 2026 06:25
@SimonCropp SimonCropp added this to the 8.20.0 milestone Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant