Skip to main content

When writing kml folders, how do I control the order they appear in the GE table of contents. It doesn't seem to be the order they are in the workbench or the creator number.

 

Also I'm currently not getting any shape to kml translation, missing something easy in there. The goal is to eventually spilt nautical chart outlines by scale (ive done this in another workbench) and then conditionally pipe them to each folder by scale, but one thing at time.

 

You have two kml writers in your workspace when you only want one if your aim is one kml file. The shape features are going to a different writer with the same filename so probably get overwritten.


If I do that then I don't get the folders in the TOC. shape2kml_folder_test2.fmwt


Right, it looks like there is a way to sort the order of features within a folder, but not the folders themselves, they appear to be handled in alphabetical order. So adding a,b,c,d and e to them is a quick (but not very nice) workaround.

I did see a post by @Mark2AtSafe on StackOverflow from back in 2011 referring to PR#27504 that would fix this but I can't figure out if anything has actually been implemented.


If I do that then I don't get the folders in the TOC. shape2kml_folder_test2.fmwt

The folders can be created from giving the feature an attribute with the folder name it needs to be in and then selecting this attribute in your feature type name. Check in the advance parameters but I think 'Create Folder for Feature Type' is set as Yes by default

shape2kml_folder_test2.fmwt


Hi @jhawks

PR#27504, as mentioned in redgeographics' answer, addresses the write order of folders created implicitly (eg. via feature type fanout as demonstrated in this article). This PR has not been resolved. Like redgeographics found, the current behaviour is writing folders in alphabetical order.

There is a fixed PR which addresses the write order of folders created explicitly (eg. via KML IDs as demonstrated in this article). In this case, folders are written in the order they enter the writer.

If you require folders to be ordered alphabetically, I would recommend egomm's suggestion of using feature type fanout. If the order is not alphabetical, I would recommend reviewing this KML ID folder article. The folder features should be sorted in the order you want to appear in Google.

I have attached a workspace demonstrating the difference in folder order between the two approaches. I hope this information helps.

shape2kml_folder_test_order.fmw


Right, it looks like there is a way to sort the order of features within a folder, but not the folders themselves, they appear to be handled in alphabetical order. So adding a,b,c,d and e to them is a quick (but not very nice) workaround.

I did see a post by @Mark2AtSafe on StackOverflow from back in 2011 referring to PR#27504 that would fix this but I can't figure out if anything has actually been implemented.

The reference number is now FMEENGINE-29905 - sadly it's not been implemented yet.


Reply