Computer Science Canada

Finding if a point is within a shape.

Author:  mirhagk [ 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?

Author:  Insectoid [ 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

Author:  2goto1 [ 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?


: