Skip to content
Prev 23359 / 29559 Next

Divide Voronoi cell using azimuth in R

Hello All,

Here is my code to generate some sample data for my question. As well as a
ggplot picture of voronoi.

What I want to do is divide each voronoi cell(the polygon in the center
which has closure edge ) into three cells(sectors).


?> head(data)

  site      lng      lat sector azimuth kpiA
1    a 103.8504 1.315139     a1       0   10
2    a 103.8504 1.315139     a2     120   20
3    a 103.8504 1.315139     a3     240   30
4    b 103.8481 1.321613     b1      50   40
5    b 103.8481 1.321613     b2     190   50
6    b 103.8481 1.321613     b3     320   60
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20150908/3eeb8922/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot.png
Type: image/png
Size: 34242 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20150908/3eeb8922/attachment.png>
Message-ID: <CAG5uXVD9_67=j80EgLEm2eanMFG5d0G0U3AxHz8SJEhR2+rQHA@mail.gmail.com>
In-Reply-To: <CAG5uXVBz4-jFpWFDD9qdD65U6GpbG6AG_Be5E7ow9xUfPugC+g@mail.gmail.com>