Global Mapper v25.0

Parsing PNEZD survey data into individual layers

Does anyone know how to separate and import collected survey data (PNEZD format) into separate layers by using descriptor keys(5th column) without dividing into individual file before importing?

Answers

  • Ice Age Mark
    Ice Age Mark Global Mapper User Trusted User
    Howdy,

    You can work with survey data in this form using the Open Generic Text File command.  The trick is to use the options to skip the first field (the point #), the Y-first coordinate option, and the "treat 3rd coordinate as elevation" option.  Then GM will pick up on the NEZ part correctly as the 2nd, 3rd, and 4th fields.  Also check "Include attributes from lines with coordinate data".  This will make the 1st and 5th fields be attributes.  After import, use Split Layers by attribute.  The descriptor (5th field) will be ATTR_2, so use that to split by.  You will get a separate layer for each and every different descriptor (including typo's).  You may need to add a "Rows to skip at start of file", depending on whether your file structure has a header.

    Here is a simple script that does this a little better, and cleans up some issues:

    GLOBAL_MAPPER_SCRIPT VERSION=1.00

    DEFINE_VAR NAME="PNEZD" VALUE="" PROMPT="FILE" PROMPT_TEXT="Choose a PNEZD File"\
    FILE_MUST_EXIST="YES"


    IMPORT_ASCII FILENAME="%PNEZD%" USE_DEFAULT_PROJ="YES" TYPE="POINT_ONLY"\
    COORD_DELIM="AUTO" COORD_FORMAT=DECIMAL COORD_ORDER=Y_FIRST SKIP_COLUMNS=1\
    INC_COORD_LINE_ATTRS="YES" INC_ELEV_COORDS="YES" COL_HEADERS="NO" SHOW_LABELS=YES\
    LABEL_FIELD="Point #>+<Descriptor" LABEL_FIELD_SEP="-" LABEL_FIELD_FORCE_OVERWRITE="YES" 

    EDIT_VECTOR FILENAME="*" SHAPE_TYPE="POINTS" POINT_TYPE="" ADD_COORD_ATTRS="YES"\ ATTR_TO_RENAME="X=Easting" ATTR_TO_RENAME="Y=Northing" ATTR_TO_RENAME="ATTR_1=Point #"\
    ATTR_TO_RENAME="ATTR_2=Descriptor"

    SPLIT_LAYER SPLIT_BY_ATTR="Descriptor" LAYER_DESC_ATTR_ONLY="YES" CLOSE_ORIG_LAYER="YES"


    If you have any trouble or questions, let me know.

    Good luck,

    Mark

    (p.s. - The labels won't show up on a black background.)
  • Thanks Mark , I'll give it a try.  Brian