Hi,
does anyone know how I can split a polygon into n polygons?
For performing area image classification I need to spatially divide my
training data (points in the polygon) into spatial clumps with those I
want to train different classifiers, so that I do not need to load the
image data for the whole polygon at once in the mapset. The image area
contains 4*10^9 pixels.
Best regards,
Anika
--
Anika Bettge
- Anwendungsentwicklerin -
mundialis GmbH & Co. KG
Kölnstraße 99
53111 Bonn
Tel: +49 (0)228 / 38 75 80 -80
Fax: +49 (0)228 / 96 28 99 -57
Email: bettge@mundialis.de
Web: https://www.mundialis.de
Amtsgericht Bonn, HRA 8528
Komplementärin: mundialis Verwaltungsgesellschaft mbH
vertreten durch: Dr. Markus Neteler, Hinrich Paulsen, Till Adams
Informationen über Ihre gespeicherten Daten finden Sie auf unserer Homepage unter folgendem Link:
https://www.mundialis.de/datenschutzerklaerung
On 15/08/18 15:56, Anika Bettge wrote:
> Hi,
>
> does anyone know how I can split a polygon into n polygons?
>
> For performing area image classification I need to spatially divide my
> training data (points in the polygon) into spatial clumps with those I
> want to train different classifiers, so that I do not need to load the
> image data for the whole polygon at once in the mapset. The image area
> contains 4*10^9 pixels.
Maybe I don't really understand what you are trying to do, but would v.mkgrid be the solution for you ?
Moritz
On Thu, Aug 16, 2018 at 10:34 AM Moritz Lennert
<mlennert@club.worldonline.be> wrote:
On 15/08/18 15:56, Anika Bettge wrote:
> does anyone know how I can split a polygon into n polygons?
>
> For performing area image classification I need to spatially divide my
> training data (points in the polygon) into spatial clumps with those I
> want to train different classifiers, so that I do not need to load the
> image data for the whole polygon at once in the mapset. The image area
> contains 4*10^9 pixels.
Maybe I don't really understand what you are trying to do, but would
v.mkgrid be the solution for you ?
Unfortunately not: we want to split the area of interest (vector
polygon) into subareas.
It looks like this:
https://doc.cgal.org/latest/Partition_2/index.html
but with the need of specifying the number of subareas (e.g. roughly
of the same size).
The polygon may have "any" shape.
With v.mkgrid we may end up with tiny polygon chunks here and there.
Perhaps some raster magic could do the job?
Markus
On 16/08/18 17:04, Markus Neteler wrote:
On Thu, Aug 16, 2018 at 10:34 AM Moritz Lennert
<mlennert@club.worldonline.be> wrote:
On 15/08/18 15:56, Anika Bettge wrote:
> does anyone know how I can split a polygon into n polygons?
>
> For performing area image classification I need to spatially divide my
> training data (points in the polygon) into spatial clumps with those I
> want to train different classifiers, so that I do not need to load the
> image data for the whole polygon at once in the mapset. The image area
> contains 4*10^9 pixels.
Maybe I don't really understand what you are trying to do, but would
v.mkgrid be the solution for you ?
Unfortunately not: we want to split the area of interest (vector
polygon) into subareas.
It looks like this:
https://doc.cgal.org/latest/Partition_2/index.html
but with the need of specifying the number of subareas (e.g. roughly
of the same size).
The polygon may have "any" shape.
With v.mkgrid we may end up with tiny polygon chunks here and there.
You could clean those in a second step with v.clean tool=rmmarea.
Otherwise, maybe the skeleton option (-s) of v.voronoi could help ?
Moritz
On Thu, Aug 16, 2018 at 6:28 PM Moritz Lennert
<mlennert@club.worldonline.be> wrote:
On 16/08/18 17:04, Markus Neteler wrote:
> On Thu, Aug 16, 2018 at 10:34 AM Moritz Lennert
> <mlennert@club.worldonline.be> wrote:
>> On 15/08/18 15:56, Anika Bettge wrote:
>> > does anyone know how I can split a polygon into n polygons?
>> >
>> > For performing area image classification I need to spatially divide my
>> > training data (points in the polygon) into spatial clumps with those I
>> > want to train different classifiers, so that I do not need to load the
>> > image data for the whole polygon at once in the mapset. The image area
>> > contains 4*10^9 pixels.
>>
>> Maybe I don't really understand what you are trying to do, but would
>> v.mkgrid be the solution for you ?
>
> Unfortunately not: we want to split the area of interest (vector
> polygon) into subareas.
> It looks like this:
> https://doc.cgal.org/latest/Partition_2/index.html
>
> but with the need of specifying the number of subareas (e.g. roughly
> of the same size).
> The polygon may have "any" shape.
>
> With v.mkgrid we may end up with tiny polygon chunks here and there.
You could clean those in a second step with v.clean tool=rmmarea.
Yes, v.mkgrid + v.clean tool=rmarea looks like a viable approach
(along with v.report to get the polygon area in order to estimate
about the grid number of v.mkgrid).
Otherwise, maybe the skeleton option (-s) of v.voronoi could help ?
I also tried that but...
# NC data
g.region vector=zipcodes_wake -p
v.voronoi input=zipcodes_wake output=zipcodes_wake_centerline -s
d.mon wx0
d.vect zipcodes_wake
d.vect zipcodes_wake_centerline color=red
... the result is, say, complex
Hard to topologically clean up.
Markus