Updated script: landmarks_stage2_configurable_v4.py
What’s added:
-
edit-confignow supports:--run-cmd-before-eval--run-cmd-zoom
-
global default postprocess tags:
analyze --default-postprocess-tag key=valueedit-config --default-postprocess-tag key=value
-
interactive group review now has a preview loop:
Enter/e= edit current groupn= next examplep= previous exampleo= run external visualizer again on current examples= skip group!= stop editing
-
global
defaults.postprocessis stored in the same config file and applied to all groups during build, then group-specific postprocess overrides it
Important placeholder support for --run-cmd-before-eval:
{lat}{lon}{z}{mapset}{group_id}{group_label}{raw_type}{name}
So your GPXSee command can be written like this:
python landmarks_stage2_configurable_v4.py edit-config ^
--config stage2_config.json ^
--run-cmd-before-eval ".\GPXSee.exe D:\maps-bg\gmapsupp\gmapsupp.img \"geo:{lat},{lon};z={z}\"" ^
--run-cmd-zoom 19
If you want every detected group to get a visible fallback tag by default:
python landmarks_stage2_configurable_v4.py analyze export-v7-00235051.csv ^
--config-out stage2_config.json ^
--default-postprocess-tag tourism=attraction
or while editing an existing config:
python landmarks_stage2_configurable_v4.py edit-config ^
--config stage2_config.json ^
--default-postprocess-tag tourism=attraction ^
--run-cmd-before-eval ".\GPXSee.exe D:\maps-bg\gmapsupp\gmapsupp.img \"geo:{lat},{lon};z={z}\""
Then build as usual:
python landmarks_stage2_configurable_v4.py build export-v7-00235051.csv ^
--config stage2_config.json ^
--osm resolved.osm ^
--gpx resolved.gpx ^
--resolved-csv resolved.csv
I also verified the non-interactive path:
analyzeruns successfully- default global postprocess tags are written into the generated config
One important detail:
-
the global default postprocess is now stored under:
defaults.postprocess.add_tagsdefaults.postprocess.remove_tags
-
build applies those to all groups, then applies group-local
postprocess
That gives you exactly the pattern you asked for:
- visualize example
- inspect the symbol in GPXSee
- decide naming / icon / tags
- move to next example in the same group
- keep everything in the same config file
The next strong upgrade would be adding a dedicated --run-cmd-before-eval-on-enter/--no-auto-open toggle, so you can choose whether each group auto-opens the first example or only opens when you press o.