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

Overpass performance #1516

Merged
merged 19 commits into from Aug 28, 2019
Merged

Overpass performance #1516

merged 19 commits into from Aug 28, 2019

Conversation

westnordost
Copy link
Member

Fixes #1514

Additionally to the code, the list here needs to be reviewed to find any potential mistakes in the overpass query generation algorithm:

#1514 (comment)

@westnordost westnordost added this to the v14 milestone Aug 7, 2019
@matkoniecz
Copy link
Member

I was looking at #1514 (comment) (I made no attempt to verify code or to check that queries listed there are actually what SC uses).

Is it intentional that _link roads will no longer gave max speed quest? In my experience link roads often have limits, even ones on motorways (it is caused by appearance of ^ $ delimiters).

The same for AddWayLit.

[bbox:{{bbox}}];
node[barrier = height_restrictor] -> .n1;
node[amenity = parking_entrance][parking ~ '^underground|multi-storey$'][!maxheight][!'maxheight:physical'] -> .n2;
(.n1; .n2;);

out meta geom;

seems to be missing [!maxheight][!'maxheight:physical'] part for [barrier = height_restrictor] or it is spurious for [amenity = parking_entrance].


I found several things to improve during looking at queries, so I will open some PRs with minor fixes before reviewing code.

@westnordost
Copy link
Member Author

Thank you for the review.

Regarding AddMaxHeight, this is indeed a bug! Phew, good that you found it! I'll have a look!

Regarding AddWayLit and AddMaxSpeed, nothing changed. It was always be like this.

@matkoniecz
Copy link
Member

Regarding AddWayLit and AddMaxSpeed, nothing changed. It was always be like this.

In that case I am going to reclassify it as "things to improve found during looking at queries" and open PR for that.

I'll have a look!

And once it is fixed I will merge this PR into version of app that I use on survey, maybe I will spot something additional.

@westnordost
Copy link
Member Author

AddMaxHeight

[bbox:{{bbox}}];
node[barrier = height_restrictor] -> .n2;
node[amenity = parking_entrance][parking ~ '^underground|multi-storey$'] -> .n3;
(.n2; .n3;) -> .n1;
node.n1[!maxheight][!'maxheight:physical'];

out meta geom;
[bbox:{{bbox}}];
way[highway ~ '^motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|track|road$'] -> .w2;
way[highway = service][access !~ '^private|no$'][vehicle !~ '^private|no$'] -> .w3;
(.w2; .w3;) -> .w1;
way.w1[covered = yes] -> .w4;
way.w1[tunnel ~ '^yes|building_passage|avalanche_protector$'] -> .w5;
(.w4; .w5;) -> .w1;
way.w1[!maxheight][!'maxheight:physical'];

out meta geom;

@matkoniecz
Copy link
Member

BTW, it is really great that performance of queries will be so increased! Both for SC users and Overpass servers.

@westnordost
Copy link
Member Author

Hmm, it is still wrong, now for other queries.

@westnordost
Copy link
Member Author

Ok, now it should be fine. (Updated the comment in #1514 with all the filters)

# Conflicts:
#	app/src/main/java/de/westnordost/streetcomplete/quests/localized_name/AddRoadName.kt
#	app/src/main/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt
@westnordost westnordost merged commit 90dc2f7 into master Aug 28, 2019
@westnordost westnordost deleted the overpass-performance branch October 20, 2019 12:35
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.

Performance improvements: Faster Overpass queries
2 participants