Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a lot of different areas in 2d coordinate system (edge points given). Some of them intersect and belong together and for some areas there has to be considered only the area without intersection - this depends on given criteria.

Does someone knows a similar project or a library allowing this kind of 2d analysis?

I have been searching for this longer time but haven't found any useful solutions.
Posted

1 solution

Yes, I do. You can use the class System.Drawing.Region. If you did not get what I mean, pay attention for its set-theory methods/properties Complement, Exclude, Intersects, IsEmpty, MakeEmpty, Union, Xor:
http://msdn.microsoft.com/en-us/library/system.drawing.region.aspx[^].

You have all the operations you may need for your analysis, which will only take some thinking…
Please pay attention: you don't have to use any graphics, say, with System.Windows.Forms or any other limitation. You can use this library with or without graphics of any nature, just for pure set-theory calculations.

—SA
 
Share this answer
 
v2
Comments
Shahin Khorshidnia 19-Jun-12 11:36am    
Good answer SA.
My +5
Sergey Alexandrovich Kryukov 19-Jun-12 11:57am    
Thank you, Shahin.
--SA
michaell 20-Jun-12 3:46am    
Thank you Sergey, haven't considered this - area analysis isn't soo exact but nevertheless - free & working ;)
Sergey Alexandrovich Kryukov 20-Jun-12 11:11am    
You are very welcome.
These operations certainly work; on Windows, they are based on Win32 Region functions. I've used them for set calculations, it was very effective. Right now, I work for the company where such calculations are used for confidence interval calculations for estimation of measurement/test results, also very successfully.

Good luck, call again,
--SA
VJ Reddy 20-Jun-12 13:25pm    
Good answer. 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900