Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
holzhar002
Contributor
Contributor

Cannot import kml file of the netherlands correctly

Hi,

 

I am trying to import the kml file of the netherlands wil all the corrected information, but during the import i do not see all the information (only 4 columns)

I need the Coordinates (polygon & multypolygons) and the information of the provinces (name and code) and multiplicities (name and code) for my school project.

Ik can see that all the information is there, i cannot get it to work with Qlik Sense.

Ik have a copy of the kml file at:  https://isdeleukste.nl/HvA/BI/GeoData/Grenzen_van_alle_Nederlandse_gemeenten_en_provincies.kml

Could you please help me?

 

Best reguards,

Remco Holzhaus

 

Labels (3)
1 Solution

Accepted Solutions
dmoon2208
Contributor III
Contributor III

Hi,

Qlik Sense is very particular on the format of the KML file and only show 4 fields, I normally just use the name and area fields. I assume you are looking for something like  (you can change the label to added in the province, code etc)

Netherlands.jpgTo do this, I normally take the original KML file and using QGIS will generate two files. Takes about 10 minutes. The first is the KML file to use as my mapping layer which has the name and area to map. The second is a file to use as a lookup to give me the code, province etc.

Orginal KML looks like :

<name>Grenzen_van_alle_Nederlandse_gemeenten_en_provincies</name>
<Placemark id="Grenzen_van_alle_Nederlandse_gemeenten_en_provincies.1">
<ExtendedData>
<SchemaData schemaUrl="#Grenzen_van_alle_Nederlandse_gemeenten_en_provincies_1">
<SimpleData name="POLY_AREA">64475178.965786</SimpleData>
<SimpleData name="PROVCODE">10</SimpleData>
<SimpleData name="PROVINCIENAAM">Noord-Brabant</SimpleData>
<SimpleData name="GEMEENTENAAM">Rucphen</SimpleData>
<SimpleData name="CODE">0840</SimpleData>
<SimpleData name="GML_ID">id6826b50f-dfa2-4e21-b157-8d0e6e09026c</SimpleData>
<SimpleData name="OBJECTID">151</SimpleData>
</SchemaData>
</ExtendedData>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<tessellate>1</tessellate>
<coordinates>   I have delete this part </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>

For Qlik I modify it too like :

<Placemark>
<Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
<ExtendedData><SchemaData schemaUrl="#neterkml">
<name>Rucphen</name>
</SchemaData></ExtendedData>
<Polygon><outerBoundaryIs><LinearRing><coordinates>........</coordinates></LinearRing></outerBoundaryIs></Polygon>
</Placemark>

I then have a csv file:

POLY_AREA,PROVCODE,PROVINCIENAAM,GEMEENTENAAM,CODE,GML_ID,OBJECTID
"64475178.965786","10",Noord-Brabant,Rucphen,"0840",id6826b50f-dfa2-4e21-b157-8d0e6e09026c,"151"

and I associate using the GEMEENTENAAM in the CSV and the Name in the KML file. 

You download the two files from my dropbox if you like:

https://www.dropbox.com/sh/lm6hg8hx7um9wxg/AAC08Q-5Qa__HfOGLAYVQSGpa?dl=0

Hope this helps

View solution in original post

1 Reply
dmoon2208
Contributor III
Contributor III

Hi,

Qlik Sense is very particular on the format of the KML file and only show 4 fields, I normally just use the name and area fields. I assume you are looking for something like  (you can change the label to added in the province, code etc)

Netherlands.jpgTo do this, I normally take the original KML file and using QGIS will generate two files. Takes about 10 minutes. The first is the KML file to use as my mapping layer which has the name and area to map. The second is a file to use as a lookup to give me the code, province etc.

Orginal KML looks like :

<name>Grenzen_van_alle_Nederlandse_gemeenten_en_provincies</name>
<Placemark id="Grenzen_van_alle_Nederlandse_gemeenten_en_provincies.1">
<ExtendedData>
<SchemaData schemaUrl="#Grenzen_van_alle_Nederlandse_gemeenten_en_provincies_1">
<SimpleData name="POLY_AREA">64475178.965786</SimpleData>
<SimpleData name="PROVCODE">10</SimpleData>
<SimpleData name="PROVINCIENAAM">Noord-Brabant</SimpleData>
<SimpleData name="GEMEENTENAAM">Rucphen</SimpleData>
<SimpleData name="CODE">0840</SimpleData>
<SimpleData name="GML_ID">id6826b50f-dfa2-4e21-b157-8d0e6e09026c</SimpleData>
<SimpleData name="OBJECTID">151</SimpleData>
</SchemaData>
</ExtendedData>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<tessellate>1</tessellate>
<coordinates>   I have delete this part </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>

For Qlik I modify it too like :

<Placemark>
<Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
<ExtendedData><SchemaData schemaUrl="#neterkml">
<name>Rucphen</name>
</SchemaData></ExtendedData>
<Polygon><outerBoundaryIs><LinearRing><coordinates>........</coordinates></LinearRing></outerBoundaryIs></Polygon>
</Placemark>

I then have a csv file:

POLY_AREA,PROVCODE,PROVINCIENAAM,GEMEENTENAAM,CODE,GML_ID,OBJECTID
"64475178.965786","10",Noord-Brabant,Rucphen,"0840",id6826b50f-dfa2-4e21-b157-8d0e6e09026c,"151"

and I associate using the GEMEENTENAAM in the CSV and the Name in the KML file. 

You download the two files from my dropbox if you like:

https://www.dropbox.com/sh/lm6hg8hx7um9wxg/AAC08Q-5Qa__HfOGLAYVQSGpa?dl=0

Hope this helps