ASCII import Script and Field Options: DESCRIPTION
Recce
Global Mapper UserTrusted User
How to import 2 columns into the "description" field in a waypoint. When exporting this ASCII Script to GPX
My source looks like this:
I tried to add DESCRIPTION to the to columns. But only one column was exported into the GPX (MapSource).
/Thomas
//Convert TXT files to GPX file GLOBAL_MAPPER_SCRIPT VERSION=1.00 UNLOAD_ALL ENABLE_PROGRESS=NO IMPORT_ASCII FILENAME="C:\Pfps\MPU\LPT2GPX\Input TXT\mergefile.txt" TYPE=POINT_ONLY COORD_DELIM=TAB COORD_ORDER=Y_FIRST INC_COORD_LINE_ATTRS=YES COL_HEADERS=YES SKIP_COLUMNS=2 PROJ_FILENAME=C:\Pfps\MPU\LPT2GPX\TXT_PRJ.prj POINT_TYPE=Waypoint COORD_SCALE=1.0,1.0,0.3048 EXPORT_VECTOR FILENAME="C:\Pfps\MPU\LPT2GPX\Output GPX\FalconView Point file.gpx" TYPE=GPX
My source looks like this:
NAME DESC ELEVATION TYPE 002 N 55 07 33 E014 46 38 150 0 K US -1.00 -1.00 green dot2 City (Small), 10/1/2008 1:37:16 PM Default fly kommentar N 56 13 33 E009 14 28 216 0 K US -1.00 -1.00 B-1 Default airplainn N 56 21 26 E008 59 29 55 0 K US -1.00 -1.00 airplane Default
I tried to add DESCRIPTION to the to columns. But only one column was exported into the GPX (MapSource).
/Thomas
Comments
-
Thomas,
Global Mapper will currently only export what is listed as the Description for a feature in the Feature Info dialog into the description field in an exported GPX file. If you need to combine multiple fields you can do that in the display label, which is also exported. To do this, simply open the Control Center, select the input layer, press Options, then setup the display label to be a combination of multiple attribute fields.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
How to do this in a script?
-
You can do this using the LABEL_FIELD parameter. Just append the attribute names to use with a '>+< character. For example, the following appends the STREET_NAME, CITY_L, and COUNTY_L attribute fields.
LABEL_FIELD="STREET_NAME>+<CITY_L>+<COUNTY_R"
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thanks Mike,
But the exported GPX has not changed. Do I need to add something else?//Convert TXT files to GPX file GLOBAL_MAPPER_SCRIPT VERSION=1.00 UNLOAD_ALL ENABLE_PROGRESS=NO IMPORT_ASCII FILENAME="C:\Pfps\MPU\LPT2GPX\Input TXT\mergefile.txt" TYPE=POINT_ONLY COORD_DELIM=TAB COORD_ORDER=Y_FIRST INC_COORD_LINE_ATTRS=YES COL_HEADERS=YES SKIP_COLUMNS=2 PROJ_FILENAME=C:\Pfps\MPU\LPT2GPX\TXT_PRJ.prj POINT_TYPE=Waypoint COORD_SCALE=1.0,1.0,0.3048 LABEL_FIELD="DESC>+<TYPE>+<ICONS>+<LAYERS" EXPORT_VECTOR FILENAME="C:\Pfps\MPU\LPT2GPX\Output GPX\FalconView Point file.gpx" TYPE=GPX
GM version 9.3 -
Do understand this right. Its only possible to add more columns to the waypoints name and not the description?
-
The syntax looks correct, but I didn't see attribute columns with all of those names in your input data. The LABEL_FIELD option only works with the values of actual attribute/value fields and not other data associated with a feature.
It is not currently possible to modify the description field of a feature after the initial load of the feature.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
Categories
- 12.9K All Categories
- 5.8K Features Discussion
- 349 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 651 GM Script Language
- 55 User Scripts
- 115 GPS Features
- 420 Projection Questions
- 835 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 181 Announcement and News
- 936 Bug Report
- 561 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 578 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 109 Global Mapper Forum Website
