Hydro Flatten with script

I am trying to hydro flatten some DEMs via script but it does not seem to be working. The script is as follows:

DIR_LOOP_START DIRECTORY="D:\2_Classification_In_Progress\Classified_Grd_final_check" FILENAME_MASKS="*.laz" RECURSE_DIR=NO
IMPORT FILENAME="D:\NDMP\lake_test.shp" TYPE=SHAPEFILE
IMPORT FILENAME="%FNAME_W_DIR%" TYPE="LIDAR_LAS" 
GENERATE_ELEV_GRID FILENAME="%FNAME_W_DIR%" ELEV_UNITS=METERS SPATIAL_RES_METERS=3.0 GRID_FLATTEN_AREAS=YES
DIR_LOOP_END

It is a 3m DEM being gridded from lidar data. The lake_test shapefile is a single lake with an elevation value. This all work if I grid the data manually, but the script does not work. Is "GRID_FLATTEN_AREAS" not all that is required?

Thank you

Answers

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,681
    Hello,

    GRID_USE_CONSTRAINTS =YES should produce hydro-flattening.  If you find that is not the case, I recommend that you contact Blue Marble Geographics Support directly via e-mail (geohelp@bluemarblegeo.com).

    Cheers,
    Bob
  • eddie416eddie416 Posts: 39
    Hi Bob,

    Still not working, I'll contact support
  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,681
    Hello,

    I forgot to include that you also need to use one of the binning algorithms with the GRID_ALG parameter, instead of the default TIN method.  In that case, if you have some area features loaded, they will automatically be used as breaklines.

    Cheers,
    Bob
  • eddie416eddie416 Posts: 39
    Hi Bob,

    Turns out the issue was with the FILENAME parameter in the GENERATE_ELEV_GRID. I was only specifying that it use the .laz file to generate my grid. If I remove the filename parameter it uses all the layers I have loaded. It works without the GRID_USE_CONSTRAINTS and the TIN method seems to work as well.

    Thanks,
    Brett
  • eddie416eddie416 Posts: 39

    I’ve been playing with the hydro-flattening and have another problem I’m not quite understanding. I’m testing the functionality of different gridding methods and am having some problems when I combine the bin methods with hydro-flattening polygons (note this is just test data). As you can see in the screenshots, the TIN method respects the boundaries of my polygon, whereas the bin method connects parts of the polygon. You see in the screenshot that the bin method has cut part of my data off. The bin parameters are set to only 1m while the gap it is bridging is about 75m.

    Nats
Sign In or Register to comment.