Qlik Community

Qlik GeoAnalytics Discussions

Discussion Board for collaboration regarding Qlik GeoAnalytics.

analytixgroup
New 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
Employee
Employee

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

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

4 Replies
Employee
Employee

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

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
New Contributor

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

Thank you, Patric! This workaround solves the problem.

Best regards

Simon

Not applicable

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

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

Employee
Employee

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

No, sorry, only the Qlik GeoAnalytics map object.

Community Browser