possible to zoom to a layer in a script?

JSLJSL Global Mapper UserPosts: 366Trusted User
I'm trying to set up a script to generate watersheds on a lot of layers that include basins and points, to create subwatersheds within those basins for the points.  Each layer contains one basin and one or more points, so when I zoom to the basin, the generate watershed command will automatically include the correct amount of area in which to perform the operation.  I know that watershed generation can be scripted, but can it also include zooming to each separate layer, so that I get no more and no less than the area that I need?  If the screen display is too large, the watershed generation can take too long, and if it's too small, it won't include all the possible watershed area.

Thanks for any help...

Answers

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

    You can try using the LAYER_BOUNDS parameter on your GENERATE_WATERSHED command.  
    • LAYER_BOUNDS - specifies that the operation should use the bounds of the loaded layer(s) with the given filename. For example, to export to the bounds of the file "c:\test.tif", you would use LAYER_BOUNDS="c:\test.tif". Keep in mind that the file must be currently loaded.
    Cheers,
    Bob
  • JSLJSL Global Mapper User Posts: 366Trusted User
    Thanks!
Sign In or Register to comment.