Skip to main content

I’ve seen both examples of creating KML:
https://support.safe.com/hc/en-us/articles/25407754952717-Creating-KML-Folders-Through-KML-IDs
https://support.safe.com/hc/en-us/articles/25407609389453-Creating-KML-Folders-By-Feature-Type-Fanout

I’m able to create folder structure:

When I tried to add placemarks under subfolder, my folder structure gets overwritten.   Subfolder has ID in the form of State and AssetType (minus spaces and special characters, you can see the ID below in folder name).

 

Example, Alabama’s only plant asset has parent ID Alabama01Plant.

What am I missing?  Have latest FME 2025.1 Form.

Hello ​@hdnguyen 

 

Could you share your workspace to analize?

 

Thanks in Advance,


Which of the two methods you mentioned are you using? If you are using the kml attribute method I am assuming your folder levels are something like this?
Level 1:

kml_id= value(State)

kml_parent= doc

Level 2:

kml_id= value(State)value(AssetType)

kml_name= value(AssetType)

kml_parent=value(State)

Features for both of these levels are created and sent to the kml writer as a folder.

 

Placemarks:

kml_id= value(example)

kml_parent= value(State)value(AssetType)


Which of the two methods you mentioned are you using? If you are using the kml attribute method I am assuming your folder levels are something like this?
Level 1:

kml_id= value(State)

kml_parent= doc

Level 2:

kml_id= value(State)value(AssetType)

kml_name= value(AssetType)

kml_parent=value(State)

Features for both of these levels are created and sent to the kml writer as a folder.

 

Placemarks:

kml_id= value(example)

kml_parent= value(State)value(AssetType)

 

I used KML ID method, already had everything configured the way you suggested.  For some odd reason, it worked today.  See screenshot.  I’m not sure what I did last week prior to leaving, but it’s perfect now.  Now I’m curious as to why it worked.  Tried it a few more time, KML is exactly as intended.

 


I know what I did differently today vs last week.  Last week, I would run the folder steps first, then run the placemarks after.  Today, I ran everything at once.  They both share same KML writer!


I know what I did differently today vs last week.  Last week, I would run the folder steps first, then run the placemarks after.  Today, I ran everything at once.  They both share same KML writer!

Ah, that would do it. When writing just the placemarks by itself it will overwrite the KMZ and then only have the placemarks, but because of the kml attributes it was trying to make the folders based on the limited info it had. I have had that happen before as I often write just the folders first as a test. Then just need to make sure you hit the right run button for all featuretypes for that writer.