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?
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:
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:
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.
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.
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