Skip to main content
Question

extracting information from different folders in KML to convert to the shapefile

  • August 21, 2020
  • 7 replies
  • 148 views

gis2020
Contributor
Forum|alt.badge.img+5

Hi All,

 

I have a KML data which has many folder . Each folder is having different set of geometry eg route1 ,route 2 with other attributes . also each folder has unique number which i want to link to route information . herewith i have attached the screen shot of the KML highlighting the information which i am trying to fetch . Also attaching the KML file .

 

 

 

Things i have tried :

 

i mange to do the geometry extraction with KML description for each route but unable to link the route to the folder number .

 

 

 

Any suggestion on this ?

 

Thank you in advance.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • August 21, 2020

Hi @gis2020​ 

I exposed into your Reader the format attribute kml_name.

I used too the transformer HTMLToXHTMLConverter for extract description.

The transformer TesterFilter was used for separate the kml_name:

  • Route1
  • Route2
  • Others

 

Thanks in Advance,

Danilo


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • August 21, 2020

Hi @gis2020​ 

I exposed into your Reader the format attribute kml_name.

I used too the transformer HTMLToXHTMLConverter for extract description.

The transformer TesterFilter was used for separate the kml_name:

  • Route1
  • Route2
  • Others

 

Thanks in Advance,

Danilo

Workspace_KML


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • August 21, 2020

The Features with featuretype Folder have the attributes kml_id and kml_parent.

You can see those in the Inspector when you select a feature and check the Feature Information window. Use an AttributeExposer to expose them. .

With these attributes you should be able to rebuild the folder structure.


gis2020
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 61 replies
  • August 21, 2020

Workspace_KML

Image 4@danilo_fme​ i have tried this but this doen't give me the folder name/number for routes .


gis2020
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 61 replies
  • August 21, 2020

The Features with featuretype Folder have the attributes kml_id and kml_parent.

You can see those in the Inspector when you select a feature and check the Feature Information window. Use an AttributeExposer to expose them. .

With these attributes you should be able to rebuild the folder structure.

@nielsgerrits​ i have tried this option also but there is definite link between the folder and routes . as KML_id are different for each description line .

eg kml_id_batch_b_1_IDN_1.1.13 for folder and kml_id_batch_b_1_IDN_1.1.13.3 and kml_id_batch_b_1_IDN_1.1.13.4 for routes . Also there is no consistency of numbering.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • August 21, 2020

@nielsgerrits​ i have tried this option also but there is definite link between the folder and routes . as KML_id are different for each description line .

eg kml_id_batch_b_1_IDN_1.1.13 for folder and kml_id_batch_b_1_IDN_1.1.13.3 and kml_id_batch_b_1_IDN_1.1.13.4 for routes . Also there is no consistency of numbering.

  • Folder "515552200" has id kml_id_batch_2_1.1.13 and parent kml_id_batch_2_1.1
  • Folder "Route1" has id kml_id_batch_2_1.1.13.3 and parent kml_id_batch_2_1.1.13
  • Placemark "Route1" has id kml_2 and parent kml_id_batch_2_1.1.13.3 and kml_description POS=0 DL=0 NEG=21 DL=20

The numbering is structured by points. Every point is a level deeper.

What I would do:

  • Determine the max number of levels.
  • Use BulkAttributeRenamers to add prefixes like Level1,Level2,etc to the attributenames. (Split features using the number of points in each id.)
  • User FeatureMergers to add the parent to each child, starting with the deepest level and work you way up.

gis2020
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 61 replies
  • August 21, 2020

@nielsgerrits​ i have tried this option also but there is definite link between the folder and routes . as KML_id are different for each description line .

eg kml_id_batch_b_1_IDN_1.1.13 for folder and kml_id_batch_b_1_IDN_1.1.13.3 and kml_id_batch_b_1_IDN_1.1.13.4 for routes . Also there is no consistency of numbering.

@nielsgerrits​ that's what exactly i am doing now . i am extracting the parent from the child eg 2_1.1.13 and then i am going to match it with folder parent.