问题
I need export line coordinates from KML. I use some KML2CSV export tools. but this programs cant read my kml. Error: Read Error.
WHY i need coordinates: I`v kml which there pipelines of regions. i must show this coordinates on google map without KML..
I hope that I can explain to yours.
回答1:
One solution: Google Fusion Tables
One way to extract coordinates from your KML is to upload your KML to Google's Fusion Tables. If Google Earth parses your data then most likely you'll be able to import into a Fusion Table.
Short-cut to create a "Fusion Table" is simply clicking "Create a Fusion Table" from here and pick your KML file. The direct way to create Fusion Table is login to Google Drive (aka Google Docs) then click "Create" and under "More" pick "Fusion Table" and import your KML file.
After it's imported you have lots of visualization options to try online.
You can also select "Download" under File menu and export the data back as a CSV or KML file. http://support.google.com/fusiontables/answer/2548807/
However, CSV export of KML import in Fusion Tables exports a KML geometry (not a separated latitude/longitude field) so you can further edit the resulting file in a text editor and strip off the KML markup.
1,"<Point><coordinates>-122.536226,37.86047,0.0</coordinates></Point>"
Google Fusion Tables also allows programmatic access through a RESTful API with SQL-like queries to insert, update or delete rows of data.
UPDATE: Google Fusion tables will be retired in Dec 3, 2019 after which will no longer work.
Validating KML
If you're unable to use other KML2CSV converters then your KML probably has some invalid elements preventing it. Google Earth can still render badly formed KML so when you need to use that KML elsewhere you need to validate the KML data.
You can use the Galdos KML Validator. Also suggest some tips to validate your KML.
回答2:
This should help here, you have to made a small change to your kml file: save it as a xml file, and then use excel to get what you want.
来源:https://stackoverflow.com/questions/13911205/export-coordinates-from-kml