Skip to content

josephbsmith/worlddiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WorldDiff

Compare two GeoJSON FeatureCollections by stable feature ID and produce both a machine-readable change summary and a map-ready GeoJSON change layer.

Run

python3 worlddiff.py old.geojson new.geojson --key parcel_id --out report

The key may be the GeoJSON top-level id (the default) or a property name. Output:

  • report/summary.json — added, removed, and changed IDs plus changed property names;
  • report/changes.geojson — added and changed features from the new file and removed features from the old file, each tagged with _worlddiff_change.

To render the change layer as an SVG map:

python3 worlddiff.py old.geojson new.geojson --out report --svg report/changes.svg

The SVG uses equirectangular projection with green for added features, red for removed, orange for changed.

WorldDiff compares coordinates and properties exactly. Coordinate-tolerance and topology-aware comparison belong in a later version only when exact GeoJSON comparison proves insufficient.

Check

python3 test_worlddiff.py

About

Diff GeoJSON datasets into a summary and map-ready change layer.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages