I’ve been researching days about a problem… I am new to KML and i want to create one file with The folowing informations:
Email
address
postcode
country
telephone
fax
internet
name
image
license
Call number
lat
lng
The csv file is maintained. If there is a tool I would be very happy. Otherwise, I would write it manually, if I know the syntax.
I am using a mac so windows KML creators not come into question… I have tried many tools and none was what I wanted.
The best tool I’ve found was http://batchgeo.com/de/ but there is no KML file anymore.
[EDIT]
Is there a good way to solve this in a python script? i already have a .csv!
Best regards Curtis
For reading .csv files, you can use the csv module like this:
You might get in trouble when your file is UTF-8 encoded, since
csvdoes not support that. But there is a wrapper which will take care of this.You can, of course, also simply read your file line by line and split it by commas:
values=line.split(',').Being that that the kml format is not very complicated, the toughest part of creating a representation of your data is deciding what it should look like. A very simple piece of code to insert the values read from the csv file could look like this: