Closed collaer closed 1 year ago
I solved the issue, my bad.
The root cause was me not understanding that triangle wasn't installed: https://github.com/cityjson/cjio/blob/master/cjio/geom_help.py#L140
Maybe the error message when triangle is not installed (Houston we have a problem) could be reviewed. Either the error message could be improved or we could check if MODULE_TRIANGLE_AVAILABLE is True as a prerequisite to triangulate?
That's simple enough ticket that I could send as a MR if you think it's worth it?
So if someone experience this, just a pip install triangle will solve it
You could validate if triangle is intalled by
from cjio import geom_help
print(geom_help.MODULE_TRIANGLE_AVAILABLE )
Hi, thanks for reporting. cjio does check if one of the required triangulator libraries are installed and gives a warning in the console if not. But only when you use cjio as a CLI, as cjio was intended to be used. When you use cjio as a library, as you do, then there is no warning, and there is not going to be anytime soon either. If we ever sort out (refactor) cjio so that it works well both as a CLI and an API, then API logging will be implemented as well. Because of this, please don't send a MR for this, we won't merge it.
Thanks for the explanations!
Describe the bug With a given a cityjson file (enclosed), I was provided, I am trying to convert it into a glb file in order to use in in open3d.
The process is going throw if I specify not to triangulate, but geometries are wrong (triangles mess) but were looking good in cityjsonninja, see screenshots.
If I specify do_triangulate=True (I beleive that could be the missing step) I receive the following error message:
My questions are:
Is the cityjson not well formed or has any quality issue I should check and filter?
Am I doing something wrong?
Where should I look first and any tips if I would like to help to fix that issue?
Is there another better way to load a cityjson file into open3d python, I'd like to compute some raytracing intersections?
cjio version What does
cjio --version
print? Or did you install from a git branch? It's a recent pip install cjio: cjio.version is '0.8.1'Cityjson file version is 1.1
To Reproduce Steps to reproduce the behavior? What error message do you see in the console? The code snippet is the following:
With that cityjson file: enclosed here tile.city.json.txt (added txt to upload it here) tile.city.json.txt
Expected behavior Being able to convert cityjson lod2.2 to a glb or other 3d format in order to load 2.2 into open3d python.
Screenshots In ninja:
In glb viewer (loading glb created when triangulation is set to False):
Desktop (please complete the following information):