Skip to main content

I have a dataset with 3D building saved in a geodatabase (*.gdb).

I would like to write the dataset to a PostGIS-database. However, when I do this, some information seems to get lost:

 

 

This is the same building, the first directly from gdb-file, the second read from the PostGIS-database. The color information is lost and none of the attributes from the gdb are written to the database.

I am using a PostGIS-writer in FME 2018.1

Is there a way to transfer all information from the original dataset to the database?

 

PostGIS doesn't offer any generic color support by itself, so you'll need to find the GDB color attributes and translate them to new PostGIS attributes. However, this means that an application reading the data won't know that's the color, so you'll need to set up a translation for that as well.

Same goes for the other attributes. Usually the Generate Workspace option does a pretty good job of setting things up right for you, but in this case I think you'll need to dive in a bit deeper.


PostGIS doesn't offer any generic color support by itself, so you'll need to find the GDB color attributes and translate them to new PostGIS attributes. However, this means that an application reading the data won't know that's the color, so you'll need to set up a translation for that as well.

Same goes for the other attributes. Usually the Generate Workspace option does a pretty good job of setting things up right for you, but in this case I think you'll need to dive in a bit deeper.

Ok, the color information is saved as appearance in the Faces of the MultiSurface. How can I extract the color information for each face and save it as attribute?

This is how it looks like in the Inspector:


Hi, I think you might preserve the colors by first use a GeometryCoercer (set to fme_composite_surface) and thereafter use a GeometryPartExtractor to extract the IFMEFace. See the images below. You can use a counter to keep track of which component gets what color in PostGIS.

 


Just as an alternative, you could also look at CityGML and the 3DCityDatabase as a solution. https://www.3dcitydb.org/3dcitydb/ It's all open source and runs on PostGIS. It's a fairly complex data model, however, which might add more complexity than you need.

 

Just something to think about.

 

 


Reply