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

Cannot Transform WKT MultiPolygonZ #155

Closed
mudandstars opened this issue Mar 15, 2024 · 3 comments
Closed

Cannot Transform WKT MultiPolygonZ #155

mudandstars opened this issue Mar 15, 2024 · 3 comments

Comments

@mudandstars
Copy link

Hi there,

when running pg2b3dm on my table, I get .glb files that seem to be just simple 2D triangles (using https://gltf-viewer.donmccurdy.com/ to investigate). Mapbox also does not display anything, even though it correctly fetches the data from my server (and draco compress it before).

I use this command to generate the .glb files:

pg2b3dm --format Mapbox --zoom 18 -h localhost -U gis -p 5433 -d gis -t geometries -c geometry -o static/custom/data/pg2b3dm

I use this command to draco-compress individual files:

npx gltf-pipeline -i x_y_z.glb -o x_y_z.glb -d -b

I attach a sample geometry of mine that results in a simple 2D Triangle in this text file - it is exactly like this in my DB.
These geometries are generated by a script of mine from .obj files.
geometry.txt

I appreciate any help.

Thank you very much

Paul

@bertt
Copy link
Member

bertt commented Mar 15, 2024

Hi Paul, I took a quick look, what's suspicious is that st_zmin(geom), st_zmax(geom) of that geometry returns 162.6828628618381, 162.8575055476819 , but in the vertices I see min values like 155... so maybe some invalid geometry or so?

@mudandstars
Copy link
Author

Hi,

thanks for the quick reply. I investigated further down the rabbit-hole and it seems my original WAVEFRONT OBJ file is incorrect. Using https://github.com/tudelft3d/val3dity to analyze my .obj file returns: "ring self-intersects or is collapsed to a line" for multiple faces.

Would you have any idea on how to fix the geometry?

Anyways, this is related to an underlying problem, so I close the issue here.

@bertt
Copy link
Member

bertt commented Mar 16, 2024

Maybe easier to do obj2gltf and add it to map? Like https://bertt.github.io/mapbox_3dtiles_samples/samples/standard/3dmodel/

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

No branches or pull requests

2 participants