-
-
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
Panic when selecting 3D geometry #89
Comments
@russss thanks for the bug report. Is there an open dataset I can use to recreate the problem? |
I think a minimal test case should be as simple as:
|
Even better. Thanks @russss. |
We've run into this as well, are there any plans to support, or at least not crash on, 3D geometries? |
Just checked the code and I realized that tegola does support PointZ, but not the PolygonZ which is what we are using, nor LinestringZ, multilinestringZ and multipolygonZ for that matter |
There is currently no plans to support the Z versions since we have not had a need, but I do plan to make it not crash. This should be an easy fix, where we ignore the z and m components. I just have gotten to it. |
@stvno did you have a chance to try the PR for gracefully handling 3d geoms? I hoping to get some feedback before we merge it into the v0.7.0 branch. |
I'm sorry, I missed this one. I've some other issues to attend to first, but I'll try it when I have a chance and let you know. |
Alright I have tested it with a config.toml:
PostGIS table:
And the commandline output generated by Tegola:
Still it would be nice if it would support 3D featuretypes, even when they are just rendered in 2D (as you can see I've added an extra column to the table which contains the 2D geometry for now) |
@stvno our first idea was to drop the 3rd dimension but WKB does not support more than 2 dimensions. PostGIS has an extended form of WKB known as EWKB. We don't currently have a decoder for EWKB, though this would be a great addition to the geom package. If an EWKB encoder / decoder was authored It would make sense to swap out the WKB reader in the PostGIS driver with the EWKB one and then we could properly drop Z values. We should open two new issues for this, one on the the geom package and one on tegola that depends on the geom package issue. |
@ARolek seems like a sensible approach. I wasn't aware that WKB didn't support the 3rd dimension. I'd vote to close this issue as in it doesn't crash anymore and indeed create two issues to track the EKWB support. |
Perfect! |
When selecting a 3D geometry from a table, tegola crashes with:
Using
ST_Force_2D
in the SQL fixes this but it would be useful if tegola could automatically discard the third dimension.The text was updated successfully, but these errors were encountered: