org.deegree.cs.projections
Class ProjectionBase

java.lang.Object
  extended by org.deegree.cs.projections.ProjectionBase
Direct Known Subclasses:
LambertAzimuthalTest, LambertConformalConicTest, StereographicAlternativeTest, StereographicTest, TransverseMercatorTest

public class ProjectionBase
extends Object

ProjectionTest is the base for all accuracy tests, this class doesn't really test anything.

Version:
$Revision: 29642 $, $Date: 2011-02-11 13:59:33 +0100 (Fri, 11 Feb 2011) $
Author:
Rutger Bezema, last edited by: $Author: lbuesching $

Field Summary
protected static Axis[] axis_degree
          Standard axis of a geographic crs
protected static GeodeticDatum datum_6258
          European Terrestrial Reference System 1989
protected static Ellipsoid ellipsoid_7019
          A common ellipsoid also known as GRS 1980
protected static GeographicCRS geographic_4258
          Also known as ETRS89
protected static Helmert wgs_1188
          No wgs84 conversion needed.
 
Constructor Summary
ProjectionBase()
           
 
Method Summary
protected  void consistencyTest(Projection toBeTested, double falseNorthing, double falseEasting, javax.vecmath.Point2d naturalOrigin, Unit units, double scale, boolean conformal, boolean equalArea, String name)
          Helper method to test if the projections have given values, and do not change internally.
protected  String doAccuracyTest(javax.vecmath.Point2d origPoint, javax.vecmath.Point2d referencePoint, javax.vecmath.Point2d forwardEpsilons, Projection projection, GeographicCRS geographicCRS, boolean inverse)
          Transforms the given coordinates in the sourceCRS to the given targetCRS and checks if they lie within the given epsilon range to the reference point.
protected  void doForwardAndInverse(Projection projection, GeographicCRS geographicCRS, javax.vecmath.Point2d source, javax.vecmath.Point2d target)
          Do a forward and inverse accuracy test, using the standard epsilon values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

axis_degree

protected static final Axis[] axis_degree
Standard axis of a geographic crs


ellipsoid_7019

protected static final Ellipsoid ellipsoid_7019
A common ellipsoid also known as GRS 1980


wgs_1188

protected static final Helmert wgs_1188
No wgs84 conversion needed.


datum_6258

protected static final GeodeticDatum datum_6258
European Terrestrial Reference System 1989


geographic_4258

protected static final GeographicCRS geographic_4258
Also known as ETRS89

Constructor Detail

ProjectionBase

public ProjectionBase()
Method Detail

doAccuracyTest

protected String doAccuracyTest(javax.vecmath.Point2d origPoint,
                                javax.vecmath.Point2d referencePoint,
                                javax.vecmath.Point2d forwardEpsilons,
                                Projection projection,
                                GeographicCRS geographicCRS,
                                boolean inverse)
                         throws ProjectionException
Transforms the given coordinates in the sourceCRS to the given targetCRS and checks if they lie within the given epsilon range to the reference point. If successful the transformed will be logged.

Parameters:
origPoint - to transform
referencePoint - to which the result shall be checked.
forwardEpsilons - for each axis
projection - to test.
geographicCRS - geographicCRS of the points
inverse - true if the inverse projection should be tested.
Returns:
the result string.
Throws:
ProjectionException
AssertionError - if one of the axis of the transformed point do not lie within the given epsilon range.

doForwardAndInverse

protected void doForwardAndInverse(Projection projection,
                                   GeographicCRS geographicCRS,
                                   javax.vecmath.Point2d source,
                                   javax.vecmath.Point2d target)
                            throws ProjectionException
Do a forward and inverse accuracy test, using the standard epsilon values.

Parameters:
projection -
geographicCRS -
source -
target -
Throws:
ProjectionException

consistencyTest

protected void consistencyTest(Projection toBeTested,
                               double falseNorthing,
                               double falseEasting,
                               javax.vecmath.Point2d naturalOrigin,
                               Unit units,
                               double scale,
                               boolean conformal,
                               boolean equalArea,
                               String name)
Helper method to test if the projections have given values, and do not change internally.

Parameters:
toBeTested -
falseNorthing -
falseEasting -
naturalOrigin -
units -
scale -
conformal -
equalArea -
name - of the projection


Copyright © 2011. All Rights Reserved.