2026-04-14 16:48:13 -07:00
|
|
|
|
Done.
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Updated script:
|
|
|
|
|
|
[landmarks_csv_to_osmand_v2.py](sandbox:/mnt/data/landmarks_csv_to_osmand_v2.py)
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
What changed:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* default dedupe is now **coordinate-based only**
|
|
|
|
|
|
* dedupe is modular:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* `coord`
|
|
|
|
|
|
* `coord_name`
|
|
|
|
|
|
* `coord_type`
|
|
|
|
|
|
* `coord_name_type`
|
|
|
|
|
|
* `off`
|
|
|
|
|
|
* dedupe uses a meter radius instead of naive decimal rounding
|
|
|
|
|
|
* duplicates are **merged**, not just dropped
|
|
|
|
|
|
* merged records keep:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* best name
|
|
|
|
|
|
* richer semantic tags
|
|
|
|
|
|
* union of GPXSee classes
|
|
|
|
|
|
* source file list
|
|
|
|
|
|
* duplicate count
|
|
|
|
|
|
* grouping is improved:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* `--group-by auto`
|
|
|
|
|
|
* `--group-by category`
|
|
|
|
|
|
* `--group-by type`
|
|
|
|
|
|
* `--group-by source`
|
|
|
|
|
|
* automatic grouping now distinguishes things like:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* `amenity_drinking_water`
|
|
|
|
|
|
* `natural_spring`
|
|
|
|
|
|
* `place_village`
|
|
|
|
|
|
* fallback Garmin or GPXSee groups
|
|
|
|
|
|
* interactive group naming added:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* `--interactive-group-names`
|
|
|
|
|
|
* shows sample examples from each detected group
|
|
|
|
|
|
* lets you keep or rename the proposed group name
|
|
|
|
|
|
* loader is now tolerant of both:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* the raw landmark CSVs
|
|
|
|
|
|
* the slimmer per-category CSVs you are iterating through
|
|
|
|
|
|
* `.gpx.gz`, `.osm.gz`, `.json.gz`, `.csv.gz` now actually get gzip-written correctly
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Useful commands:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Show detected groups with examples:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
```bash
|
|
|
|
|
|
python landmarks_csv_to_osmand_v2.py *.csv --show-groups
|
2026-04-14 16:37:10 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Interactive rename flow:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
```bash
|
|
|
|
|
|
python landmarks_csv_to_osmand_v2.py *.csv --show-groups --interactive-group-names --group-by auto --gpx landmarks.gpx
|
2026-04-14 16:37:10 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Tighter coordinate dedupe:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
```bash
|
|
|
|
|
|
python landmarks_csv_to_osmand_v2.py *.csv --dedupe-mode coord --dedupe-radius-m 6 --gpx landmarks.gpx
|
2026-04-14 16:37:10 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Coordinate dedupe, but only merge when type also matches:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
```bash
|
|
|
|
|
|
python landmarks_csv_to_osmand_v2.py *.csv --dedupe-mode coord_type --dedupe-radius-m 10 --gpx landmarks.gpx
|
2026-04-14 16:37:10 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Water-only overlay:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
```bash
|
|
|
|
|
|
python landmarks_csv_to_osmand_v2.py *.csv --filter-tag amenity=drinking_water --gpx drinking_water.gpx
|
2026-04-14 16:37:10 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
Springs-only overlay:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
```bash
|
|
|
|
|
|
python landmarks_csv_to_osmand_v2.py *.csv --filter-tag natural=spring --gpx springs.gpx
|
2026-04-14 16:37:10 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
If you want the next revision, I’d push it further in two directions:
|
2026-04-14 16:37:10 -07:00
|
|
|
|
|
2026-04-14 16:48:13 -07:00
|
|
|
|
* add **dedupe reports** showing which rows got merged into which canonical landmark
|
|
|
|
|
|
* add **interactive split/merge controls** for ambiguous groups, not just rename controls
|