Skip to content

Commit

Permalink
Alternate viewpoints changes for RAWR tiles.
Browse files Browse the repository at this point in the history
In tilezen/vector-datasource#1895, I added a little hack to work around the way we change the geometry type of `boundaries` layer features. They used to come entirely from the `planet_osm_polygon` table, but now we also include disputes and claims from `planet_osm_line`. However, we have to filter out a bunch of features from `planet_osm_line` that we don't want, but have the same tags as the polygons we do want.

Long story short: The query in `vector-datasource` sets this flag when transforming a polygon into a boundary line, so we have to do the same thing when reading from the RAWR tiles.
  • Loading branch information
zerebubuth committed May 13, 2019
1 parent 7d7e38c commit 0cedbb0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tilequeue/query/rawr.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,10 @@ def _parse_row(self, zoom, unpadded_bounds, bbox, source, fid, shape,
# we don't want area on boundaries
read_row['__boundaries_properties__'].pop('area', None)

# set a flag to indicate that we transformed this from a
# polygon to a boundary.
read_row['mz_boundary_from_polygon'] = True

if read_row:
read_row['__id__'] = fid

Expand Down

0 comments on commit 0cedbb0

Please sign in to comment.