24 #define BONN_NO_ERROR 0x0000 25 #define BONN_LAT_ERROR 0x0001 26 #define BONN_LON_ERROR 0x0002 27 #define BONN_EASTING_ERROR 0x0004 28 #define BONN_NORTHING_ERROR 0x0008 29 #define BONN_ORIGIN_LAT_ERROR 0x0010 30 #define BONN_CENT_MER_ERROR 0x0020 31 #define BONN_A_ERROR 0x0040 32 #define BONN_B_ERROR 0x0080 33 #define BONN_A_LESS_B_ERROR 0x0100 35 #define PI_OVER_2 (M_PI / 2.0) 36 #define BONN_m(coslat,sinlat) (coslat/sqrt(1.0 - es2*sinlat*sinlat)) 37 #define BONN_M(c0lat,c1s2lat,c2s4lat,c3s6lat) (Bonn_a*(c0lat-c1s2lat+c2s4lat-c3s6lat)) 38 #define COEFF_TIMES_BONN_SIN(coeff,x,latit) (coeff*(sin(x * latit))) 39 #define FLOAT_EQ(x,v,epsilon) (((v - epsilon) < x) && (x < (v + epsilon))) 51 const double falseEasting,
52 const double falseNorthing)
125 double easting = 0.0;
126 double northing = 0.0;
183 double Origin_Latitude,
184 double Central_Meridian,
185 double False_Easting,
186 double False_Northing)
207 double x,e1,e2,e3,e4;
209 double sin2lat, sin4lat, sin6lat, lat;
266 j = 45.0 *
es6 / 1024.0;
267 three_es4 = 3.0 *
es4;
268 c0 = 1 -
es2 / 4.0 - three_es4 / 64.0 - 5.0 *
es6 / 256.0;
269 c1 = 3.0 *
es2 / 8.0 + three_es4 / 32.0 + j;
270 c2 = 15.0 *
es4 / 256.0 + j;
271 c3 = 35.0 *
es6 / 3072.0;
280 M1 =
BONN_M(lat, sin2lat, sin4lat, sin6lat);
282 x = sqrt (1.0 -
es2);
283 e1 = (1.0 -
x) / (1.0 +
x);
287 a0 = 3.0 * e1 / 2.0 - 27.0 * e3 / 32.0;
288 a1 = 21.0 * e2 / 16.0 - 55.0 * e4 / 32.0;
289 a2 = 151.0 * e3 / 96.0;
290 a3 = 1097.0 * e4 / 512.0;
309 double *Origin_Latitude,
310 double *Central_Meridian,
311 double *False_Easting,
312 double *False_Northing)
const 343 double *Northing)
const 363 double clat = cos(Latitude);
364 double slat = sin(Latitude);
365 double lat, sin2lat, sin4lat, sin6lat;
404 MM =
BONN_M(lat, sin2lat, sin4lat, sin6lat);
410 EE =
Bonn_a * mm * dlam / rho;
423 double *Longitude)
const 445 double sin2mu, sin4mu, sin6mu, sin8mu;
468 rho = sqrt(dx * dx + am1sin_dy * am1sin_dy);
478 *Latitude = mu + sin2mu + sin4mu + sin6mu + sin8mu;
486 clat = cos(*Latitude);
487 slat = sin(*Latitude);
493 am1sin_dy = -am1sin_dy;
509 if (*Longitude >
M_PI)
511 else if (*Longitude < -
M_PI)
523 if (!ossimMapProjection::operator==(proj))
long Set_Bonne_Parameters(double a, double f, double Origin_Latitude, double Central_Meridian, double False_Easting, double False_Northing)
double Bonn_Delta_Northing
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
long Set_Sinusoidal_Parameters(double a, double f, double Central_Meridian, double False_Easting, double False_Northing)
Represents serializable keyword/value map.
ossimBonneProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
const char * find(const char *key) const
bool almostEqual(T x, T y, T tolerance=FLT_EPSILON)
virtual const ossimString & code() const
virtual ossimDpt forward(const ossimGpt &worldPoint) const
All map projections will convert the world coordinate to an easting northing (Meters).
void setFalseEasting(double falseEasting)
double latd() const
Will convert the radian measure to degrees.
static const char * TYPE_KW
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
#define STATIC_TYPE_NAME(T)
const ossimDatum * datum() const
datum().
#define BONN_M(c0lat, c1s2lat, c2s4lat, c3s6lat)
#define COEFF_TIMES_BONN_SIN(coeff, x, latit)
void setFalseNorthing(double falseNorthing)
long Convert_Geodetic_To_Bonne(double Latitude, double Longitude, double *Easting, double *Northing) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
const double & getA() const
double lonr() const
Returns the longitude in radian measure.
long Convert_Sinusoidal_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude)
virtual bool operator==(const ossimProjection &projection) const
Returns TRUE if principal parameters are within epsilon tolerance.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
double Bonn_False_Easting
double Bonn_False_Northing
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const
Will take a point in meters and convert it to ground.
long Convert_Bonne_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude) const
#define BONN_m(coslat, sinlat)
void setFalseEastingNorthing(double falseEasting, double falseNorthing)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
long Convert_Geodetic_To_Sinusoidal(double Latitude, double Longitude, double *Easting, double *Northing)
double latr() const
latr().
void Get_Bonne_Parameters(double *a, double *f, double *Origin_Latitude, double *Central_Meridian, double *False_Easting, double *False_Northing) const
const double & getFlattening() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
double Sin_Bonn_Origin_Lat
#define RTTI_DEF1(cls, name, b1)
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
#define FLOAT_EQ(x, v, epsilon)
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.