Global Mapper v25.0

Ascii output from script

Chrisw
Chrisw Global Mapper User
edited February 2009 in Technical Support
I would like to create a batch file that emulates the File/Batch Convert/Reproject... main menu command. I have figured out how to use the IMPORT_ASCII script command to read my file with the appropriate projection, but I don't see how to output the file as an ASCII text file (I want to do this using a different projection, essentially doing a batch convert of a lat/long comma separated text file to a new projection).

Comments

  • global_mapper
    global_mapper Administrator
    edited February 2009
    To ouput a new file use the EXPORT_VECTOR command with the TYPE=SIMPLE_ASCII value.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Chrisw
    Chrisw Global Mapper User
    edited February 2009
    When I do what you say and use EXPORT_VECTOR TYPE=SIMPLE_ASCII, I get an output file that looks like:

    DESCRIPTION=Unknown Point Feature
    NAME=Date,Latitude,Longitude
    POINT_SYMBOL=Dot
    FONT_SIZE=12
    FONT_COLOR=RGB(0,0,0)
    FONT_CHARSET=0
    File=Date,Latitude,Longitude
    535809.88,904975.21
    DESCRIPTION=Unknown Point Feature
    POINT_SYMBOL=Dot
    535819.02,904477.35

    Where the last three lines repeat for each of the data points in my input file. What I want is an output file that looks like my input file, with the new lat/long and other fields from my input file separated by commas one per line, just like the File/Batch Covert command. Am I doing something wrong?

    Here is the script file that I am using:

    // Convert a State Plane Coordinate RDI ADCP file to WGS84

    GLOBAL_MAPPER_SCRIPT VERSION=1.00
    UNLOAD_ALL

    DEFINE_PROJ PROJ_NAME=RDISPCS
    Projection STATE_PLANE
    Datum NAD83
    Zunits NO
    Units FEET
    Zone 2401
    Xshift 0.000000
    Yshift 0.000000
    END_DEFINE_PROJ

    DEFINE_PROJ PROJ_NAME=WGS84OUT
    GEOGCS["Geographic Coordinate System",DATUM["WGS84",SPHEROID["WGS84",6378137,298.257223560493]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]
    END_DEFINE_PROJ

    IMPORT_ASCII FILENAME="C:\Documents and Settings\Chris\Desktop\Free Flow Power\Hydrology\Source\ScanRDIADCP\STL all ADCP State Plane.csv" \
    TYPE=POINT_ONLY COORD_DELIM=COMMA COORD_ORDER=X_FIRST SKIP_COLUMNS=2 COORD_OFFSET=0,0,0 PROJ_NAME=RDISPCS

    EXPORT_VECTOR TYPE=SIMPLE_ASCII FILENAME="C:\Documents and Settings\Chris\Desktop\Free Flow Power\Hydrology\Source\ScanRDIADCP\STL all ADCP State Plane - WGS84.csv" \
    PROJ_NAME=WGS84OUT COORD_DELIM=COMMA EXPORT_ELEV=NO
  • global_mapper
    global_mapper Administrator
    edited February 2009
    In that case I think you want to use TYPE=CSV instead to get a CSV file with all attributes on a single line for point export.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com