Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
analytixgroup
Partner - Contributor
Partner - Contributor

How to load kml files of the type "line" into QlikView or Qlik Sense?

Hello everybody

I am perfectly capable of loading kml files of the type "polygon" and "point" into QlikView and Qlik Sense. Though I am not able to load kml files of the type "line". Has anybody managed to do this and if yes, could you provide an example comprising

1) a sample kml file containing one or more lines

2) the corresponding code of the script editor (QlikView or Qlik Sense).

Both for QlikView and Qlik Sense I have downloaded and installed the necessary GeoAnalytics extension files.

Thank you!

1 Solution

Accepted Solutions
Patric_Nordstrom
Employee
Employee

Hi Simon,

The built-in support for KML only loads points and polygons.

But you can load it as xml, rename file and then add some brackets to make it a proper Sense geometry like this:

railway:

LOAD

    id,

    name,

    '[[' & replace("LineString/coordinates", ' ' , '],[') & ']]' as line_geom,

    "ExtendedData/SchemaData/SimpleData"

FROM [lib://railways/railways.xml]

(XmlSimple, table is [kml/Document/Folder/Placemark]);

The railway kml file is borrowed from the City of Vancouver

Railway - Open Data

Thanks,

Patric Nordström

Qlik

View solution in original post

4 Replies
Patric_Nordstrom
Employee
Employee

Hi Simon,

The built-in support for KML only loads points and polygons.

But you can load it as xml, rename file and then add some brackets to make it a proper Sense geometry like this:

railway:

LOAD

    id,

    name,

    '[[' & replace("LineString/coordinates", ' ' , '],[') & ']]' as line_geom,

    "ExtendedData/SchemaData/SimpleData"

FROM [lib://railways/railways.xml]

(XmlSimple, table is [kml/Document/Folder/Placemark]);

The railway kml file is borrowed from the City of Vancouver

Railway - Open Data

Thanks,

Patric Nordström

Qlik

analytixgroup
Partner - Contributor
Partner - Contributor
Author

Thank you, Patric! This workaround solves the problem.

Best regards

Simon

Not applicable

Hi does it work with default Map available with Qlik SenseCapture.PNG

Patric_Nordstrom
Employee
Employee

No, sorry, only the Qlik GeoAnalytics map object.