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

handle_map_style.go:138: layer (providerLayerName: landuse_areas_gen0) has unsupported geometry type (<nil>) #302

Closed
vchrisb opened this issue Feb 14, 2018 · 7 comments
Assignees
Labels
Milestone

Comments

@vchrisb
Copy link

vchrisb commented Feb 14, 2018

I'm trying to deploy tegola.
I did try the "Getting Started" as well as the "tegola-osm" variant, but in both cases I do get an error like this:

handle_map_style.go:138: layer (providerLayerName: landuse_areas_gen0) has unsupported geometry type (<nil>)
handle_map_style.go:138: layer (providerLayerName: water_areas_gen0) has unsupported geometry type (<nil>)

I also tried v0.6.0 as I've seen there should be some better nil handling just in the latest commits.

I also made sure, that my database user is owner on every table.

Any idea where this error comes from?

Thx.

@vchrisb vchrisb changed the title handle_map_style.go:138: layer (providerLayerName: landuse_areas_gen0) has unsupported geometry type (<nil>) 2018-02-14T17:00:36.29+0100 [APP/PROC/WEB/0] ERR 2018/02/14 16:00:36 handle_map_style.go:138: layer (providerLayerName: water_areas_gen0) has unsupported geometry type (<nil>) handle_map_style.go:138: layer (providerLayerName: landuse_areas_gen0) has unsupported geometry type (<nil>) Feb 14, 2018
@ARolek
Copy link
Member

ARolek commented Feb 14, 2018

@vchrisb can you paste in the SQL for those specific layers?

@vchrisb
Copy link
Author

vchrisb commented Feb 14, 2018

@ARolek these are the lines in the tegola-osm repo:
https://github.com/terranodo/tegola-osm/blob/master/tegola.toml#L98
https://github.com/terranodo/tegola-osm/blob/master/tegola.toml#L43

for the getting started example it was for all three layers in http://tegola.io/getting-started/
Though for the getting-started I didn't check the table owner.

@ARolek
Copy link
Member

ARolek commented Feb 15, 2018

@vchrisb I just recreated the issue. So what's going on is the condition AND area > 1000000000 is filtering out all the records so tegola is not able to understand what the geometry type is for that layer. you can change the filter for the area to AND area > 10000 and it should work. This is not a great solution though so I think I'm going to need to figure out a strategy for auto generating a style when tegola can't read the geometry type.

I do see a bug though which is causing the style to break when we don't know the geom type. I can put a fix in on the v0.6.0 branch to address this soon. Another possible solution is use the line style when tegola can't read the geometry type. Let me do some testing but I think I can have a fix available shortly.

Thanks for the report.

@ARolek ARolek self-assigned this Feb 15, 2018
@ARolek ARolek added the bug label Feb 15, 2018
@ARolek ARolek added this to the v0.6.0 milestone Feb 15, 2018
ARolek added a commit that referenced this issue Feb 16, 2018
- don't include auto generated style when
the geometry type for a layer can't be infered
- migrating log statements for server package to
internal logger
ARolek added a commit that referenced this issue Feb 16, 2018
style generator fix for nil geoms. #302
@ARolek
Copy link
Member

ARolek commented Feb 16, 2018

@vchrisb I just pushed up a fix to the v0.6.0 branch if you want to give it a test. If we can't generate a style we don't, rather than break the interface.

@vchrisb
Copy link
Author

vchrisb commented Feb 16, 2018

thx, I'll give it a try!

@ARolek
Copy link
Member

ARolek commented Feb 23, 2018

@vchrisb have you had a chance to try this on your end? we're going to be cutting the v0.6.0 branch soon so hopefully this is cleaned up for you.

@ARolek ARolek closed this as completed Feb 23, 2018
@vchrisb
Copy link
Author

vchrisb commented Feb 23, 2018

@ARolek thx, it did work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants