Global Mapper v26.0

It is necessary to iterate through all polygons sequentially in the cycle and get their parameters

Hello!

Tell a beginner, I can't figure out the scripts.

There is a layer in which there are several polygons.

Data in the KV attachment.zip


It is necessary to iterate through all polygons sequentially in the loop and get their parameters, name, borders, coordinates, and so on...


That is...

- We take the first polygon, 

- we get its boundaries.

- We scale the polygon to the full screen along the borders.

- Save the visible area of the polygon in TIFF with the name of the polygon number.


Repeat for all polygons in the layer.


Thanks.

I am grateful in advance.

Answers

  • How do I get the geometry of a specific polygon ?


  • 946
    946 Global Mapper User Trusted User

    I would do like this:

    Select All the polygons and make a copy layer (ctrl c / ctrl v).

    Set KVARTAL attribute ase label for the original layer in order to see that in final export.

    Select only the polygons from the copy layer and use this for the export of original layer (disable the export option for copy layer).

    Export original layer as Geotif (I used 1m x 1m for resolution and ".tif" as name) with the tiling option set on KVARTAL attribute and select "NO", use the bounding box


    the result is this:

    Optionally you can create a buffer to the copy layer to have some out the box information saved on your tif files

  • I want to iterate over polygons using a script.