-
AutorBeiträge
-
April 9, 2025 um 00:10 Uhr #57896
JohnPercy
TeilnehmerIs there any possible way gates across highways can be distinguished from field gates? I don’t think it is possible to do that in a theme but is it at all possible to distinguish in the map preparation? Gates across highways (including footpaths) are important; the increasing number of field gates much less so.
Voluntary and Velocity themes - https://voluntary.nichesite.org
April 9, 2025 um 11:48 Uhr #57897ChristianK
AdministratorHi John,
I see that there is a millon of Gates in UK, a tag indicating importance of the gates would be fine.
Gates across highways
Thats tricky.
Even if we assume that the gate is a node (there are countless tagged as ways on borders and fences and… crossing highways) we would have to check every way the gate_node belongs which type of way it is (usually there are more ways = the highway and one or more fences, borders crossing the highway)
If we find a highway=* in the way_array this gate_node refers to we could add a tag to this gate_node indicating the highway type it blocks.Lots of effort (no OSM tool I know for such a task, have to be coded) but possible.
Would catch most node_gates.
see https://www.openstreetmap.org/way/1038297033#map=19/57.579270/-5.147257A mess are the gates tagged as ways.
These gates are part of a fence / boundary / whateverway / relation running across a highway/fence/border.
If there is NO clue between these objects, no intersection node – there is no real way to archieve this.
However most of these gate_ways have a node in the middle of the crossing, again tagged as „gate“.
So these way_gates could be treated as node_gates.
However, the „gate“ tag should be removed from the way the node_gate is part of.Or.. its a gate w/o a crossing like here:
https://www.openstreetmap.org/way/1356457124#map=19/57.940434/-4.289626How to handle this in preprozessing with reasonable effort – no idea yet.
1 Teilnehmer(n) gefällt dieser Beitrag
April 12, 2025 um 11:20 Uhr #57899ChristianK
AdministratorHi John,
Whats possible with reasonable effort:
Marking all nodes tagged as barrier=gate crossing _any_ type of highway.
Nodes would be marked with (eg.) barrier_cross_hw=bch_yesthese two lines would basicly do it:
wsl osmfilter clean.osm –keep="highway=" –keep-relations= -o=temp_highway.osm wsl osmfilter temp_highway.osm –keep= –keep-nodes="barrier=gate" –modify-tags="barrier=gate add barrier_cross_hw=bch_yes" -o=bg_gates.osm
In Scottland.map we have 74222 nodes tagged as barrier=gate
After filtering 46124 of these are marked as crossing highways barrier_cross_hw=bch_yesA definition _which_ type of highway a gate is crossing would be possible.
However this would mean to filter all gates (614000 for UK) and check against ALL Highways cause its not possible to catch ways belonging to a node with the usual tools (only vice versa)I attached the OSM-File for the prozessed scotland gate_Nodes,
Best regards
Christian1 Teilnehmer(n) gefällt dieser Beitrag
April 12, 2025 um 13:16 Uhr #57901JohnPercy
TeilnehmerThat sounds really great and very useful. I think the distinction between a gate crossing any highway whether a road or a path and anything else like a fence or a hedge is very significant.
At first sight the file looks the right sort of thing.Voluntary and Velocity themes - https://voluntary.nichesite.org
2 Teilnehmer(n) gefällt dieser Beitrag
April 12, 2025 um 13:55 Uhr #57902ChristianK
AdministratorSome numbers:
For UK clip of geofabrik there could be skipped ~200.000 gates
Actually I check only against barrier=gate
Which additional barriers should I check (lift_gate, swing_gate) or barrier=* ?-
Diese Antwort wurde vor vor 6 Tage, 19 Stunden von
ChristianK bearbeitet.
1 Teilnehmer(n) gefällt dieser Beitrag
April 12, 2025 um 15:29 Uhr #57904JohnPercy
TeilnehmerIt was the plethora ordinary gates that was annoying me but some indicative numbers might help. Generally other types of gates appear to be across a highway of some sorts but I couldn’t be certain.
Voluntary and Velocity themes - https://voluntary.nichesite.org
April 13, 2025 um 11:14 Uhr #57905ChristianK
Administratorfinal version (so far..):
wsl osmfilter planet.o5m –keep="highway=" –keep-relations= -o=temp_highway_planet.o5m sleep.pl 5 wsl osmfilter temp_highway_planet.o5m –keep= –keep-nodes="barrier=gate =lift_gate =swing_gate =kissing_gate" –modify-tags="barrier= add barrier_cross_hw=bch_yes" -o=bg_gates_planet.osm
There are a lot of lift/swing gates…
I actually render
UK_Scotland
UK_Shetlands
UK_LakeDistrict
UK_WalesThese maps should be available tomorrow for regular download
April 15, 2025 um 14:26 Uhr #57907JohnPercy
TeilnehmerThanks for the updated maps. I’m still not sure which barriers should be included but this iteration doesn’t seem to be working fully as expected.
Not working as desired. Gate appears to be on highway (node on barrier=hedge) https://www.openstreetmap.org/node/10123320483#map=19/54.291380/-3.086950
Working as desired. Gate not on highway (node on barrier=wall)
https://www.openstreetmap.org/node/10123320472#map=19/54.291670/-3.087090Voluntary and Velocity themes - https://voluntary.nichesite.org
April 16, 2025 um 10:31 Uhr #57908ChristianK
AdministratorHi John,
Strange – sometimes it works sometimes not.
Running the script against the UK and Europe-Clip works.
Running against the planet-file fails.Logic is OK – why osmfiter fails – I have check…..
1 Teilnehmer(n) gefällt dieser Beitrag
April 16, 2025 um 12:08 Uhr #57909JohnPercy
TeilnehmerI noticed that in a couple of cases where it fails the gate node is part of a way that has nodes that are part of a relationship…
Voluntary and Velocity themes - https://voluntary.nichesite.org
1 Teilnehmer(n) gefällt dieser Beitrag
April 16, 2025 um 14:27 Uhr #57910ChristianK
Administratorpart of a relationship
Tried with –drop-relations > same mess.
Europe works, Planet not…..However this is no big surprise, osmfilter is a diva.
osmosis with –tf param works better, but osmosis cant handle o5m files.
This means that osmosis is many times slower and would have to convert planet.o5m to pbf.….
-
Diese Antwort wurde vor vor 2 Tage, 19 Stunden von
ChristianK bearbeitet.
April 16, 2025 um 16:57 Uhr #57915JohnPercy
TeilnehmerWould a simpler query work better, like matching all barriers rather than specific types? Or would that make it worse by producing more data?
Voluntary and Velocity themes - https://voluntary.nichesite.org
April 16, 2025 um 17:24 Uhr #57916ChristianK
AdministratorThe problem is that, as first step – you have to filter all highways and hope that the tool you use add the nodes used by the highways. So only the barriers-nodes assigned to highways are written to the first temp-file.
Second step is to delete the ways and keep the nodes tagged as barriers.
So now we have all barriers assigned to a highway.
Dead simple- IF the tool handle this right.Well, it seems that osmfilter is no longer maintained and has troubles with the big Object-IDs that have beem invented in OSM in the last 1-2 Years.
I had the same problem with OSMCONVERT – here I have found an updated version.
OSMFILTER is imo dead
Thats not funny cause I use it very often in my workflow…Filtering is possible with osmosis – however this is dead slow down to non-sense with big files.
However there is a tools called OSMIUM – and this is still maintained.
Tests are promising, seems to work.Here is the updated script:
wsl osmium tags-filter planet.o5m w/highway -o temp_highway_planet.osm.pbf sleep.pl 5 wsl osmium tags-filter temp_highway_planet.osm.pbf n/barrier=gate,lift_gate,swing_gate,kissing_gate -o temp_gates_planet.osm sleep.pl 5 wsl osmfilter temp_gates_planet.osm –keep-nodes="barrier=" –modify-tags="barrier= add barrier_cross_hw=bch_yes" -o=bg_gates_planet.osm
Attached you find the gates for the Lake District.
New maps tomorrow morningHope thats OK now….
-
Diese Antwort wurde vor vor 2 Tage, 16 Stunden von
ChristianK bearbeitet.
April 17, 2025 um 09:44 Uhr #57921JohnPercy
TeilnehmerGreat! That seems to be working and helps a lot.
If it doesn’t require more resources, could you please add barrier=stile to the process? I think kissing gate and stile are about equal in importance, although I suspect they are both unlikely to be mapped (or even occur) if not across a path.Voluntary and Velocity themes - https://voluntary.nichesite.org
1 Teilnehmer(n) gefällt dieser Beitrag
April 17, 2025 um 17:29 Uhr #57922ChristianK
AdministratorHi John,
Thanks for your help debugging this issue.. !
Best regards
Christian1 Teilnehmer(n) gefällt dieser Beitrag
-
Diese Antwort wurde vor vor 6 Tage, 19 Stunden von
-
AutorBeiträge
- Sie müssen angemeldet sein, um zu diesem Thema eine Antwort verfassen zu können.