Thursday 19 December 2019

qgis - Converting point sets to polygon boundaries?



I'm trying to convert sets of points to their respective polygon boundaries. I think this is something like a Voronoi diagram or Convex Hull, but not quite. I'm sure there's a technical term for it, but I'm a beginner to GIS.


It's probably best illustrated with the following image:


enter image description here


So, given 4 sets of points (each set in its own colour), what are the four polygons surrounding each respective set of points such that the spacing between polygons maximizes the margins and all the polygons meet together?


Here's a simplified example with 3 points:



  • A,43.656943,-79.393928,blue

  • B,43.66663,-79.402682,green

  • C,43.656447,-79.408004,green



You'll have to view the following graphic for it to make sense: enter image description here


Essentially, each point has a colour and you expand a buffer of a certain distance out from it to start.


The hard part is when there's a collision with other points (their boundaries) and where to compute that boundary. The result is a set of polygons (one for each colour/set).



Answer



From your point layer


enter image description here


you can create Voronoi plogyons


enter image description here


Which would result in this


enter image description here



Then create a mask from Delauney triangulation process


enter image description here


enter image description here


And then clip the Voronoi polygons layer with it.


enter image description here


Would that be good enough?


You can also try combining your Delauney triangulation mask with a buffer of your point layer


enter image description here


and use that to clip your Voronoi polygons instead


enter image description here



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...