Files
garmin-img-format-parsing/stage-2-parse-stage-1/readme.md
T

123 lines
4.3 KiB
Markdown
Raw Normal View History

2026-04-14 16:37:10 -07:00
You have **two good OsmAnd targets** now.
The fast, practical one is **GPX waypoint overlay**. OsmAnd supports GPX import, waypoint icons/colors, and **waypoint grouping** through OsmAnd-specific GPX extensions, so this is the closest match to a toggleable landmark layer without fighting the full map compiler. Favorites are also stored/imported as GPX waypoints, which confirms GPX is a native path for point overlays. ([OsmAnd][1])
The more native/searchable one is **POI-only OBF**. OsmAndMapCreator officially supports `generate-poi` separately from `generate-obf`, and it accepts OSM-family input such as `.osm`, `.osm.gz`, `.osm.bz2`, and `.pbf`. That makes it the right target when you want searchable/filterable POIs but do **not** want the routing stage that is currently crashing. ([OsmAnd][2])
I packaged both paths into a converter:
[landmarks_csv_to_osmand.py](sandbox:/mnt/data/landmarks_csv_to_osmand.py)
Sample outputs:
* [sample GPX overlay](sandbox:/mnt/data/water_sources_02335140.gpx)
* [sample OSM for POI build](sandbox:/mnt/data/water_sources_02335140.osm)
### What I recommend
For a “BGMountains-like thing I can switch on and off,” use **GPX overlays** first.
For a “native searchable POI pack,” use **POI-only OBF** second.
### Path 1: GPX overlay layer
This is the quickest route.
It converts your landmark CSVs into a GPX file with:
* one waypoint per landmark
* grouped categories using `<type>`
* OsmAnd waypoint group styling via `osmand:points_groups`
* icons/colors per category
Build it like this:
```bash id="14483"
python landmarks_csv_to_osmand.py *.csv --gpx bg_landmarks.gpx --group-by category
```
For just water sources:
```bash id="52386"
python landmarks_csv_to_osmand.py *.csv --category water_sources --gpx bg_water_sources.gpx
```
Then import that GPX into OsmAnd. GPX waypoints and waypoint groups are supported officially, including icon/color/background customization. ([OsmAnd][1])
**Best practice for toggling:** make **one GPX file per theme**:
* `water_sources.gpx`
* `villages.gpx`
* `summits.gpx`
* `springs.gpx`
That gives you clean on/off control by file instead of stuffing everything into one blob.
### Path 2: native POI pack for OsmAnd
This is better when you want it to behave more like a built-in searchable POI dataset.
First convert CSVs to OSM XML:
```bash id="51512"
python landmarks_csv_to_osmand.py *.csv --category water_sources --osm water_sources.osm
```
Then build a POI-only OBF:
```bash id="68855"
java.exe -Xms256M -Xmx4096M -cp "OsmAndMapCreator.jar;lib/*" ^
net.osmand.MainUtilities generate-poi C:\path\to\water_sources.osm
```
That uses OsmAndMapCreator’s documented `generate-poi` mode and avoids the routing stage entirely. ([OsmAnd][2])
### Which one should you choose?
Use **GPX** when you want:
* fast import
* easy toggle on/off
* visual overlay behavior
* category grouping with custom icons/colors
Use **POI-only OBF** when you want:
* more native OsmAnd integration
* better POI-style searching/indexing
* a cleaner long-term pack
### Important limitation
For now, your landmark CSV path is strongest for **exact-coordinate point features**. That is why it works well for springs, drinking water, villages, summits, and similar point landmarks. It is not the same as a full vector map overlay with arbitrary line/polygon filtering.
### Ready-to-use commands
All CSVs into one grouped GPX:
```bash id="40684"
python landmarks_csv_to_osmand.py *.csv --gpx all_landmarks.gpx --group-by category --summary-json all_landmarks_summary.json
```
Only water sources into GPX:
```bash id="33043"
python landmarks_csv_to_osmand.py *.csv --category water_sources --gpx water_sources.gpx
```
Only water sources into OSM for POI build:
```bash id="57957"
python landmarks_csv_to_osmand.py *.csv --category water_sources --osm water_sources.osm
```
Only named villages into GPX:
```bash id="12262"
python landmarks_csv_to_osmand.py *.csv --filter-tag place=village --named-only --gpx villages.gpx
```
The cleanest deployment pattern is: **one GPX per category for toggles, plus one POI-only OBF per high-value category for native search**.
[1]: https://osmand.net/docs/technical/osmand-file-formats/osmand-gpx/?utm_source=chatgpt.com "OsmAnd GPX | OsmAnd"
[2]: https://osmand.net/docs/technical/map-creation/create-offline-maps-yourself/?utm_source=chatgpt.com "Create Offline Raster & Vector Maps | OsmAnd"