Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit of long crossing check #1764

Closed

Conversation

emersonveenstra
Copy link
Contributor

This is a new analyser that looks for ways with footway=crossing or cycleway=crossing that are over 200 meters long. This happens when people change the tags without splitting the way over the actual crossing part. I haven't found any false positives in the equivalent overpass queries:

way["footway"="crossing"](if: length() > 200)({{bbox}});
(._;>;);
out;
way["cycleway"="crossing"](if: length() > 200)({{bbox}});
(._;>;);
out;

This isn't ready to be merged, I need a little guidance on what to make the item number and level, and what I should do for tests

id,
ST_AsText(way_locate(linestring))
FROM
{0}ways
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is limited to highways, right? Then table {0}highways is probably more efficient?

Note you'll have to import highways and touched_highways, see for example:

requires_tables_full = ['highways']
requires_tables_diff = ['highways', 'touched_highways']

@Famlam
Copy link
Collaborator

Famlam commented Feb 17, 2023

Nice idea :)
Maybe also interesting to include a waterway crossing (ford=yes or ford=stepping_stones). I recently found one nearby my place. Just an thought that crossed my mind, not sure if really long fords exist somewhere else in the world, so feel free to ignore :)


I need a little guidance on what to make the item number and level, and what I should do for tests

Regarding the tests, you can maybe use
https://github.com/osm-fr/osmose-backend/blob/master/analysers/analyser_osmosis_building_in_polygon.py#L80-L97
where you replace "osmosis_building_in_polygon" by the analyser name. (Note that I used proj=23032 there, which corresponds to i.e. NL and Italy)

Then using for example JOSM you can make a .osm file with test cases, for example one highway=footway + footway=crossing of length 50m and one of 250m. Edit the .osm (=XML) file to add timestamp='2014-03-31T22:00:00Z' version='1' to every node/way, and to get positive ID numbers. Example file: https://github.com/osm-fr/osmose-backend/blob/master/tests/osmosis_building_in_polygon.osm

If the "bad" crossing would for example have ID 1234, then use self.check_err(cl="CLASSNUMBER", elems=[("way", "1234")])

self.classs_change[1] = self.def_class(item = 7800, level = 2, tags = ['tag', 'highway', 'fix:survey'],
title = T_('Long Crossing'),
detail = T_(
'''The crossing way is much longer than expected'''))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add a fix message, describing to split the way when the crossing is over?
Also, don't forget to add a '.' at the end of the detail message :)

@frodrigo
Copy link
Member

@emersonveenstra still interested to work on this?

@frodrigo frodrigo changed the base branch from master to dev May 6, 2023 18:53
@emersonveenstra
Copy link
Contributor Author

@frodrigo i probably won't have the time for a while, feel free to take it or give it to someone else

@Famlam
Copy link
Collaborator

Famlam commented Jun 2, 2023

I might be able to take it over if you prefer, in a week or two. I like the idea

@Famlam Famlam mentioned this pull request Aug 21, 2023
@frodrigo
Copy link
Member

Closed in favour of #1992

@frodrigo frodrigo closed this Aug 23, 2023
@emersonveenstra emersonveenstra deleted the highway-long-crossing branch August 28, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants