2

I have a .KML file that has placemarks that have four main pieces of data that I want to use in QGIS. When I do 'Add Vector Layer' and select my KML file it imports all the placemarks as feature points as expected. But when I right click on the layer and select 'Open attribute table only two of the attributes are there.

I need these four attributes in QGIS.

<name>9255 LECALDERWOOD LN</name>
<description>9255</description>
<address>9255 LECALDERWOOD LN, San Fransi, CA</address>
<ExtendedData>
<Data name="Terminal Address"><value>r 9252 meridian av</value></Data>
</ExtendedData>

Example Placemark:

<Placemark>
<name>9255 LECALDERWOOD LN</name>
<description>9255</description>
<address>9255 LECALDERWOOD LN, San Fransi, CA</address>
<ExtendedData>
<Data name="Terminal Address"><value>r 5252 meridian av</value></Data>
</ExtendedData>
<Point>
<coordinates>-121.893896,37.249197,0</coordinates>
</Point>
<Style>
<IconStyle>
<Icon>
<href>https://www.qcdata.s3.amazonaws.com/img/earthit/house2.png</href>
</Icon>
</IconStyle>
</Style>
</Placemark>

Attribute table:

enter image description here

Does anyone have any ideas how to get it to import all attributes?

2

I was unable to resolve this. No matter what version of QGIS I used, no matter how I formatted the ExtendedData, I was unable to get it to import this data.

So I found a work around. My end goal is to save the KML file out of QGIS as a shape file to send to my client after I had manipulated it. So based on this post about converting a KML file to shape file. How to convert between KML and Esri's shapefile (SHP) format?

I got GDAL installed based on the instructions here.

http://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows

Then I used the command line command

ogr2ogr -f "ESRI Shapefile" output.shp FileName.kml

The output.shp does not need to be an existing file.

Imported the output.shp into QGIS and the table had my extended data along with a lot of other attributes that I'm not sure where they came from.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.