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?

  • Please edit the question to include the software you would use for the conversion.
    – Vince
    Jun 29, 2015 at 11:57
  • According to the ogr2ogr docs, "MultiPatch files are read and each patch geometry is turned into a multi-polygon representation with one polygon per triangle in triangle fans and meshes." So, not exactly the same format. Jun 29, 2015 at 12:05
  • When I tried to import it with tool pgShapeLoader, it appeared as "unsupported data type". Can you help me how can I get this data to DB, please? Thanks for answer. Jun 30, 2015 at 12:40
  • This is possible using FME Shapefile to PostGIS. I have achieved it before and it creates Tin Zs and PolyhedralSurfaces Jan 9, 2016 at 21:27
  • @JohnPowell From that description in docs I would expect that all the resulting polygons are triangles so they all have exactly 3 vertices, but I'm getting polygons with variable number of vertices. It doesn't make sense to me.. Nov 8, 2018 at 20:57

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.