Global Mapper Pro Coming Soon

Using a shapefile to remove lidarpoints

AkemonoAkemono Global Mapper UserPosts: 2
edited October 2014 in GM Script Language
Dear staff of Global Mapper,

I am having some problems using your scripts to produce the desired results. I have been hitting a wall for 2 days now. So you guys are my last hope! :)

I'm trying to remove the buildings from my lidar data as in, i don't want them in the final data set. I already have the building shapes and I can remove the buildings fairly easily in the GUI of Global Mapper but I can't get it to work using your scripting language. The thing is I can't use the GUI for it because of the amount of files that need to be processed (2000+).

My current script looks as follows:
IMPORT FILENAME="buildings.laz" PROJ=28992
IMPORT FILENAME="buildings.shp" PROJ=28992
The thing is this works perfectly if I convert my .laz to .shp. But for the .laz file it just give me the following error.
Editing vector features...
Updated 419 features.
WARNING: No POINTS features found in layer buildings.laz
Any and all advice is very welcome.



  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,296
    edited October 2014
    Hi Mike,

    It sounds like you want to remove LiDAR points that are inside your building footprints, and then export a LiDAR file. Is this correct? If it is, have you tried using EXPORT_VECTOR to write a LAS or LAZ file, using the POLYGON_CROP_FILE parameter for the building outlines along with POLYGON_CROP_EXCLUDE to tell Global Mapper to exclude the points inside the polygons instead of including them. This should allow you to just IMPORT your LAS, then export it with the appropriate cropping. There are several other parameters associated with POLYGON_CROP_FILE that you may want to use as well, depending on the exact output you are looking for.

    I hope this helps.


  • AkemonoAkemono Global Mapper User Posts: 2
    edited October 2014
    Dear Bob,

    Thank you for you reply and suggestion! Indeed I am trying to remove the LIDAR points from my building(s) footprint.

    Unfortunately your suggestion did not work, below I have the code that i'm using.
    IMPORT FILENAME="Buildings.laz" PROJ=28992
    The error i'm getting is:
    Removed all loaded overlays.
    Importing file Buildings.laz...
    WARNING: Unknown parameter <POLYGON_CROP_EXCLUDE> ignored.
    Exporting vector data to NoBuildings.laz...
    Is it possible that that command POLYGON_CROP_EXCLUDE is not yet implemented? Because it also does not appear to have an entree in the Scripting Reference.

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,296
    edited October 2014
    Hi Mike,

    What version of Global Mapper are you using? The POLYGON_CROP_EXCLUDE command was added very recently, and can be found in the latest daily build for Global Mapper 16 (16.0.3 b100314).

    The latest build can be found at the links below:


    Simply download the .zip file for the build that you are using and extract over your existing installation files (do not uninstall Global Mapper). The likely locations to extract to are as follows:

    32-bit: C:\Program Files (x86)\GlobalMapper16
    64-bit: C:\Program Files\GlobalMapper16_64bit


Sign In or Register to comment.