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. I dont know how
to use this methods as can be seen all are taking a int values for the poly
points, but we have angles in the case of lat lng...

>> In spherical geometry (which is indeed 2D)

Sperical forms are 3D objects and only a 3D objects, in this kind of
objects the values changes per 3 axes but this is found to be not important
for a proper Sperical object(a ball) because the R stays all the time the
same. For the Earth this R= 6371000 so the only important stuff for
positioning are the angles which are showing the exact position on the
surface.
There values  moves from -90 to 90 and -180 to 180.

So if we take the example that you said a 'circle' on a sphere, teoreticaly
there isnt this kind of circle, because this is a part of the sphere that
looks like eg baseboll hat, and I dont know how is called in english
because its not my native language. But lets take this as a examle the head
is the Earth then the hat on the head is a "circle". So we all here ask the
question, dose a point with a given latlng is "inside" this circle, but the
real question is dose this point lays out on the surface of the head which
is overlaped with the hat.

As an example if we take a distance between 2 points on the surface:
     this would be the correct 3D formula:

     distance = Math.acos(latPoint1) * Math.sin(latPoint2) +
                Math.cos(latPoint1) * Math.cos(latPoint2) *
Math.cos(lngPoint1 - lngPoint2)) * EARTH_RADIUS;

  - counting 2D space will have to use the very famous pitagora teorema

So there is a big difference.

Also in the js maps libs there is a pakage called geometry and you can see
most of the methods are getting a  EARTH_RADIUS as a optional parameter so
minning this is used inside, and all the solution from the link(2D) uses
just normal int x,y values for the points.
google.maps.geometry.spherical namespace

On Fri, Sep 7, 2012 at 6:41 PM, Rossko <ros...@culzean.clara.co.uk> wrote:

> > so the 2D solutions will be
> > close to correct
>
> You'd have to define what you would call a "correct" 3D solution.
> Imagine a circle drawn on a sphere with a point marked within it.  Is
> the point inside the circle or not from your viewpoint?  It is above
> the plane of the circle, so could be considered to be 'outside' in 3D
> terms.
> In spherical geometry (which is indeed 2D) it would be considered
> inside, as we are only interested in the surface of the sphere.
>
> --
> 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
> google-maps-js-api-v3@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-js-api-v3+unsubscr...@googlegroups.com.
> 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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to