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

Make queries per-table #1352

Merged
merged 12 commits into from
Jul 31, 2017
Merged

Make queries per-table #1352

merged 12 commits into from
Jul 31, 2017

Conversation

rmarianski
Copy link
Member

@@ -44,6 +44,7 @@

# small campground in point zoom 13
# http://www.openstreetmap.org/way/417405356
# min zoom matches in landuse layer, but not in pois for 13
Copy link
Member

Choose a reason for hiding this comment

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

Is there anything left for us here? If not, take out the comment to reduce confusion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed in f703a2c.

@@ -104,7 +118,6 @@ layers:
area-inclusion-threshold: 1
buildings:
template: buildings.jinja2
start_zoom: 13
Copy link
Member

Choose a reason for hiding this comment

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

Where is this handled going forward, or is it only on a per-feature min_zoom basis now?

Copy link
Member Author

Choose a reason for hiding this comment

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

In this particular case, per-feature min_zoom. The sources themselves now have a start zoom for when querying should begin, but there are now cases like this one where we are relying more on the min zoom for filtering.

@@ -125,7 +138,6 @@ layers:
area-inclusion-threshold: 1
pois:
template: pois.jinja2
start_zoom: 4
Copy link
Member

Choose a reason for hiding this comment

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

This will probably yield a few more park labels at zooms 2 and 3.

Copy link
Member Author

Choose a reason for hiding this comment

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

If that's the case, I think we should update the yaml to clamp these values. Should we do it in this pr? Or a subsequent one?

Copy link
Member

Choose a reason for hiding this comment

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

It's always been an undocumented bug/feature that they don't show up earlier. If it turns out to be not ideal we can file a followup issue for it.

@@ -60,7 +76,6 @@ layers:
area-inclusion-threshold: 1
landuse:
template: landuse.jinja2
start_zoom: 4
Copy link
Member

Choose a reason for hiding this comment

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

This will probably yield a few more park polygons at zooms 2 and 3.

Copy link
Member

Choose a reason for hiding this comment

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

(Which is fine)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, ditto on the clamp in yaml.

@@ -77,7 +92,6 @@ layers:
area-inclusion-threshold: 1
roads:
template: roads.jinja2
start_zoom: 5
Copy link
Member

Choose a reason for hiding this comment

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

Looks like we source the Natural Earth scale_rank for min_zoom directly, and that starts at 3:

    min_zoom: { col: scalerank }

So this change would introduce roads at zoom 3 unless paired with a clamp over in the roads layer YAML?

Copy link
Member

Choose a reason for hiding this comment

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

(I'd link but Github is mostly down for me, except these PR comments!)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I'd like to pair with a clamp over in roads yaml.

Copy link
Member

Choose a reason for hiding this comment

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

Let's followup in #1353 after this PR is merged.

@@ -166,7 +177,6 @@ layers:
area-inclusion-threshold: 1
transit:
template: transit.jinja2
start_zoom: 5
Copy link
Member

Choose a reason for hiding this comment

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

The smallest feature min_zoom is already 5 so relying on feature min_zoom alone (not guarding here in the layer config) should be fine.

mz_transit_level IS NOT NULL OR
mz_water_min_zoom IS NOT NULL
)
{% else %}
Copy link
Member

@nvkelso nvkelso Jul 31, 2017

Choose a reason for hiding this comment

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

Suspect we need to have the old earth, road, water layer start_zoom at 8 logic near here now?

(Landuse was start 4 but it's fine at 0, should fix in layer min_zoom YAML if an issue.)

(Transit is already handled i the layer min_zoom YAML.)

Copy link
Member

Choose a reason for hiding this comment

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

Followup via #1354.

mz_transit_level IS NOT NULL OR
mz_water_min_zoom IS NOT NULL))
{% else %}
(mz_boundary_min_zoom < {{ zoom + 1 }} AND {{ bounds['line']|bbox_overlaps('way', 3857) }}) OR
Copy link
Member

Choose a reason for hiding this comment

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

Suspect we need to have the old earth, road, water layer start_zoom at 8 logic near here now? (Road is probably overkill.)

(Landuse and POI was start 4 but it's fine at 0, should fix in layer min_zoom YAML if an issue.)

(Building and transit is already handled i the layer min_zoom YAML.)

Copy link
Member

Choose a reason for hiding this comment

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

Followup via #1354.

mz_poi_min_zoom IS NOT NULL OR
mz_water_min_zoom IS NOT NULL
)
{% else %}
Copy link
Member

Choose a reason for hiding this comment

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

Suspect we need to have the old earth, road, water layer start_zoom at 8 logic near here now?

(Building, poi is already handled in the layer min_zoom YAML.)

(Places is mostly handled in the layer min_zoom YAML, and you've carried over the layer duplicate weeding logic into the new NE table logic so we're good there.)

Copy link
Member

Choose a reason for hiding this comment

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

Followup via #1354.

@rmarianski rmarianski changed the title WIP Make queries per-table Make queries per-table Jul 31, 2017
@rmarianski
Copy link
Member Author

Going to merge this in for now. Let's make new issues for the follow ups.

@rmarianski rmarianski merged commit d4916fd into master Jul 31, 2017
@nvkelso
Copy link
Member

nvkelso commented Jul 31, 2017

Follow-up issues in #1353 and #1354.

@nvkelso
Copy link
Member

nvkelso commented Aug 1, 2017

Some other followup: #1356 and #1358 for JINJA to YAML migration.

zerebubuth pushed a commit that referenced this pull request Dec 1, 2017
Looks like this was done already as part of #1352, so this PR just updates the test to have the behaviour that we want; that all building geometry is within the tile bounds.

Fixes #1142.
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