Gaussian trapezoidal formula

from Wikipedia, the free encyclopedia

With the help of the Gaussian trapezoidal formula (after Carl Friedrich Gauß ) it is possible to calculate the area between several points related / coordinated to a measurement line, for example the area of ​​a simple polygon . The calculation is carried out by breaking down the area sought into individual trapezoids related to the measurement line .

formula

Word formula:

  • The double area corresponds to the sum of the current right value and the following one, multiplied by the difference between the current high value and the following high value.

or:

  • Double the area corresponds to the sum of the current high value and the subsequent one, multiplied by the difference between the following eastward value and the current eastward value.

The following applies to both formulas: The indices that are greater than must always be considered modulo , i.e. H. with is and with is meant; or in general terms, it must each index by replacing. Here, , , , the coordinates of the various (not collinear ) vertices of the polygon in a Cartesian coordinate system .

If the points are traversed in the direction of rotation of the coordinate system , the calculated area is positive, otherwise negative.

Pick's theorem can be used especially for polygonal surfaces with grid points as corners . Other areas can usually be approximated without any problems using polygons , so that an approximate value can easily be obtained.

programming

Formula representation

Especially for programming the following representation of the Gaussian trapezoid formula is particularly suitable because to save the coordinate arrays offer the array indexing in many programming languages starts already at zero and the modulo function can therefore particularly come elegantly used. The modulo function is necessary here in order to exclude so-called off-by-one errors in the array indexing. Here, , , , the coordinates of the vertices of the polygon.

Program code

The following program code is intended to show an exemplary implementation - here in the Java programming language :

public double berechnePolygonFlaeche(double[] x, double[] y) {
  if ((x == null) || (y == null)) return 0.0;  // auf leere Argumente testen
  int n = Math.min(x.length, y.length);        // Anzahl der Ecken des Polygons
  if (n < 3) return 0.0;                       // ein Polygon hat mindestens drei Eckpunkte
  double a = 0.0;                              // Variable fuer Flaeche des Polygons
  for (int i = 0; i < n; i++) {                // Schleife zwecks Summenbildung
    a += (y[i] + y[(i+1) % n]) * (x[i] - x[(i+1) % n]);
  }
  return Math.abs(a / 2.0);                    // Flaecheninhalt zurueckliefern
}

The coordinates of the corner points are stored in the two arrays xand y. For the example pentagon , which has an area of ​​45, these arrays can e.g. B. initialized as follows:

double[] x = {7.0, 8.0, 4.0, 1.0, 1.0};        // beispielhafte x-Koordinaten des Polygons
double[] y = {0.0, 7.0, 9.0, 6.0, 2.0};        // beispielhafte y-Koordinaten des Polygons

example

Polygon area

The area of ​​the picture on the right is to be calculated using the trapezoidal formula. A geodetic coordinate system is used in which the positive direction of rotation corresponds to the clockwise direction. In order to obtain a positive area, the points must therefore be traversed in a clockwise direction.

The calculation can be documented in different ways. To simplify this notation, z. B. preprinted forms within the field of surveying.

If we decompose the image to be seen on the single surface in the four sub-areas , , and , we obtain the following formula:

So is

.

One obtains from it by small deformations

.

This result corresponds to the trapezoidal formula given above.

Triangle formula

Derivation

The Gaussian triangle formula results from factoring out and rearranging the Gaussian trapezoidal formula . The indices that are smaller than 1 or larger than must also be considered modulo here, i.e. H. with is , with is , with is and with is meant; Or in general terms, each index must be replaced by or , if one wants to avoid any problems (e.g. in programming) due to negative modulo arguments.

Analog can be

to

reshape.

Summary

In words, the Gaussian triangle formula is:

  • Double the area corresponds to the product of the current eastward value and the difference between the previous high value and the following high value.
, where: with is and with is meant

Or:

  • Double the area corresponds to the product of the current high value and the difference between the following eastward value and the previous eastward value.
, where: with is and with is meant

application

To determine the area in the Gauß-Krüger coordinate system , the area distortion must be taken into account depending on the distance to the main meridian .

Formula to take account of surface distortion:

  • = Area reduction (m²)
  • = Starting area (m²)
  • = Distance to main meridian (m)
  • = Earth radius (6,383,000 m)

Individual evidence

  1. a b vermessung-und-geoinformation.de: 27.6.3. Large-scale continuation of the cadastral records