[Qgis-user] SPLIT POLYGONS INTO 3 PARTS (similar size)

Thayer Young thayeray at yahoo.com
Thu Jun 10 09:01:22 PDT 2021


 Hi Azzura,
You will need to run the entire process for each polygon. This is best way to handle this is by writing a python script or using the Graphical Modeler. In either case it would loop through the polygons, selecting a different polygon each time, and then applying the different tools. 
The third option would be to use the "Iterate"  and "Run as Batch Process" (button at the bottom left of each tool's dialog). This might be the easiest if you have not scripted or built models before.
Use the Random Points in Polygons tool as described in the GIS Stackexchange post but make sure that "include polygon attributes" is checked.
Then use the "Extract by Location" tool. Extract features from your random points, by comparing features from you polygon file and select "iterate over this layer" (button with two green arrows going counterclockwise). This will output your different point layers.
For the rest of the tools set them up as a batch. This is a lot like using a tool, except that you are entering the parameters into a table. One entry for each time the tool is to be run (200 in this case). The advantage is that it allows you to autofill repeated information, etc..
-Thayer
A tutorial for batch processing:https://docs.qgis.org/3.16/en/docs/training_manual/processing/batch_conversion.html?highlight=batch%20process


   
> Date: Thu, 10 Jun 2021 01:31:03 +0200
> From: Azzurra Lentini <azzurralentini at gmail.com>
> To: qgis-user <qgis-user at lists.osgeo.org>
> Subject: Re: [Qgis-user] SPLIT POLYGONS INTO 3 PARTS (similar size)
> Message-ID:
    <CAJ3ZhxohB75ZxA+w0QKOvPUj6Zo1A6raELyZwRYZqJ2H8x2YwA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"

> Hi List, I ask you  again the same question  I asked you days ago.
> I have several polygons - around 200-  (all different shapes and not
> regular geometry) and I need to split every single polygon into 3 parts of
> similar size.
> I have tried with *Split polygons* but it is working very well only with
> regular geometries (square, rectangle etc.) and so I can not use it in this
> case.
> I have tried  also your suggestions (generate points, kclustering and
> voronoi polygons):https://gis.stackexchange.com/questions/321021/how-to-
> split-polygon-into-equal-area-polygons-in-qgis-3 and
> https://blog.cleverelephant.ca/2018/06/polygon-splitting.html
> but I am not able to do it to all 200 polygons at once.. I can do it only
> polygon by polygon..

> do you have other suggestions? thanks AL

> On Wed, 19 May 2021 at 15:49, Azzurra Lentini <azzurralentini at gmail.com>
> wrote:

> Dear List,
> please I would like to have any suggestion regarding this topic: I have
> several polygons (all different shapes and not regular geometry) and I need
> to split every single polygon into 3 parts of similar size.
> I have tried with *Split polygons* but it is working very well only with
> regular geometries (square, rectangle etc.) and so I can not use it in this
> case.
>
> Do you have any suggestions?
>
> THANK YOU, AZZURRA
> --
> Adjunct Professor University "Roma Tre"
> Gis Applied for Environmental studies
> Risk modelling & Hydrogeology
> Consultant DFID-UK, United Nations, EU projects
> AZZURRA LENTINI
> ++++++++++++++++++++++++++
> Italy Mobile Tel.: **(39) 338 24 40 676
> ++++++++++++++++++++++++++
> SKYPE azzurrahydro
> ++++++++++++++++++++++++++
>
> *azzurralentini at gmail.com <azzurralentini at gmail.com>*
>
> *azzurra.lentini at uniroma3.it <azzurra.lentini at uniroma3.it> *
> ++++++++++++++++++++++++++
> *Par respect pour l'environnement,*
>
> *n'imprimez ce mail qu'en cas d'absolue n?cessit?*
>
>
>
>
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210610/3b3e4c8b/attachment.html>


More information about the Qgis-user mailing list