Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing CSV file to Google maps format

I build a software that generate trails for my own use

I would like to test the software so I create A CSV file that contain the longitude and latitude of the trail points

What is the format of a CSV file that can imported to Google maps

like image 311
Nachum Shmilovitz Avatar asked Oct 22 '25 17:10

Nachum Shmilovitz


1 Answers

The documentation isn't very specific about CSV files, so I just tried a bunch of formats.

Option 1 is to have separate latitude and longitude columns. You will be able to specify columns in the upload wizard.

lon,lat,title
-20.0390625,53.27835301753182,something
-17.841796875,53.27835301753182,something

Option 2 is to have a single coordinate column with the coordinates separated by space. You will be able to chose the order of the coordinate pair in the upload wizard.

enter image description here

lonlat,title
-20.0390625 53.27835301753182,something
-17.841796875 53.27835301753182,something

You'll also need one column that acts as the description for your points, it is, again, selectable in the wizard.

There seems to be no way to import CSVs as line geometries and no way to convert points to lines later on. Well-known-text (WKT) in the coordinate column fails to import.

The separator needs to be comma ,. Semicolons ;, spaces   and tabs don't work.

like image 146
chrki Avatar answered Oct 26 '25 01:10

chrki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!