Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Finding if a point is within a shape.
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mirhagk




PostPosted: Tue May 28, 2013 7:37 am   Post subject: Finding if a point is within a shape.

Hello all,

I'm building a system that at one point needs to use GPS coordinates to figure out if a point is within a range of certain objects. Some objects may not have a range however, and may instead have a region that I want to check.

The region can be denoted by the vertices and edges, and I'm trying to determine a fast way to check if it's within the shape made.

Originally I thought about taking a radius for each vertex (which covers the area, and a little more), and make sure it's in all of the radii, but I realized that that'd give an estimate, and it'd be pretty poor in some cases. The shapes can be arbitrary, but they shouldn't be too complex (as in they should only have a few points each, not hundreds, probably max around 10).

Does anyone have any ideas for how I can do this?
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Tue May 28, 2013 7:48 am   Post subject: RE:Finding if a point is within a shape.

http://en.wikipedia.org/wiki/Point_in_polygon
2goto1




PostPosted: Tue May 28, 2013 8:31 am   Post subject: RE:Finding if a point is within a shape.

Are you looking for a Cartesian solution or a Geographic solution, and what development tools are you using and storing the data within? Are you looking to implement your own algorithms?
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: