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 ?
-
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.
Categories
- 12.8K All Categories
- 5.7K Features Discussion
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 639 GM Script Language
- 54 User Scripts
- 115 GPS Features
- 417 Projection Questions
- 827 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 918 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 570 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 239 How I use Global Mapper
- 107 Global Mapper Forum Website