Global Mapper v24.1

Coverage polygon creation using GM Pro23 scripting language as for the manual result?

Hello Sirs

In my workflow, one of my step, I created coverage polygon for grid data, I scripted it but the results are not the same between manual and automatic creation of these coverages of the same data.

Are there any way to script it to do the same result using GM23pro?

Please give me your suggestions

Best regards

DANBRI

Answers

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    The ALPHA_SCALE_FACTOR parameter is what controls how tightly a polygon coverage area is wrapped around a layer. That should correspond to the Smoothing Factor shown on the Concave Hull Options dialog.

    It does look like the defaults are different on the dialog (1000.0) than in the script (1.0), so you'll want to modify your script ALPHA_SCALE_FACTOR to match what you use on the dialog.

  • Hi bmg_mike

    Thank you for this comment, so about coverage polygon creation using scripting, there are only VERTEX_COUNT=32 and SMOOTHING_FACTOR=0.1 as default parameter.

    But when we use the manual method, we can parameter only the smoothing factor?

    About ALPHA_SCALE_FACTOR ... I didn't use it before and I didn't find it even in GM 23Pro

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    Ah sorry, alpha scale factor is what we call it internally. The script parameter is COVERAGE_SMOOTHING_FACTOR.

    I was actually looking at the EDIT_VECTOR command where you can use CREATE_COVERAGE_AREAS=YES to create coverage polygons, but the GENERATE_LAYER_BOUNDS script command works as well and allows you to specify the MAX_VERTEX_COUNT parameter if you want to limit the size. There isn't any reduction done in the creation from the UI, so I would set MAX_VERTEX_COUNT to a very large number so no simplification will be done to reduce the coverage area from what is initially generated. Maybe something like:

    GENERATE_LAYER_BOUNDS FILENAME="layer name" BOUNDS_TYPE="POLYGON" MAX_VERTEX_COUNT="1000000" \

    COVERAGE_SMOOTHING FACTOR="1.0"