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

Landcover low zoom cleaning #3539

Merged
merged 3 commits into from
Dec 2, 2018

Conversation

kocio-pl
Copy link
Collaborator

@kocio-pl kocio-pl commented Nov 30, 2018

Related to #3534.
Resolves #1614.

Changes proposed in this pull request:

  • removing needless buildings, religion and name related queries from landcover-low-zoom data layer

This should make the query marginally faster, but it's mostly code cleaning.

@@ -100,7 +100,6 @@ Layer:
WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'vineyard', 'orchard')
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub'))
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND building IS NULL
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you check performance implications of this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, I just checked that nothing is broken. That's why I claim only code cleaning, not a performance boost.

Copy link
Owner

Choose a reason for hiding this comment

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

This change will probably have a performance regression. There is an important index on the polygon table (the "nobuilding" index) and the building is null part of the query is there in order to use this index and speed up queries.

It shouldn't be removed without careful testing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this change needs testing. If it hasn't been tested, we should revert this line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could you make such test?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not in the near future. I think this line should be reverted as it's outside the scope of code cleanups to the landcover SQL.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, PR is ready - #3622.

@kocio-pl kocio-pl merged commit 2d55249 into gravitystorm:master Dec 2, 2018
@kocio-pl kocio-pl deleted the landcover-low-zoom-cleaning branch December 2, 2018 17:48
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.

4 participants