Geographic Information Systems Asked on June 4, 2021
I have geometry of buildings in Shapefile MultiPatch format. I want to import it into PostGIS database in the same format.
Is that even possible? If yes, then how?
I realize this is quite old but just came across the same issue and wanted to share a solution. Strictly speaking John Powell is right – it can't be the same format because it needs to be converted on import to a PostGIS-supported form. However, using ogr2ogr
you have some control over how this happens:
Something like $ ogr2ogr -f "PostgreSQL" "PG:host=localhost port=5432 user=your_name dbname=db password=pass" "path_to_multipatch.gdb" -lco GEOMETRY_NAME=geom -lco FID=gid -lco PRECISION=no -nln table_name -overwrite
will create a PostGIS table with the default MULTIPOLYGON Z geometry type.
By adding -nlt "POLYHEDRALSURFACE Z"
you can choose to import as polyhedral surfaces instead, which may be better depending on the use case. I believe this will also work if you want TIN Z, as with James Milner's solution using FME Shapefile to PostGIS.
Answered by carstoid on June 4, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP