Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a series of points fed into a voronoi graph class that returns a series of edges defining the bounds between these points, the process works it returns a series of edges.

I now need to do a ray/fill using the points and these edges to build polygons around each point.... for the life of me I can't seem to figure out a process of doing this or a code sample... C# code or thought process would be great .... maybe ray collision?

Sample Voroni

share|improve this question
1  
Are you doing this in straight C#, or are you using a library like ArcGIS? Does the process not return any other information than the edges? –  Anthony -GISCOE- Jan 31 '11 at 13:59
    
I've used codeproject.com/KB/recipes/fortunevoronoi.aspx class it return a series of edges with left and right nodes, this is being done in c# with the sharpmap library, I only have the point information available –  Jamo Jan 31 '11 at 22:07

2 Answers 2

up vote 2 down vote accepted

How about PolygonBuilder in nettopologysuite

NetTopologySuite is a C#/.NET port of JTS Topology Suite, a Java library for GIS operations, (OpenGIS compliant).

share|improve this answer
    
I think I've got an idea for this particular set of data if I draw a line from each node to the center of each edge the edges that have only 1 intersection are the ones that create a closed polygon.... might not be the prettiest routine but it will get the job done... or else I will look into NetTopologySuite –  Jamo Feb 1 '11 at 1:52

Does this question help?

share|improve this answer
1  
That question is apt. The point hinted at by @Anthony in a comment to the question is that one shouldn't have to go to such lengths: any procedure to compute Voronoi polygons already "knows" the topology and ought to be able to communicate it directly to the caller. –  whuber Jan 31 '11 at 19:45
    
Exactly. If you have the reference to the left and right nodes, you should just be able to create polygons by finding all the edges for a specific node, i.e. using the soltion for the question above. –  Anthony -GISCOE- Feb 1 '11 at 16:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.