Skip to main content

I've been given some data - 10 KMZ files which seem to comprise multiple named layers (so over 70 in total) with only occasional data in the Name field, which I want to convert to TAB format. I'm struggling with it - below are 3 views of the data - in Google Maps, in QGIS and in FME Data Inspector. I also attach one of the KMZ files here. I'd like to generate a workspace to produce 10 MapInfo tables of points, lines and polygons, to correspond with the KMZ files and named as the KMZ files, but with an attribute column populated with the layer names, for example, "J Garden Terrains" (in QGIS appears to be the Layer names) and a Name field for the occasional data that has. The only way I can see of converting the data at the moment is to click on each layer in QGIS and Save As a MapInfo table. I'm sure I must be able to do this in FME - I hope so! If anyone can help I'd be very grateful. Thanks, Jane

KMZ Diss Google MapsKMZ Diss QGISKMZ Diss FME

Hi @janem​ 

The layer name you want is stored in the Folder features under the attribute kml_name. To transfer this information onto Placemark features, expose the kml_parent & kml_name on Placemarks, then expose the attribute kml_parent on Placemark features.

Join the two feature types using a FeatureJoiner (Placemarks as left and Folder as right) with the left key as kml_parent and right key as kml_id. Set Attribute Conflict Resolution parameter to 'Use Right'.

kml_name should now be the layer name.

Before doing this, you may want to copy or rename kml_name on the Placemark features to another attribute since it contains the feature name (eg. Diss Mere) before the FeatureJoiner. Otherwise, this information will be overwritten by the layer name.

Edit: this tutorial should help with the rest of your workflow https://community.safe.com/s/article/getting-started-with-kml-kml-to-mapinfo-tab

kmlFolderPlacemarkJoin


That sounds great Debbie, many thanks! Just what I was after. When I get chance I shall try this and report back.


That worked a treat! Thanks again for this. I added an Attribute Manager to add an fme_feature_type attribute which added the layer names (because I had several) to an attribute in the final combined layer.


Reply