C library for Geodesics  2.1
planimeter.c File Reference

A test program for geod_polygon_compute() More...

#include <stdio.h>
#include "geodesic.h"

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

A test program for geod_polygon_compute()

Definition in file planimeter.c.

Function Documentation

◆ main()

int main ( void  )

A simple program to compute the area of a geodesic polygon.

This program reads in lines with lat, lon for each vertex of a polygon. At the end of input, the program prints the number of vertices, the perimeter of the polygon and its area (for the WGS84 ellipsoid).

Definition at line 23 of file planimeter.c.

References geod_init(), geod_polygon_addpoint(), geod_polygon_compute(), geod_polygon_init(), geod_polygon::lat, and geod_polygon::lon.