bmg_bob · Global Mapper Programmer
- Last Active
- No Roles
- Invited by
huzar said:Ok, this works Do you think that this operation can be done in script so I can do it on several files at once? Is option "Select all features in layer" available in scripting?
You can use a script, but you will have to use the export method, which would look something like this:
IMPORT FILENAME="your LAS file"Note that the IMPORT and EXPORT commands will require more parameters than are listed here. This is just an example. The LiDAR point selection functions available in the UI are not part of the scripting functions.
EXPORT_VECTOR FILENAME="LAS file in range" LIDAR_HEIGHT_RANGE="2, <your file's max height>"
UNLOAD_LAYER FILENAME="your LAS file"
IMPORT FILENAME="LAS file in range"
// Your other export goes here
Do you have the LiDAR Module? If so, you should be able to filter points by height above ground. Use the Digitizer to select the points in your LiDAR layer, then right-click and choose Advance Selection Options | Filter Selected LiDAR Points by Elevation/Color/Class, etc. The resulting window will provide options for unselecting points that are within your range above ground. You can then delete the remaining selected points.
This same function can be used during a LAS file export, so you could export your LiDAR data, and use the filtering options to remove points that are outside your desired range above ground. This will result in a new LAS file that contains the data you want. You can load this file and export the data.
kbellis said:Um... where does [Item #24907] inter into this discussion?DEFINE_VARAdded a new value for the FILENAME_PIECE parameter: DIR_WO_SLASHDIR_LOOP_STARTAdded a new built-in variable: DIR_WO_SLASHLAYER_LOOP_STARTAdded a new built-in variable: LAYER_DIR_WO_SLASH (As with other built-in variables that are part of LAYER_LOOP_START, "LAYER" is a default prefix. There is a parameter that allows the user to define a different prefix.)
The changes were checked in to GM 20 on Wednesday, August 22, 2018 3:55:46 PM
The changes to DEFINE_SHAPE have been implemented in Global Mapper 19 (latest daily build) and will be in Global Mapper 20.
That said, the DEFINE_SHAPE does not create a displayable feature. To do that, you should use DEFINE_TEXT_FILE to create an inline text file, then IMPORT it. Note that DEFINE_TEXT_FILE had the same limitations vis-a-vis variables, and was fixed at the same time as DEFINE_SHAPE.