You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to serve data without an __id__ column I get the error
192.168.1.2 - - [09/Jun/2017 21:10:14] "GET /all/0/0/0.json HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/pnorman/osm/tilezen/tileserver/tileserver/__init__.py", line 148, in __call__
response = self.handle_request(request)
File "/home/pnorman/osm/tilezen/tileserver/tileserver/__init__.py", line 232, in handle_request
self.post_process_data,
File "/home/pnorman/osm/tilezen/tileserver/env/lib/python2.7/site-packages/tilequeue/process.py", line 243, in process_coord_no_format
feature_id = row.pop('__id__')
KeyError: '__id__'
To get around this I added the column 0::bigint AS __id__, but I shouldn't need to do this. Not all data sources have meaningful IDs, or you might not want to include them in the output.
SELECT
{%filtergeometry%}{{ bounds['polygon']|bbox_padded_intersection('way') }}{%endfilter%} AS __geometry__,
0::bigint AS __id__
FROM ne_ocean
WHERE {{ bounds['polygon']|bbox_filter('way',3857) }}
The text was updated successfully, but these errors were encountered:
On Jun 9, 2017, at 21:18, Paul Norman ***@***.***> wrote:
When I try to serve data without an __id__ column I get the error
192.168.1.2 - - [09/Jun/2017 21:10:14] "GET /all/0/0/0.json HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/pnorman/osm/tilezen/tileserver/tileserver/__init__.py", line 148, in __call__
response = self.handle_request(request)
File "/home/pnorman/osm/tilezen/tileserver/tileserver/__init__.py", line 232, in handle_request
self.post_process_data,
File "/home/pnorman/osm/tilezen/tileserver/env/lib/python2.7/site-packages/tilequeue/process.py", line 243, in process_coord_no_format
feature_id = row.pop('__id__')
KeyError: '__id__'
To get around this I added the column 0::bigint AS __id__, but I shouldn't need to do this. Not all data sources have meaningful IDs, or you might not want to include them in the output.
My queries file is
all:
- water
layers:
water:
template: water.jinja2
start_zoom: 0
geometry_types: [Polygon]
and water.jinja2 is
SELECT
{% filter geometry %}{{ bounds['polygon']|bbox_padded_intersection('way') }}{% endfilter %} AS __geometry__,
0::bigint AS __id__
FROM ne_ocean
WHERE {{ bounds['polygon']|bbox_filter('way',3857) }}
―
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
nvkelso
changed the title
__id__ column required
Make __id__ column optional (it's required now)
Mar 13, 2018
When I try to serve data without an
__id__
column I get the errorTo get around this I added the column
0::bigint AS __id__
, but I shouldn't need to do this. Not all data sources have meaningful IDs, or you might not want to include them in the output.My queries file is
and water.jinja2 is
The text was updated successfully, but these errors were encountered: