Global Mapper v24.1

Does the IMPORT_ASCII command support POINT_SYMBOL="symbol_name"?

kbellis
kbellis Global Mapper UserTrusted User
By any chance does the IMPORT_ASCII command support POINT_SYMBOL="symbol_name"?

I'm being told to not hold my breath:



Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello Kelly,

    The IMPORT_ASCII supports a POINT_TYPE="<name>" parameter, where the value is one of the names you would choose when you define the default point type for a layer. 

    In general, the best way to approach trying to figure out the parameters for IMPORT_ASCII (and other IMPORT commands) is
    1. Load a file in to Global Mapper and change the feature types and styles to what you want.  
    2. Save a workspace
    3. Open the workspace file in your text editor
    4. Find the IMPORT_ASCII command. (You may be able to just copy it to your script.) 
    5. Look for the POINT_TYPE, or other parameters that interest you.
    6. If you changed colors or sizes, there may also be a DEFINE_LAYER_STYLE command, with a corresponding POINT_STYLE_NAME reference in the IMPORT_ASCII command. You would need to copy the lines from DEFINE_LAYER_STYLE to END_DEFINE_LAYER_STYLE before your IMPORT_ASCII command.
    Cheers,
    Bob
  • kbellis
    kbellis Global Mapper User Trusted User
    edited August 2018

    Couldn't find 'IMPORT_ASCII', POINT_TYPE', the name of the symbol, much else that seemed relevant - see attached [zipped] workspace: Beta1 v20 - Selected Feature Export.gmw


  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello Kelly,

    I don't see an attached workspace file.

    I thought you were importing a CSV (or similar) file, and wanted to apply a point type to the imported features. From the screen capture of your workspace, it appears that you created features rather than importing a file, which puts different information in the workspace, and doesn't work the same as importing a file. 

    Cheers,
    Bob
  • kbellis
    kbellis Global Mapper User Trusted User
    The file (.zip) looked attached when I posted. Hmm, let's try this instead:

    In the script, is a call to IMPORT_ASCII and I was hoping to use a specific symbol for the various points.


    The custom symbol is one that I created, and isn't one of Global Mapper's stock collection.

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello Kelly,

    If you have added your symbol to Global Mapper as a custom symbol, you can use it to create a Point Type (Configuration | Point Styles tab) and give the type a name, such as 'my custom type'.  You can then use POINT_TYPE="my custom type" on the IMPORT_ASCII command to apply your custom type (and symbol) to the points.

    Cheers,
    Bob
  • kbellis
    kbellis Global Mapper User Trusted User
    edited August 2018
    Yes, I know that and was what I've done for years. But what I didn't realize was the command was POINT_TYPE="my custom symbol" - I had initially been using POINT_SYMBOL="my custom symbol", and then also trying POINT_SYMBOL="<my custom symbol>", none of which seems to be working.


    Trying out the POINT_TYPE="my custom symbol" also was met with no luck; however, at least this time there wasn't a warning in the log:








  • bmg_bob
    bmg_bob Global Mapper Programmer
    Answer ✓
    Hi Kelly,

    The name needs to match exactly the name that is in the list of point types.  Did you try this?
    POINT_TYPE="Camera; Unadjusted" 
    (Note: it's a bit hard to be sure of the punctuation in the name -- it looks like a semicolon to me.)

    If the file has an attribute called POINT_SYMBOL, Global Mapper will use the contents of that attribute as the name of a point symbol.

    Cheers,
    Bob
  • kbellis
    kbellis Global Mapper User Trusted User
    In an empty workspace, a single point was added and assigned the symbol, and then exported a simple ASCII. Below is the contents of that exported file:

    DESCRIPTION=Camera; Unadjusted
    POINT_SYMBOL=CameraUnadjusted
    0.02,0.15,-999999


  • bmg_bob
    bmg_bob Global Mapper Programmer
    Answer ✓
    Hi Kelly,

    When you import that file back into Global Mapper, does it use the correct symbol?

    Here are two ways to get your point style applied during an import:

    1) Use DEFINE_TEXT_FILE to set up the input data, followed by an IMPORT_ASCII command. In the DEFINE_TEXT_FILE command, the data for each point would look like what Global Mapper exported in your test. A text file containing one point would look like this:
    DEFINE_TEXT_FILE
    DESCRIPTION=Camera; Unadjusted 
    POINT_SYMBOL=CameraUnadjusted
    0.02,0.15,-999999
    END_DEFINE_TEXT_FILE
    2) If you want to import a file stored on disk and apply the style using the IMPORT_ASCII command, you need to use
    POINT_TYPE="Camera; Unadjusted"
    The name that you pass into POINT_TYPE has to match the name in the Point Types list on the Configuration - Point Styles screen. A point type and point symbol are not the same thing.  A point type is a collection of information about a point, such as its symbol name, symbol rotation, symbol scale, etc.

    Cheers,
    Bob
  • kbellis
    kbellis Global Mapper User Trusted User
    bmg_bob said:
    Hi Kelly,

    The name needs to match exactly the name that is in the list of point types.  Did you try this?
    POINT_TYPE="Camera; Unadjusted" 
    (Note: it's a bit hard to be sure of the punctuation in the name -- it looks like a semicolon to me.)

    If the file has an attribute called POINT_SYMBOL, Global Mapper will use the contents of that attribute as the name of a point symbol.

    Cheers,
    Bob
    Thank you for the reply Bob, and yes!, that did the trick.

    My confusion - or at least one part of it - arose from the point type having the exact same value as the description, and then a bit of my own conflation. The other confusion contributing parts had to do with the scripting reference text not being anywhere near as illuminating as your recent replies, 50283 and 50285. Thanks again, you've been a tremendous help.