Does the IMPORT_ASCII command support POINT_SYMBOL="symbol_name"?

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
-
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- Load a file in to Global Mapper and change the feature types and styles to what you want.
- Save a workspace
- Open the workspace file in your text editor
- Find the IMPORT_ASCII command. (You may be able to just copy it to your script.)
- Look for the POINT_TYPE, or other parameters that interest you.
- 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.
Bob -
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
-
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 -
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.
-
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 -
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:
-
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 -
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
-
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 usePOINT_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 -
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,
BobThank 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.
Categories
- 12.5K All Categories
- 5.5K Features Discussion
- 314 Downloading Imagery
- 1.3K Elevation Data
- 377 Georeferencing Imagery Discussion
- 611 GM Script Language
- 50 User Scripts
- 112 GPS Features
- 397 Projection Questions
- 803 Raster Data
- 1.3K Vector Data
- 6.5K Support
- 161 Announcement and News
- 893 Bug Report
- 557 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 542 Other Discussion
- 128 GIS Data Sources
- 26 Global Mapper Showcase
- 229 How I use Global Mapper
- 104 Global Mapper Forum Website