Redraw View

Is it possible to refresh the view whilst in a script; I'm asking the user to specify a COVERAGE_SMOOTHING_FACTOR for creating coverage boundaries but its pointless as they can't see the boundary around the data to verify if it fits there requirements. A refresh or redraw of the view would solve this; is there a way??

Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    I have not tried this, but I think that if you use SAVE_CURRENT_VIEW followed by RESTORE_LAST_SAVED_VIEW, it will just refresh the current view.

    Cheers,
    Bob
  • Hi Bob,

    Cheers for the quick answer but unfortunately no dice. Would it be too big an ask to add a REFRESH or REDRAW function to the scripting reference or another way just to get a redraw of a layer?

  • Also as a point of reference could you tell me what the value used by the GM interface is when the slider is set all the way to the ROUGH setting? As below:


    Also is there any way to split lidar data that is separated as below:


  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    I suggest that you get in touch with Blue Marble Support directly via email (geohelp@bluemarblegeo.com) to see if they have any additional suggestions. They will also be able to add a feature request to our queue to see about adding a script command to refresh the view, if that proves necessary.

    Cheers,
    Bob

  • Cheers Bob, on a separate matter I'm trying other options in the same vein and have run into a strange one. If I import an ascii file as a point cloud and run the following command:
    EDIT_VECTOR FILENAME="%SOURCE_DATA%" CREATE_COVERAGE_AREAS="YES" NEW_LAYER_NAME="%FILE_TO_LOAD%_Bdry" COVERAGE_SMOOTHING_FACTOR="%SMOOTHING_FACTOR%"
    It generates a area feature, though the assign new layer name does not work in this command. If i try the same command on an imported LAS file it does not create an area feature and reports 0 features updated. Any ideas?
  • Update: It appears that the smoothing factor is affected by the size of the data set;on the first data set i had to use a smoothing factor of 0.001 to obtain a boundary that hugged the edges of the dataset but on the second dataset a smoothing factor of 1 appeared to hug the data just as well. Is there some logic or formula that is applied to the creation of the coverage boundary?
  • bmg_bob
    bmg_bob Global Mapper Programmer
    Answer ✓
    Hello,

    It looks like CREATE_COVERAGE_AREAS will put the new features in a layer called "Coverage Areas". It does not use the NEW_LAYER_NAME parameter, and I don't see another way for you to specify a different name for the output layer.

    The CREATE_COVERAGE_AREA command should work on data from a LAS file, so I have no explanation as to why you are getting that result, unless the LAS layer name does not match %SOURCE_DATA%.

    If you include your script and some data when you contact Blue Marble Support, they can run the script and see if there is something you need to change, or something that needs to be changed in Global Mapper.

    Cheers,
    Bob
  • bmg_bob
    bmg_bob Global Mapper Programmer
    Answer ✓
    Doc2r said:
    Update: It appears that the smoothing factor is affected by the size of the data set;on the first data set i had to use a smoothing factor of 0.001 to obtain a boundary that hugged the edges of the dataset but on the second dataset a smoothing factor of 1 appeared to hug the data just as well. Is there some logic or formula that is applied to the creation of the coverage boundary?
    The required value for the smoothing factor is dependent on your data and how far apart points are along the edges. There is not a hard-and-fast rule to determine the correct value for a particular data set -- in the UI, it is a matter of adjusting the value and seeing if the results are what you want.

    Cheers,
    Bob
  • Cheers for the help Bob; I've come up with a small formula that seems to work with most datasets. I'll contact support about the refresh item, Thanks for the help.