Changelog¶
All notable changes to geopackage-toolkit will be documented in this file.
[0.4.2] - 2026-09-25¶
Fixed¶
clip()rtree-mismatch branch (source layer has an rtree index, clip layer does not) now also requiresST_Intersects(...) = 1explicitly, completing the v0.4.1 defense so SpatiaLite error codes can never pass as matches in any code path
[0.4.1] - 2026-09-25¶
Fixed¶
- Imported geometry blobs now carry the registered SRID (
SetSRID(GeomFromGeoJSON(...), srid)). Previously the blob SRID could be left unset (0/-1), and mismatched blob SRIDs madeST_Intersectsreturn-1, which SQLite treats as truthy — soclip/intersectcould silently keep every feature instead of the matching ones - Fresh GeoPackages created by
import_geojson()/import_shapefile()now initialize SpatiaLite metadata (InitSpatialMetaData), so spatial functions behave consistently regardless of connection mode clip()/intersect()filters now requireST_Intersects(...) = 1explicitly, so SpatiaLite error codes can never pass as matches- CLI
geopkg exportcreates missing output directories (consistent with the pipeline export step) - CLI
geopkg pipelineheader shows the config filename instead of<dict> - CLI reference docs: documented
import,export,buffer,clip,intersect; corrected an inaccurate tip - 1 new regression test (82 total)
[0.4.0] - 2026-09-04¶
Added¶
- Config-driven batch pipeline:
run_pipeline(),load_config(), and CLIgeopkg pipeline <config> - Pipeline config supports JSON (stdlib) and YAML (optional extra:
pip install geopackage-toolkit[pipeline]) - Step types:
import,buffer,clip,intersect,export,validate - Glob batch input for imports (
input: "data/*.geojson") with layer names derived from file stems fail_fasterror policy (defaultfalse: all steps run, failures recorded per step)- JSON run report written per execution (steps, feature counts, errors, timing)
- CLI exit code
1when any step fails,0on full success (CI-friendly) - 22 new tests (81 total)
Fixed¶
- README roadmap: v0.3.0 shipped GeoJSON + Shapefile conversion; FlatGeobuf moved to backlog
[0.3.0] - 2026-09-03¶
Added¶
export_geojson()and CLIgeopkg export --format geojsonfor GeoJSON export (pure Python, zero new dependencies)export_shapefile()and CLIgeopkg export --format shapefilefor Shapefile export (requires optionalpyshp)import_geojson()and CLIgeopkg importfor GeoJSON import (creates the GeoPackage if missing)import_shapefile()for Shapefile import- Optional dependency extra:
pip install geopackage-toolkit[convert] - Custom WKT-to-GeoJSON parser handling all OGC geometry types (Point, LineString, Polygon, Multi*)
- 19 new tests (59 total)
Fixed¶
connect()now acceptsenable_gpkg_mode=Falseto work around a SpatiaLite 5.1.0 bug whereST_AsText()returns NULL after close/reopen when GPKG mode was active
[0.2.0] - 2026-08-17¶
Added¶
buffer()function and CLI command for buffering features by a distanceclip()function and CLI command for clipping features to a polygon boundaryintersect()function and CLI command for spatial intersection of two layers- All spatial operations write results back to the same GeoPackage file
- 40 tests across Windows + Ubuntu, Python 3.10-3.13
[0.1.0] - 2026-08-15¶
Added¶
validate_layers()andvalidate_layer()for geometry health checks (null, empty, invalid, SRID, bbox)count_in_zones()for rtree-accelerated feature counting per zonebbox_filter()for rtree-accelerated bounding box queriespoints_in_polygons()for point-in-polygon classificationconnect()helper for SpatiaLite-aware GeoPackage connections- CLI commands:
validate,count,info - MkDocs documentation with Material theme