Mike Morris wrote :
Riaan Koegelenberg wrote:
Have anyone ever done something like this? I need to
determine whether this polygon then contain a specific
point (coordinates also in lat/long).
This is really, /really/! hard to do if you need any sort of acccuracy.
The Earth is a spheroid, not flat, so any 2D-based solutions are wrong.
Best is to search for Great Circle navigation code, or ask Mr Ulrich
Schultz in the Hydrographer's office - I don't think too many other people
in the country know the math involved.
Anybody who's done a surveyor's degree would have done the math - whether
they still remember it is another matter, but they should have the books
still. There used to be someone on the CLUG mailing list who worked with
GIS's - you might try posting there and see if he answers.
The difficulty of the problem depends on the size of your polygons, if they
are small (say plot sized) then you just need to transform lat & long. to
grid co-ordinates and use standard plane geometry. If they are large (say
country sized) then the earth's curvature is significant and straight sides
are no longer a good approximation so you need to work in spherical
geometry.
Fritz Meissner