That was my point. Im not sure till what distance this will be the correct way, but if you are saying that this works pretty ok for "small" distances then thats a way to go...
I have one question, what are you taking as a x,y values of a point? In a caucasian system the values would be: x = r*cos(radians(lng))*cos(radians(lat)) y = r*sin(radians(lng))*cos(radians(lat)) z = r*sin(radians(lat)) in this way we then dont need the radius, so r=1 and the values become x = cos(radians(lng))*cos(radians(lat)) y = sin(radians(lng))*cos(radians(lat)) On Fri, Sep 7, 2012 at 8:54 PM, Andrew C Leach <[email protected]> wrote: > On 7 September 2012 19:15, Blagoja Chavkoski <[email protected]> wrote: > > Well my question was more related to people who have used this 2D > > calculation, > > and what are the resoults there getting? Dose actully created polygon > from a > > latlng(s) > > and a given random point(latlng) returns correct outcome. > > 2D and 3D is largely irrelevant because the line-segments are > generally short enough that a straight line between two projected > points is the same as a projected great-circle line between the > points. > > If you are attempting to find whether a particular point is within the > Bermuda triangle, it might become relevant (because the sides are > long) but for most polygons it's not because each line defining the > polygon is fairly short. > > I've never had any issues with my implementation of the algorithm I > linked to; but I'm using it to determine points in polygons where the > line segments are of the order of metres in length rather than > hundreds of kilometres. > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
