-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Empty value stops processing of layer data #429
Comments
@tomass thanks for the detailed report. I think your proposed solution should work fine. I will add it to our roadmap. |
This has been addressed in the v0.7.0 branch. |
Can you reopen this one or should I create a new issue as originally I did not mention usage of st_intersection which is causing "second part" of this problem? |
@tomass re-opening. |
Added back geometry collection length check to ignore 0 length geometry collections. Added associated test case. closes #429
Added back geometry collection length check to ignore 0 length geometry collections. Added associated test case. closes #429
Added back geometry collection length check to ignore 0 length geometry collections. Added associated test case. closes #429
* moved empty geometry collection check to the atlas package so all providers can benefit. * Added test case to atlas for empty geometry collection Reworked the TestEncode function to match the new testing convention. * added emptycollection test provider closes #429
This fix has been merged into v0.9.x branch. I'm working on cutting a release soon. |
* moved empty geometry collection check to the atlas package so all providers can benefit. * Added test case to atlas for empty geometry collection Reworked the TestEncode function to match the new testing convention. * added emptycollection test provider closes #429
* moved empty geometry collection check to the atlas package so all providers can benefit. * Added test case to atlas for empty geometry collection Reworked the TestEncode function to match the new testing convention. * added emptycollection test provider closes #429
It is useful to add some casing to polygon geometries (for example to water features). But as OpenStreetMap water polygons are made of parts (for various reasons), it could give unwanted artefacts as can be seen in this example where smaller river flows into the larger one:
The usual solution is to aggregate geometries with st_union when creating vector tile (aggregating water geometries beforehand for whole region could create huge geometries so it is not a good solution). For example:
When a tile has no geometries in a BBOX, this produces a null value for geom (because st_union is an aggregate function). Such null value stops Tegola processing of layer data with following output to console:
2018/06/09 22:15:25 map.go:193: err fetching tile (z: 10, x: 584, y: 323) features: unable to decode layer (water10) geometry field (geom) into wkb where (gid = 1): EOF
Now this would not be a problem (if we ignore error message), but if there is another part in a query:
then geometries of the second part of such query are not placed into the vector tile basically leaving layer empty in particular tile.
I guess Tegola should handle such null values as "no geometry" and continue with processing query results.
The text was updated successfully, but these errors were encountered: