Closed iduuck closed 3 months ago
The importer does neither check nor correct invalid geometry but just imports it as-is. So, the geometry issues come from your input data. There are some tools for validating CityGML geometries. I can recommend CityDoctor (open source) and FME (commercial). You could use these tools to validate your input data before importing it.
Hi!
Another thing to consider: PostGIS 3D functions (e.g. ST_Volume) are a pick "picky" when it comes to the planarity test with polygons that, for example, make up a PolyhedralSurface.
Your geometries could be indeed correct (you can test them using the tools that Claus suggested), but sometimes, if they are not triangulated and due to - I assume - coordinate conversion to PostGIS' binary wkt, you may still end up with the error you show. This has happened to me a number of times computing volume as you are doing.
Unluckily, to my knowledge, there is no way at the moment to set a tolerance threshold in ST_Volume to overcome this "issue".
Hey together, I am currently struggling with a problem, that I actually don't know is because of the source data, or because of the importer getting anything wrong.
I am using the data from the city of duisburg to generate some data on my own API. Now, the problem is, that I am having a hard time calculating the area (surface area) and the volume of the building.
As far as I understand, I would need to calculate the
st_3darea
of the lod2_solid_id'ssurface_geometry
table entry. The problem is now, that I am not getting it to run, because of an internal error in PostGIS.The error is as following:
So, my question is, is this something the importer should "correct" when importing, or is the importer just "dumb" and we are trusting that the source data is valid?