Export lat/long from Mercator map

tonyk
tonyk Global Mapper User
edited November 2008 in Technical Support
Pretty noob to GM. I want to export vector (line) features on a Mercator map to simple ASCII file of lat/long coordinates. The help files said that the exported coordinate system is the same as the current map projection. Fine, so I change the projection to Geographic (Lat/Long), then export to Lat/Long works. Woohoo. But I need to do this a bunch of times and want to keep the map in Mercator and not constantly have to switch projections. So I tried a script instead to define the projection and then export the line vectors:

GLOBAL_MAPPER_SCRIPT VERSION=1.00
DEFINE_PROJ PROJ_NAME="GEO_WGS84"
Projection GEOGRAPHIC
Datum WGS84
Zunits NO
Units DD
Xshift 0.000000
Yshift 0.000000
Parameters
END_DEFINE_PROJ
EXPORT_VECTOR FILENAME="C:\Documents and Settings\User\Desktop\GlobalMapper\lat_long.txt" TYPE=SIMPLE_ASCII

But that put out x,y coordinates again, not lat/longs. I'm stumped now. Am I overlooking something about the concept of "Current Projection" here?

Comments

  • global_mapper
    global_mapper Administrator
    edited November 2008
    You are close. You just need to add the following line before the EXPORT_VECTOR command to actually set the projection to Geographic.

    LOAD_PROJECTION PROJ_NAME="GEO_WGS84"

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • tonyk
    tonyk Global Mapper User
    edited November 2008
    Mike,
    Thanks for the quick reply, that worked. And an additional note, perhaps now obvious, the context of the DEFINE and LOAD commands is the current workspace, so the script needs to set the projection back to Mercator (or whatever it was before) at the end.
    Tony K