importer-exporter
importer-exporter copied to clipboard
Properly calculate the area/volume of a building/city object
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's surface_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:
PolyhedralSurface is invalid : Polygon 0 is invalid: points don't lie in the same plane : POLYHEDRALSURFACE(((5918945815606329/17179869184 3057265650599723/536870912 6240440971163599/140737488355328,5918942671690269/17179869184 764317136888791/134217728 6240440971163599/140737488355328,5918779445753151/17179869184 6114536738628043/1073741824 6240440971163599/140737488355328,1479695660302205/4294967296 1528632736716161/268435456 6240440971163599/140737488355328,739848229583061/2147483648 382157822126719/67108864 6240440971163599/140737488355328,5918875670200451/17179869184 3057262674187387/536870912 6240440971163599/140737488355328,5918876597913387/17179869184 764315520370475/134217728 6240440971163599/140737488355328,2959474857718317/8589934592 6114524086728131/1073741824 6240440971163599/140737488355328,5918945815606329/17179869184 3057265650599723/536870912 6240440971163599/140737488355328),(5918945815606329/17179869184 3057265650599723/536870912 592258535371309/17592186044416,2959474857718317/8589934592 6114524086728131/1073741824 592258535371309/17592186044416,5918876597913387/17179869184 764315520370475/134217728 592258535371309/17592186044416,5918875670200451/17179869184 3057262674187387/536870912 592258535371309/17592186044416,739848229583061/2147483648 382157822126719/67108864 592258535371309/17592186044416,1479695660302205/4294967296 1528632736716161/268435456 592258535371309/17592186044416,5918779445753151/17179869184 6114536738628043/1073741824 592258535371309/17592186044416,5918942671690269/17179869184 764317136888791/134217728 592258535371309/17592186044416,5918945815606329/17179869184 3057265650599723/536870912 592258535371309/17592186044416),(2959474857718317/8589934592 6114524086728131/1073741824 6240440971163599/140737488355328,2959474857718317/8589934592 6114524086728131/1073741824 592258535371309/17592186044416,5918945815606329/17179869184 3057265650599723/536870912 592258535371309/17592186044416,5918945815606329/17179869184 3057265650599723/536870912 6240440971163599/140737488355328,295947485
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?