Re: polygonal area on a sphere



<moltilimits@xxxxxxxxx> a écrit dans le message de news:
1172134968.890468.317230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
please, someone can tell me how can I to calculate the area of a
polygon on the earth's surface where I know the coordinates (lat/lon)
of its points?

Since you know the coordinates of every vertex, break it into
triangles. The area of every triangle is that triangle's base
times its height divided by two. Sum the areas.

It's ok like idea, but doesn't exists a formula that uses vertex
coordinates to obtain the result?
Break the area in small trangles is allright, but practically how can
I implement it? I must find a point internal to the polygon and then
consider all the triangles? So, the calculus of the areas isn't very
easy: I know the vertex of the triangle and the calculus of the height
can be difficult.
Must I use the Erone's formula?
Sorry for the questions but I see this problem very difficult for me :-

If you convert your coordinates from latitude/longitude to UTM, and assuming
the points are sufficiently close that they can be considered to be on a
plane, you could calculate the area using the following C code:

/*
* Returns the area of the polygon enclosed by the n points (x[0],y[0])
* to (x[n-1],y[n-1]). The sign of the result is positive if the
* orientation of the polygon is counterclockwise, and negative if it
* is clockwise.
*/
double area(double x[], double y[], unsigned n)
{
unsigned i;
double area;

area = x[n-1]*y[0] - y[n-1]*x[0];
for (i = 0; i < n-1; i++) {
area += x[i]*y[i+1] - y[i]*x[i+1];
}
return area / 2;
}

--
Colin


.



Relevant Pages

  • Re: outline polygon of overlapping triangles
    ... where I can get an algorithm that creates ... If you want the polygon that is the union of the ... triangles, the suggestion to use Alan Murtha's ...
    (comp.graphics.algorithms)
  • Re: From Triangle tiles to convex Polygons.
    ... I start out with a complicated non-convex polygon with holes. ... it into OpenGL GLU, and I get back a few hundred triangles that ... problem is that a few hundred triangles is way too many, ... I think you can do this by taking your triangulation and merge triangles to build multiple convex polygons from it. ...
    (comp.graphics.algorithms)
  • Re: Uniformly Distribute Points inside Polygon
    ... With the meshgrid, I ... won't know how many points will fall into the polygon beforehand. ... Since you are still interested in filling triangles, I thought I would fix up ... It is not an absolutely uniform filling in the sense of, say, packing spheres ...
    (comp.soft-sys.matlab)
  • Re: polygonal area on a sphere
    ... polygon on the earth's surface where I know the coordinates (lat/lon) ... I must find a point internal to the polygon and then ... consider all the triangles? ... the calculus of the areas isn't very ...
    (sci.geo.satellite-nav)
  • Re: From Triangle tiles to convex Polygons.
    ... all internal edges that don't have a connection to a convex vertex. ... You don't get the minimal convex decomposition that way. ... like metric to avoid all the long and thin triangles. ... the polygon with holes to a simple polygon. ...
    (comp.graphics.algorithms)