Skip to main content
Question

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


gis2020
Participant
Forum|alt.badge.img

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.

7 replies

danilo_fme
Evangelist
Forum|alt.badge.img+43
  • Evangelist
  • 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
Evangelist
Forum|alt.badge.img+43
  • Evangelist
  • August 21, 2020
danilo_fme wrote:

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+54

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
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • August 21, 2020
danilo_fme wrote:

Workspace_KML

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


gis2020
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • August 21, 2020
nielsgerrits wrote:

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+54
gis2020 wrote:

@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
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • August 21, 2020
gis2020 wrote:

@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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings