Question

kml/kmz to stl

  • 26 July 2019
  • 2 replies
  • 53 views

I have recently just discovered this software and it seems like a really powerful utility. What I would like to do is take a kmz file of building geometry that has been verified in Google Earth and convert the file into a meshable file type such as an stl. Is this possible? I see from the data inspector that all of the points necessary to define each building exist in LLA format and data sets are defined as boundaries and polygons so I'm inclined to think it's possible, I just can't get it to work. I've also noticed that kml/kmz files can't be inspected in 3D which I believe is a manifestation of my issue. Any help is greatly appreciated! I've attached a screenshot from the data inspector in 2D and 3D as well as one from Google Earth

 

 

 


2 replies

Userlevel 2
Badge +17

Hi @sschoenhardt,

The KML file is not displaying well in the Data Inspector due to KML's lat/long coordinate system, where the XY coordinates are in degrees, but the elevation is in meters. This is also something you will need to adjust when writing to STL. Please use a CommonLocalReprojector transformer to convert to a local coordinate system, with X, Y and Z all in meters.

The KML data appears have the buildings made up of aggregates of polygons, which needs to be slightly modified to write to STL. Please add a GeometryFilter transformer and set its Geometry Types to Filter to Area, and Homogenize Collections to Yes. This will ensure that only MultiPolygons are sent to the STL writer.

Hi @sschoenhardt,

The KML file is not displaying well in the Data Inspector due to KML's lat/long coordinate system, where the XY coordinates are in degrees, but the elevation is in meters. This is also something you will need to adjust when writing to STL. Please use a CommonLocalReprojector transformer to convert to a local coordinate system, with X, Y and Z all in meters.

The KML data appears have the buildings made up of aggregates of polygons, which needs to be slightly modified to write to STL. Please add a GeometryFilter transformer and set its Geometry Types to Filter to Area, and Homogenize Collections to Yes. This will ensure that only MultiPolygons are sent to the STL writer.

Thank you so much @daveatsafe!

The CommonLocalReprojector transformer worked perfectly for the issue I was experiencing. Unfortunately, I was unable to get the GeometryFilter transformer to accomplish the necessary conversion needed to properly convert to STL. When using that transformer, the generated STL files were empty. Perhaps I had configured the transformer incorrectly or incompletely.

However, with the help of more wonderful online support staff at FME, @nathanatsafe directed me to use the Triangulator transformer which worked perfectly and allowed me to convert successfully to an STL!

For any new users like myself, attached is an image of my workspace. "Placemark" is simply the name of the feature-group I am converting.

 

Thank you again!

Reply