How to get points inside polygon
-
Hi, is it possible to get all the point inside the polygon. Scenario is quite simple; I have created a polygon on panel. Now I want to get all the points inside polygon. Can anyone tell me about any function (win32 or .net library function) or good web link, I will be thankful to you. Regards,
-
Hi, is it possible to get all the point inside the polygon. Scenario is quite simple; I have created a polygon on panel. Now I want to get all the points inside polygon. Can anyone tell me about any function (win32 or .net library function) or good web link, I will be thankful to you. Regards,
You need all the points inside polygon? I am afraid but you will get OutOfMemoryException :)
#region signature my articles #endregion
-
Hi, is it possible to get all the point inside the polygon. Scenario is quite simple; I have created a polygon on panel. Now I want to get all the points inside polygon. Can anyone tell me about any function (win32 or .net library function) or good web link, I will be thankful to you. Regards,
Hello, google search[^] CP article[^]
All the best, Martin
-
You need all the points inside polygon? I am afraid but you will get OutOfMemoryException :)
#region signature my articles #endregion
Thanks a lot for you reply. Actually I want to check the mouse enter event for the polygon, I found two ways to check it 1. Check all the polygons coordinates and on mouse move and pick up the source polygon 2. Create a Hashtable of point and their respective polygon object. On every mouse move check that hash. I found 2nd method fast and efficient. I don’t think so it may cause out of memory, what u suggest! Please guide me about the good approach that I should fallow. Regards,
-
Hi, is it possible to get all the point inside the polygon. Scenario is quite simple; I have created a polygon on panel. Now I want to get all the points inside polygon. Can anyone tell me about any function (win32 or .net library function) or good web link, I will be thankful to you. Regards,
Hi, Maybe this is what you need: .NET has a Region class that represents an arbitrary closed shape. And Region.IsVisible() tells you whether a point, rectangle, whatever lies inside the region. BTW: if yours happens to be a web app, then PolygonHotSpot Class might be useful. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Hi, Maybe this is what you need: .NET has a Region class that represents an arbitrary closed shape. And Region.IsVisible() tells you whether a point, rectangle, whatever lies inside the region. BTW: if yours happens to be a web app, then PolygonHotSpot Class might be useful. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
Hi, it is really great solution, but I don’t think it will work for polygon.... :^)
-
Hi, it is really great solution, but I don’t think it will work for polygon.... :^)
faheem424 wrote:
it is really great solution, but I don’t think it will work for polygon....
Why not? Have you tried? What was the result?
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Different ways to add point data in SQL Server 2008 * Spatial References in SQL Server 2008 My website |
-
faheem424 wrote:
it is really great solution, but I don’t think it will work for polygon....
Why not? Have you tried? What was the result?
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Different ways to add point data in SQL Server 2008 * Spatial References in SQL Server 2008 My website |
I tried it and it is really working fine. It is good solution. You have really solved the looping cost of my program. Thanks a lot. Regards,
-
I tried it and it is really working fine. It is good solution. You have really solved the looping cost of my program. Thanks a lot. Regards,
you're welcome. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.