Via a script I write a single set of lat/long position information into a CSV file which updates meaningfully for me every 2-3 minutes. I can of course successfully import that file into GE Pro and drop a placemark on the map. Once having done that, I wish to save the map as a JPG. No issues with the manual "version" of what I need to do...
How can I automate the import of the CSV file and automate the saving of the resultant map as well? Each map will overwrite itself (can have same file name). I don't see where google has any command line interface to do something like this...
The final result will be, again, a map with the latest positioned placemark whenever I happen to access the jpg file.
Thank you
(I am aware of the Google Earth Fusion product. Am hoping not to have to go that route as my need is fairly simple, I think)
Related
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.
I need to create images of GPS paths on top of google maps satellite information. The ultimate goal is to import those images in a report that is being created in an Excel program that is run through userforms & VBA.
I'm having trouble coming up with a way to automate the generation of these images. Preferably the user would not have to install additional software and there would be a way of automating this process using VBA. I would like to use the Static Google Maps API, but that is limited by the number of characters in an HTML request (2048 as I understand) and my path data is easily going to exceed that length.
Let's assume for now that I have a single KML file with my GPS path data.
Any thoughts on a way to convert large KML path files into static maps image files using VBA? I'm imagining VBA opening a local HTML file with a dynamic google map, uploading the KML file, and somehow capturing and saving a screenshot of the KML data loaded onto the dynamic google map.
FYI I'm locked into using the existing Excel/VBA forms-based program to generate these reports.
(new to this board and relatively new at programming so please let me know if my description is lacking. thanks)
I'm currently working on a school project that implements Google Maps overlayed with data stored in shapefiles and a xml file with a bitmap in it and the WGS coordinates where the image should be overlayed.
The web application that needs to be build requires that a user uploads these raw files, and the result should be visible in the Google Maps.
Is there any way to convert these shapefiles to .json, using PHP or javascript, and get the coordinates stored in the .xml file to get the WGS coordinates. This needs to be done web-based, so stand-alone tools and software won't be sufficient.
These coordinates and .json files than need to be stored in a database, and these records will be used to put on the Google Maps with the appropriate overlays on the resulted coordinates.
Thank you in advance.
All of the processing will need to be done on the server side. I was able to find a shapefile reader class written in php here,
http://www.phpclasses.org/package/1741-PHP-Read-vectorial-data-from-geographic-shape-files.html
It sounds like you have a pretty decent handle on how you need to go about solving the rest of the problem from there.
js-shapefiles-to-geojson script renders shapefiles and dbf files entirely on the client-side, in the browser.
repo: https://github.com/wavded/js-shapefile-to-geojson
demo: http://wavded.github.io/js-shapefile-to-geojson/
I have copied all of the files for the Google example http://gmaps-samples-v3.googlecode.com/svn/trunk/toomanymarkers/toomanymarkers.html to my PC, but the KML layer does not appear when I tick the checkbox.
The files I copied are:
functions.js
markers.js
markers.kml
toomanymarkers.html
I have also copied these to http://www.performit.co.uk/misc/maps/toomanymarkers/toomanymarkers.html and it doesn't work there either.
Am I missing something? Do I need to have an environment set up for the files to load?
The KML file must be publicly accessible via the web, so this will not work if you are developing locally. Google accesses and processes the file, returning that data as location, zoom level, markers, polylines, polygons, etc.
What is the actual URL to your KML file? Copy that, and past it into the Search Maps box of GoogleMaps. If it's valid KML, GM will process it and display your KML data.
It appears to be a web server configuration issue. When I try to access http://www.performit.co.uk/misc/maps/toomanymarkers/markers.kml, I get a 500 server error. It appears to me that functions.js tries to access that URL. So, I'd look into that. By comparison, http://gmaps-samples-v3.googlecode.com/svn/trunk/toomanymarkers/toomanymarkers.html happily serves up the KML file.
I have a KML-file with lots of data in it. I would like to show the data in a google map (or something similair) When the KML-file updates, I would like the google map to update. Is this possible?
What to you mean KML-file updates?
Are you generating the KML from your database so updates means that more points are inserted to your db?
Anyway if that's the case you can construct the browser to periodically ask the server if this KML is updated,retrieve it and finally remove the expired file from the map and show the new.
Because as far as i know there is no way you can "sync" the KML overlay automatically.