2

Closed

Voronoi (Thiessen) Polygons -- invalid results

description

I'm using DotSpatial.Analysis.Voronoi.VoronoiPolygons, and it is producing invalid results for some cases. I've attached an example point shapefile and an image of the results I'm getting.

file attachments

Closed Feb 28 at 8:04 AM by jany_
This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues)

Please check there to find out whether this issue was fixed.

comments

Shade1974 wrote Sep 30, 2010 at 7:04 PM

The code is not stable for the full range of double values. What I don't remember is what the stable range of values should be. Some people have had luck transforming the coordinates to a different scale range, (probably larger values) and re-trying the algorithm, and then transforming the resulting voronoi output back. You could probably use a projection to accomplish this fairly easily. It may not help, but it helped some in the past.

pbduda wrote Oct 1, 2010 at 1:59 PM

Ah yes, I should have mentioned that I did transform the coordinates to a different scale range already. That transformation cured a lot of ills, but not this one. So this is a different and ongoing problem.

With regard to the coordinate transformation solution, do we know what the valid range of coordinates is? It seems we should code that into the Dot Spatial Voronoi algorithm; ie if the coordinates are out of range automatically convert them. There's no need for each Dot Spatial user to be writing code to do that conversion.

Shade1974 wrote Oct 1, 2010 at 6:12 PM

That's a good suggestion. Since it is more of a feature request, I will post it as a separate issue. Thanks.

pbduda wrote Oct 4, 2010 at 9:02 PM

That sounds like the right move, but just to be clear, the original problem shown in the zip file remains as an open issue.