Question

Wheres my dynamic KMZ/KML schema?


Userlevel 4
Badge +26

Does anyone know how to create a multi-layer KMZ/KML with a dynamic schema?

 

 

Whenever I try It seems to only properly create the first layer with the correct schema and layer - everything else just becomes a placemark?

 

 

I want to use the Schema From Schema Feature option in the output feature type. Has anyone got this working?

 

 

If I create layers manually then FME will create multiple layers and schema definitions in the output doc.kml. If I use dynamic then I only get the first layer defined.

 

 

I can merge all feature into a single layer for the file and the result looks great in Google Earth but the issue is there is one Schema in the output doc so when reading in with FME there is only one layer and one mega Schema.

 

 

 

 

 


4 replies

Userlevel 3
Badge +17

Hi @virtualcitymatt

Hope you're doing well. I'm sorry you're running into this issue. Would you be able to provide an example workspace?

Edit: After some investigation, I do see the behaviour you're reporting with attribute tables in KML balloon not appearing for some feature types when a feature type fanout is used with dynamic schema.

I have found that the attribute table will appear for more than one feature type if you merge the schema features into one schema feature. The KML writer feature type also needs to be named Placemarks (enable Dynamic Schema Definition with Schema Source from schema feature). I have attached an example workspace of this approach.

AttributeTableWithKMLMultipleFeatureTypes.fmwt

I'm not sure if this is expected behaviour. I will ask our development team and get back to you.

Userlevel 4
Badge +26

Hi @virtualcitymatt

Hope you're doing well. I'm sorry you're running into this issue. Would you be able to provide an example workspace?

Edit: After some investigation, I do see the behaviour you're reporting with attribute tables in KML balloon not appearing for some feature types when a feature type fanout is used with dynamic schema.

I have found that the attribute table will appear for more than one feature type if you merge the schema features into one schema feature. The KML writer feature type also needs to be named Placemarks (enable Dynamic Schema Definition with Schema Source from schema feature). I have attached an example workspace of this approach.

AttributeTableWithKMLMultipleFeatureTypes.fmwt

I'm not sure if this is expected behaviour. I will ask our development team and get back to you.

Hiya Debbie!

 

 

Thanks for digging into it! Your example actually demonstrates the problem I'm facing. It looks great in GoogleEarth but as you've mentioned all features are on the same layer: Placemarks. This is fine when looking in Google Earth because of the folder structure and the way GoogleEarth treats missing attributes. It looks like they are individually defined layers but they are not.

 

 

I have been unable to create separate kml layers with this method.

 

 

When inspecting the kml doc in a text editor you scan see that there is only a single schema defined. This is different when manually creating output feature types, multiple layers and get defined.

 

 

It's not a huuuge issue, however, When reading back in with FME the data are all on the same layer/featureType and share the same MegaSchema.

 

 

Expected would be to create a new layer for each defined feature type.

 

 

Once again - thanks @debbiatsafe for digging into this!
Userlevel 3
Badge +17

Hiya Debbie!

 

 

Thanks for digging into it! Your example actually demonstrates the problem I'm facing. It looks great in GoogleEarth but as you've mentioned all features are on the same layer: Placemarks. This is fine when looking in Google Earth because of the folder structure and the way GoogleEarth treats missing attributes. It looks like they are individually defined layers but they are not.

 

 

I have been unable to create separate kml layers with this method.

 

 

When inspecting the kml doc in a text editor you scan see that there is only a single schema defined. This is different when manually creating output feature types, multiple layers and get defined.

 

 

It's not a huuuge issue, however, When reading back in with FME the data are all on the same layer/featureType and share the same MegaSchema.

 

 

Expected would be to create a new layer for each defined feature type.

 

 

Once again - thanks @debbiatsafe for digging into this!

Hi @virtualcitymatt​ 

I'm pleased to let you know this issue has been fixed in the 2020.2 (beta builds 20720+) and 2021.0 (beta builds 21150+). You can download the latest beta installers here.

The KML writer will create separate schemas for each feature type when using a dynamic schema. As a result of this fix, attribute tables will now appear for all feature type in Google Earth.

Userlevel 4
Badge +26

Hiya Debbie!

 

 

Thanks for digging into it! Your example actually demonstrates the problem I'm facing. It looks great in GoogleEarth but as you've mentioned all features are on the same layer: Placemarks. This is fine when looking in Google Earth because of the folder structure and the way GoogleEarth treats missing attributes. It looks like they are individually defined layers but they are not.

 

 

I have been unable to create separate kml layers with this method.

 

 

When inspecting the kml doc in a text editor you scan see that there is only a single schema defined. This is different when manually creating output feature types, multiple layers and get defined.

 

 

It's not a huuuge issue, however, When reading back in with FME the data are all on the same layer/featureType and share the same MegaSchema.

 

 

Expected would be to create a new layer for each defined feature type.

 

 

Once again - thanks @debbiatsafe for digging into this!

Woo! Thanks for this Debbie! Legend!

Reply