Export CSV File
Hi Mike,
I exported vector Data to CSV file with Latitude and longitude information using Global Mapper application, and I found that the Latitude and Longitude in CSV file were strings not double. Could you let me know is there a way to export the CSV file with the Latitude and Longitude in double data type? As I need to import the CSV file with 2 million data into database where the Lat and Long field are in double data type.
Thanks!
Dilys
I exported vector Data to CSV file with Latitude and longitude information using Global Mapper application, and I found that the Latitude and Longitude in CSV file were strings not double. Could you let me know is there a way to export the CSV file with the Latitude and Longitude in double data type? As I need to import the CSV file with 2 million data into database where the Lat and Long field are in double data type.
Thanks!
Dilys
Comments
-
Did you mean to put this in the SDK group? In any case, the latitude and longitude field formats for CSV export is controlled by the Position Display Format option on the General tab of the Configuration dialog. Make that decimal degrees and you should get that when exporting to CSV.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hi Mike,
Yes, I meant to put this in the SDK group. When we export a CSV, the lat longs are exported as the program is set the in configuration menu. At the moment we have it set to 'd.ddddd h'. From what I can see in the SDK, the GM function accepts double format, not the string 'd.dddd h'. What we want to be able to do is change the system from 'd.dddd h' to '+/- d.ddddd'. Is there a way in the SDK to swap the north south with a plus or minus?
Thanks!
Dilys -
Dilys,
Are you trying to pass the coordinates into a GM function? If so, you could just call atof on your 'd.dddd h' string to get the value and then check the 'h' value to see what hemisphere a value is in. Or you could just load the CSV file directly using the GM_LoadGenericAsciiTextLayer function and let the SDK do the parsing.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website