Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
Class Hierarchy
Class Members
All
!
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
gtsam
3rdparty
GeographicLib
examples
examples/example-PolygonArea.cpp
Go to the documentation of this file.
1
// Example of using the GeographicLib::PolygonArea class
2
3
#include <iostream>
4
#include <exception>
5
#include <
GeographicLib/PolygonArea.hpp
>
6
#include <
GeographicLib/Geodesic.hpp
>
7
#include <
GeographicLib/Constants.hpp
>
8
9
using namespace
std
;
10
using namespace
GeographicLib
;
11
12
int
main
() {
13
try
{
14
Geodesic
geod(Constants::WGS84_a(), Constants::WGS84_f());
15
// Alternatively: const Geodesic& geod = Geodesic::WGS84();
16
PolygonArea poly(geod);
17
poly.AddPoint( 52, 0);
// London
18
poly.AddPoint( 41,-74);
// New York
19
poly.AddPoint(-23,-43);
// Rio de Janeiro
20
poly.AddPoint(-26, 28);
// Johannesburg
21
double
perimeter, area;
22
unsigned
n
= poly.Compute(
false
,
true
, perimeter, area);
23
cout <<
n
<<
" "
<< perimeter <<
" "
<< area <<
"\n"
;
24
}
25
catch
(
const
exception&
e
) {
26
cerr <<
"Caught exception: "
<<
e
.what() <<
"\n"
;
27
return
1;
28
}
29
}
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
GeographicLib
Namespace for GeographicLib.
Definition:
JacobiConformal.hpp:15
n
int n
Definition:
BiCGSTAB_simple.cpp:1
PolygonArea.hpp
Header for GeographicLib::PolygonAreaT class.
Constants.hpp
Header for GeographicLib::Constants class.
std
Definition:
BFloat16.h:88
main
int main()
Definition:
examples/example-PolygonArea.cpp:12
GeographicLib::Geodesic
Geodesic calculations
Definition:
Geodesic.hpp:172
Geodesic.hpp
Header for GeographicLib::Geodesic class.
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:01:31