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
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 182 Announcement and News
- 942 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 581 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 245 How I use Global Mapper
- 111 Global Mapper Forum Website










