{{{ We may have to deal with: - ungroupped placemarks (no containers in KML file) - grouped in flat structure (no nested containers) - grouped in tree structure (nested containers: folders and documents) I believe, all these 3 cases have to be handled differently regarding creation of layers 1) Layers created according to geometry types a Placemark is always contained by a Document or Folder Ah, so 1st and 2nd are the same I forgot So, we have 2 cases flat or tree yes The case with tree needs special treatment right Let's see: Case 1: All placemarks are of the same type in Folder 1 Case 2: Folder 1 stores placemarks of type of point and polygon The 1st one is simple: we have one layer The 2nd case is complicated We know that we *have to* group placemarks according type of geometry But what about folder? ie. if we have Folder 1 (points and lines), Folder 2 (points and polygons), Folder 3 (points, lines, plolygons) Folder 1.1 points Folder 1.2 lines ... or "Folder 1 - points" -> points put the contenttype in the name Right, that sounds like a good combination of groupping levels Level 1: geometry type: Level 2: container What about nested containers? Do we extend Level 2 to nested levels hm where I consider "nested level" as point in which we create new layer ie. Folder 1 - Folder 1.1 - Folder 1.2 - Folder 1.2.1 - Folder 1.2.1.1 here, we may have to create even 5 layers :-) For instance: layer: folder_1.shp - all placemarks stored directly under Folder 1 folder_1_1.shp - all placemarks stored directly under Folder 1.1 folder_1_2.shp - placemarks from Folder 1.2 etc. yes I assume we can have to deal with something like this: Folder 1 - Placemark 1 - Placemark 2 - Placemark 3 - Folder 1.1 -- Placemark 1 -- Placemark 2 Folder 2 right etc Folder 1 -> Germany Placemark 1 -> Border Folder 1.1 -> Bavaria Placemark 1 Border Placemark 2 -> Cities that would be 2 Files/Layers Folder 1 with Name Germany and Content Border Folder 1.1 with Name: Germany | Bavaria and Content Border and Cities Number of layers = number of geometry types Number of layers does not depend on number of containers but only on number of geom types Containers only affect groupping scheme Am I correct? no in my example the Borders are Linestrings but they would be in two Layers with spliting the geometrie types ah, you're perfectly right my example would do: my mistake Folder 1.1 with Name: Germany | Bavaria (linestring) Folder 1.1 with Name: Germany | Bavaria (point) so it would be three files/layers roughly, number of layers = N folders x N types }}}