de.fhg.igd.earth.utils
Class Geometry

java.lang.Object
  extended byde.fhg.igd.earth.utils.Geometry

public class Geometry
extends Object

This is a geometry class. It is used to convert FlatProjector coordinates to SphereProjector coordinates and back . Also you can calculate distances between two geopositions. The Points2Arc() method calculates a 3D Arc between two geopositions. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel

Field Summary
static double arcLength
          the arcLength in km
static double earthRadius
          the earth raduis in km
(package private) static double factor
          deg->rad factor
(package private) static double scaleZ
          Flat->Sphere z-factor
 
Constructor Summary
Geometry()
          Creates an instance of this class.
 
Method Summary
static double calcAmplitude(cVector3d v1, cVector3d v2, cVector3d vn)
          Calculates the amplitude for vn.
static cVector3d devide(cVector3d v1, cVector3d v2)
          Creates a new vector that lies between v1 and v2 with the same length as v1.
static double distance(cPoint3d p1, cPoint3d p2)
          Calculates the distance between to geopositions (Points) in degrees.
static double distance(cVector3d v1, cVector3d v2)
          Calculates the distance between to geopositions (Vectors) in degrees.
static cPoint3d Flat2Sphere(cPoint3d p)
          Converts a FlatProjector point to a SphereProjector point (bending)
static cPoint3d Points2Arc(cPoint3d p1, cPoint3d p2, double percent)
          Calculates a point on a 3D arc between two geopositions.
static cPoint3d Sphere2Flat(cPoint3d p)
          Converts a SphereProjector point to a FlatProjector point (rebending)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factor

static final double factor
deg->rad factor

See Also:
Constant Field Values

scaleZ

static final double scaleZ
Flat->Sphere z-factor

See Also:
Constant Field Values

earthRadius

public static final double earthRadius
the earth raduis in km

See Also:
Constant Field Values

arcLength

public static final double arcLength
the arcLength in km

See Also:
Constant Field Values
Constructor Detail

Geometry

public Geometry()
Creates an instance of this class.

Method Detail

Flat2Sphere

public static cPoint3d Flat2Sphere(cPoint3d p)
Converts a FlatProjector point to a SphereProjector point (bending)


Sphere2Flat

public static cPoint3d Sphere2Flat(cPoint3d p)
Converts a SphereProjector point to a FlatProjector point (rebending)


Points2Arc

public static cPoint3d Points2Arc(cPoint3d p1,
                                  cPoint3d p2,
                                  double percent)
Calculates a point on a 3D arc between two geopositions. The special point can be selected by the percent value. 0%=p1, 100%=p2.

Parameters:
p1 - Point 1
p2 - Point 2
percent - Value to select a point between p1 and p2
Returns:
cPoint3d

calcAmplitude

public static double calcAmplitude(cVector3d v1,
                                   cVector3d v2,
                                   cVector3d vn)
Calculates the amplitude for vn. v1=start v2=end vn=point between v1,v2 The amplitude is 0 at v1 and v2. This method is used by Point2Arc.

Parameters:
v1 - start Vector
v2 - end Vector
vn - current Vector
Returns:
amplitude

distance

public static double distance(cPoint3d p1,
                              cPoint3d p2)
Calculates the distance between to geopositions (Points) in degrees.

Parameters:
p1 - start Point
p2 - end Point
Returns:
distance

distance

public static double distance(cVector3d v1,
                              cVector3d v2)
Calculates the distance between to geopositions (Vectors) in degrees.

Parameters:
v1 - start Vector
v2 - end Vector
Returns:
distance

devide

public static cVector3d devide(cVector3d v1,
                               cVector3d v2)
Creates a new vector that lies between v1 and v2 with the same length as v1.

Parameters:
v1 - Vector 1
v2 - Vector 2
Returns:
Vector between v1 and v2


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.