Export coordinates from KML - google-maps

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.

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.

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.

Related

plotting 100k latitude-longitude locations on map

I have about 100k locations stored in a MySQL server.
I want to plot this in a map, but when I export it to a .csv file and then convert to .kml file, the file size exceeds 20mb, whereas Google Map API has limits of 3mb for .kml file.
The .csv file is about 2.5mb, but I cannot load .csv files into Google Map.
Is there any way I can do load the locations to a map?
Use Google Fusion Tables - they support 100,000 points per layer and 5 layers in toto. They are lightning fast too as you access them via an SQL-type language that runs on Google's servers - exactly where your data will be when you upload it.
You load your CSV into a Fusion Table in your Google drive and get a key to that table and you then use the key in your Javascript.
I created the following website with Fusion Tables and I am a zero in Javascript! See Skyscan website here.

KML file from Massachusetts GIS - display in Google Maps API

I've been pulling KML files from the Mass GIS service via their export feature:
http://maps.massgis.state.ma.us/map_ol/oliver.php
For example, a KML output of Population Density per Square Mile looks like this when exported:
http://evrkusd.fatcow.com/populationpersquaremile.kml
I try to add it to my Google Map and nothing shows up, although this code works fine with other kml files from other sources.
var NewLayer = new google.maps.KmlLayer('http://evrkusd.fatcow.com/populationpersquaremile.kml');
NewLayer.setMap(map);
I'm getting the idea that some of the kml tags are outdated or are not accepted by Google Maps API.
Is anyone able to get this file to work for them? Any ideas how I can (preferably easily) update this file to work with Google Maps? I'm going to be using multiple KML files like this, so I'm hoping I can do a fairly quick fix.
Your KML file is still too big:
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=http://www.geocodezip.com/geoxml3_test/populationpersquaremile.kml
If you click on the "load KmlLayer" button, it will show you the status return by attempting to load that file in KmlLayer:
Kml Status:DOCUMENT_TOO_LARGE
Your "partial" KML files are not valid xml, if I make the one you posted valid, it works with geoxml3, but the Google Maps API v3 KmlLayer still says it is too big.
See the documentation, the maximum fetched size of a raw KML file is 3M, your file is 7M+.
Fusion Tables can handle much larger KML than client-side maps, up 100MB total (though some limits apply to features). So that might be a solution.

How to retrieve My Places maps data from Google Maps?

Is it still possible using JavaScript to get My Places data out of Maps? With the move to Fusion Tables and deprecation of the Maps Data API, I can't seem to find information on how to get this data...if it's even available in FT.
The Maps Data API was the only programmatic endpoint to accessing this dataset. However you can still export the data by selecting a map, and then clicking the KML link.
A variety of tools are available for visualizing, importing, and converting KML data in case you want to import it elsewhere.

Google Map check if a route/direction is pass over route store in kml file?

Is possible verify if the route generated by user, crossed trough to other route stored in a kml file?
I found in the API Docs:
Class Direction have Ltg Ltd array.
Can I use Google API for compare each point approximation in kml file? or maybe i should do it with a script, in my server side?
Some one have something similar?
Thanks, developer community.
You need use fusion table:
Make your map in google maps with lines or figures and save/export as KML file and download.
Login in google docs and crate a new document type: "Table" the wizard shows import file.
Import your data: select kml file and upload into the table.
The column called "geometry" (by default), store your Lgt Ltd o polylines or polygons.
Now you need "query" the data in your table for this you can consult the correct syntax in https://developers.google.com/fusiontables/docs/developers_guide
If you want ask for Lgt & Ltd contains in your the geometry you need
SELECT <columns> FROM <tableid>
WHERE ST_INTERSECTS('<column with coordinates>',RECTANGLE(LATLNG(<point_lower_x>,
<point_lower_y>),LATLNG(<point_upper_x>,<point_upper_x>)))

Importing CSV File to Google Maps

I have an quite big CSv File I want to have in Google Maps or just on a map. These are just coordinates but I have 600.000 of them..
Do you have any Idea how I can do this?
I've added an screenshot from XTabulator below:
We have now (jan2017) a csv layer import inside Google Maps itself.
Google Maps > "Your Places" > "Open in My Maps"
GPS Visualizer has an interface by which you can cut and paste a CSV file and convert it to kml:
http://www.gpsvisualizer.com/map_input?form=googleearth
Then use Google Earth. If you don't have Google Earth and want to display it online I found another nifty service that will plot kml files online:
http://display-kml.appspot.com/
none of that needed.... just go to:
http://www.gpsvisualizer.com/
now and load your csv file as-is. extra columns and all. it will slice and dice and use just the log & lat columns and plot it for you on google maps.
The easiest way to do this is generate a KML file (see http://code.google.com/apis/kml/articles/csvtokml.html for a possible solution). You can then open that up in Google Maps by storing it online and linking to it from Google Maps as described at http://code.google.com/apis/kml/documentation/whatiskml.html
EDIT: http://www.gpsbabel.org/ may let you do it without coding.
For generating the KML file from your CSV file (or XLS), you can use MyGeodata online GIS Data Converter. Here is the CSV to KML How-To.