Global Mapper v25.0

Export CSV File

Dilys
Dilys Global Mapper UserTrusted User
edited October 2010 in SDK
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

Comments

  • global_mapper
    global_mapper Administrator
    edited October 2010
    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
  • Dilys
    Dilys Global Mapper User Trusted User
    edited October 2010
    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
  • global_mapper
    global_mapper Administrator
    edited October 2010
    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