Repository navigation
Description
Status: done
Size: S
Part of #3286. Depends on #3290.
Systems: search, route-planning
TL;DR
Goal: After the next build of the search index and the place tiles, the planner shows no caravan site and no camp site that takes no tents: not on the map, not in a search, not by its name.
Problem: The index does not keep the OpenStreetMap tag tents, so a site with tourism=camp_site and tents=no is a campsite for the planner. Caravan sites (tourism=caravan_site) are in the place group camp, so the map shows them under "Campsites". The tag shelter_type is dropped in the same way as tents, so the rule of records.py that sorts picnic shelters and bus shelters out of the shelters never applies to real data.
Decision: The owner decided that caravan sites go completely: a place where a rider cannot pitch a tent is of no use for cycling or hiking. The index keeps the tags tents and shelter_type. A camp site with tents=no is treated as a caravan site. A caravan site gets no record in the search index and no place in the place tiles, and the clients have no kind for it. The change lands now and takes effect with the next index build; this issue starts no build. Until then, #3317 already keeps caravan sites out of the searches for campsites and for places to sleep. (Review page, finding 07 step 2.)
Plan
host/obc-search-bake/src/features.rs: the tag filter keeps a tag only when its key is in thematches!list. Addtentsandshelter_typeto that list.places.rsalready copiesshelter_typeintoextra, but the tag never reaches it.host/obc-search-bake/src/places.rs: addtentsto the keys that go intoextra.planner/search/records.py:categorygives the kindcaravan_siteto a place withosm_value == 'camp_site'andextra.tents == 'no', as it does fortourism=caravan_site. The code that writes the records leaves out every place of the kindcaravan_site. Find that place in the build (records.py,pois.py,writer.py) and put the rule in one spot.planner/search/place-kinds.json: deletecaravan_sitefrom the groupcamp. This file sets which places the map shows under "Campsites" in the baked place tiles (tools/planner_places.py) and in the clients. Check thattools/planner_places.pythen writes no caravan site, and that a camp site withtents=nois left out there too.- Delete what is dead after that: the label of
caravan_siteinbuilder/web/src/lib/planner/poi-kinds.json, the entry inplanner/search/query/schema.pyif one is left, the caravan record ofplanner/search/test/query.test.mjs, and each other reader thatgrep -rn caravanfinds outsidetarget/,node_modules/andfixtures/. Leavecompanion-ios/Packages/OBCKit/Sources/OBCFormats/WaypointSymbol.swiftalone if its symbol belongs to the device format and not to the planner; say what you found. - Tests: one case in the tests of
obc-search-bakethat both tags reachextra; one inplanner/search/test/build.test.mjsthat acaravan_siteplace and atents=nocamp site get no record, and that a camp site without the tag stays a campsite.
Done when
obc test -p obc-search-bake- The build tests of
planner/search/README.mdpass. - The pull request says that the change needs the next index build to take effect.
Activity