Hi Ted,

let me explain the original problem and (together with, rather than just) the 
solution I've thought of. Please excuse my somewhat messed up terminology:

I'm attempting to come up with an estimated map of the Swedish postal code 
system. For each postal code I'm aware of a number of points, sometimes I'm 
such great detail that I can create a good enough hull from the points (I would 
know when this is true and generally speaking this is only in urban areas), 
sometimes I'm just aware of a handful of points (generally speaking in the 
country side).

My original question was based on the thought that I could create a hull from 
the known points in each postal code and use those hulls as the sites in a 
Voronoi. 

The second post was the thought that I could create a Voronoi where each point 
in the postal code hulls would be be a site, and then in a post process 
iteration merge the clusters that are created from the same hull.

I would then have to come up with something that replaced clusters created from 
postal code hulls known to already be of great quality in order to improve the 
quality of their neighbors. I don't think that one will be a major problem.

(In the end this data is to be fed to OSM, causing a range of potential future 
problems that are out of scoop for this forum.)


                        karl

29 aug 2012 kl. 23:39 skrev Ted Dunning:

> Karl,
> 
> I don't think that I understand your request.
> 
> What I think I hear is that you want an implementation (with unknown inputs
> and outputs) that encodes a Voronoi tesselation using boundary vertices
> instead of centroids.
> 
> Is that correct?
> 
> If so, it is relatively easy to go from centroid form to boundary vertex
> form.  Boundary edges are segments of the equidistant lines between
> centroids that form a minimal convex hull around the centroids.  The
> intersections of adjacent boundary edge segments are the vertices.
> 
> Going back is also relatively easy.  Centroids are the intersection of
> perpindicular bisectors of the boundary edges.
> 
> As far as concrete implementations go, I have found the tripack library in
> R quite useful.  For example, I generated the image at
> https://dl.dropbox.com/u/36863361/k-means-3.png by using the following R
> code:
> 
> png("k-means-3.png", width=600, height=600)
> plot(voronoi.mosaic(c$centers[,1], c$centers[,2],duplicate="remove"),
> main="", xlab="", sub="")
> points(x[,1], x[,2], cex=0.5, col='red', type='p')
> points(c$centers[,1], c$centers[,2])
> points(c$centers[,1], c$centers[,2], cex=0.5)
> points(c$centers[,1], c$centers[,2], cex=0.2)
> dev.off()
> 
> 
> 
> 
> On Wed, Aug 29, 2012 at 8:10 AM, Karl Wettin <[email protected]> wrote:
> 
>> 
>> 29 aug 2012 kl. 11:54 skrev Karl Wettin:
>> 
>>> I'm searching for a Voronoi-implementation where the nodes/sites are
>> represented by a polygon rather than a point. Anyone seen such a thing?
>> 
>> I suppose one solution would be to use each point in the polygon as a site
>> and then merge all clusters created from the points from the same polygon.
>> Is that the only solution?
>> 
>> 
>>                        karl

Reply via email to