Skip to main content

I am trying to read some kml files that were exported from Avenza PDF maps. The KMLs contain Lines, Points, and Tracks. I am able to read the lines and points just fine but the tracks are not output from the reader. Is there some way of exposing the Tracks?

Can you post a sample of the output KML?

 

 


avalanche-paths-botreatment-map-008-w-plots.kml


Can you post a sample of the output KML?

 

 

I have uploaded one of the kml's containing several tracks

 

 


Based on your sample kml file, the tracks seem to be output as a Placemark feature, but they do not have any geometry. You can isolate them using a GeometryFilter and by connecting an Inspector to the Null geometry output.

In the Inspector, click on one of the <no schema> features and inspect the format attributes in the Feature Information window:

0684Q00000ArJesQAF.png

As you can see, the tracks have several attribute lists (some of them nested) that you'll have to expose manually in your workspace (AttributeExposer) and then also process manually.

Some of the attribute names you should (or could) expose include:

kml_gx_track_extendeddata_schemadata_gx_simplearraydata{}_name
kml_gx_track_extendeddata_schemadata_gx_simplearraydata{}_gx_value{}
kml_gx_track_gx_angles{}
kml_gx_track_gx_coord{}
kml_gx_track_when{}
kml_name
kml_parent

If you need to construct the track geometry, you will probably have to build the track line manually using the kml_gx_track_gx_coord{} list, e.g. using a combination of the ListExploder, AttributeSplitter and VertexCreator.


Based on your sample kml file, the tracks seem to be output as a Placemark feature, but they do not have any geometry. You can isolate them using a GeometryFilter and by connecting an Inspector to the Null geometry output.

In the Inspector, click on one of the <no schema> features and inspect the format attributes in the Feature Information window:

0684Q00000ArJesQAF.png

As you can see, the tracks have several attribute lists (some of them nested) that you'll have to expose manually in your workspace (AttributeExposer) and then also process manually.

Some of the attribute names you should (or could) expose include:

kml_gx_track_extendeddata_schemadata_gx_simplearraydata{}_name
kml_gx_track_extendeddata_schemadata_gx_simplearraydata{}_gx_value{}
kml_gx_track_gx_angles{}
kml_gx_track_gx_coord{}
kml_gx_track_when{}
kml_name
kml_parent

If you need to construct the track geometry, you will probably have to build the track line manually using the kml_gx_track_gx_coord{} list, e.g. using a combination of the ListExploder, AttributeSplitter and VertexCreator.

I'm still having trouble exposing any of the lists including the kml_gx_track_gx_coord{} list.  Its not in the format attributes dialog so I have tried to expose it with the AttributeExposer but when it gets to the ListExploder all features come out of the rejected port. I am assuming it is rejected because it is not finding the list.

 

 


That's because the first element in the coord list is not 0.

 

rename kml_gx_track_gx_coord to kml_gx_track_gx_coord{0} prior to exploding

Try the following workspace kml-extendedschema.fmw.


Thanks renaming kml_gx_track_gx_coord to kml_gx_track_gx_coord{0} prior to exploding was the ticket but the complete workbench was much appreciated!


Try the following workspace kml-extendedschema.fmw.

Without having seen this reply, I got to exactly the same solution! The only difference being that I was just using the more generic XML reader:

 

 


Looks like tracks aren't yet (officially) supported. It's already filed as PR#37822 - I'm going to add a link to this thread and increase the priority.


Hi Mark,

Could you confirm by when the feature PR37822 is officially supported in FME?

Thanks,

Ruchi


Hi Mark,

Could you confirm by when the feature PR37822 is officially supported in FME?

Thanks,

Ruchi

Not yet I'm afraid. I've added your details to the request so you are informed when it is done. I honestly don't know when that will be. If you have a solid business case for implementing this, then please let us know via either support (safe.com/support) or your sales contact/reseller.

 


Reply