24 #define SINU_NO_ERROR 0x0000 25 #define SINU_LAT_ERROR 0x0001 26 #define SINU_LON_ERROR 0x0002 27 #define SINU_EASTING_ERROR 0x0004 28 #define SINU_NORTHING_ERROR 0x0008 29 #define SINU_CENT_MER_ERROR 0x0020 30 #define SINU_A_ERROR 0x0040 31 #define SINU_B_ERROR 0x0080 32 #define SINU_A_LESS_B_ERROR 0x0100 35 # define PI_OVER_2 ( M_PI / 2.0) 38 # define TWO_PI (2.0 * M_PI) 41 #define SINU_COEFF_TIMES_SIN(coeff, x, latit) (coeff * sin(x * latit)) 42 #define FLOAT_EQ(x,v,epsilon) (((v - epsilon) < x) && (x < (v + epsilon))) 116 double falseNorthing)
138 double easting = 0.0;
139 double northing = 0.0;
189 double Central_Meridian,
190 double False_Easting,
191 double False_Northing)
210 double One_MINUS_es2, Sqrt_One_MINUS_es2, e1, e2, e3, e4;
233 j = 45.0 *
es6 / 1024.0;
234 c0 = 1.0 -
es2 / 4.0 - 3.0 *
es4 / 64.0 - 5.0 *
es6 / 256.0;
235 c1 = 3.0 *
es2 / 8.0 + 3.0 *
es4 / 32.0 + j;
236 c2 = 15.0 *
es4 / 256.0 + j;
237 c3 = 35.0 *
es6 / 3072.0;
238 One_MINUS_es2 = 1.0 -
es2;
239 Sqrt_One_MINUS_es2 = sqrt(One_MINUS_es2);
240 e1 = (1.0 - Sqrt_One_MINUS_es2) / (1.0 + Sqrt_One_MINUS_es2);
244 a0 = 3.0 * e1 / 2.0 - 27.0 * e3 / 32.0 ;
245 a1 = 21.0 * e2 / 16.0 - 55.0 * e4 / 32.0;
246 a2 = 151.0 * e3 / 96.0;
247 a3 = 1097.0 * e4 / 512.0;
275 double *Central_Meridian,
276 double *False_Easting,
277 double *False_Northing)
const 306 double *Northing)
const 321 double slat = sin(Latitude);
322 double sin2lat, sin4lat, sin6lat;
347 mm = sqrt(1.0 -
es2 * slat * slat);
352 MM =
Sinu_a * (
c0 * Latitude - sin2lat + sin4lat - sin6lat);
364 double *Longitude)
const 382 double sin2mu, sin4mu, sin6mu, sin8mu;
406 *Latitude = mu + sin2mu + sin4mu + sin6mu + sin8mu;
417 sin_lat = sin(*Latitude);
419 sin_lat * sin_lat) / (
Sinu_a * cos(*Latitude));
441 if (!ossimMapProjection::operator==(proj))
445 if (!p)
return false;
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
void setFalseNorthing(double falseNorthing)
double Sinu_Delta_Northing
double Sinu_False_Easting
Represents serializable keyword/value map.
#define FLOAT_EQ(x, v, epsilon)
long Convert_Geodetic_To_Sinusoidal(double Latitude, double Longitude, double *Easting, double *Northing) const
const char * find(const char *key) const
bool almostEqual(T x, T y, T tolerance=FLT_EPSILON)
double Sinu_False_Northing
virtual const ossimString & code() const
void setFalseEasting(double falseEasting)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
static const char * TYPE_KW
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
virtual ossimGpt inverse(const ossimDpt &eastingNorthing) const
Will take a point in meters and convert it to ground.
void setCentralMeridian(double centralMeridian)
#define STATIC_TYPE_NAME(T)
const ossimDatum * datum() const
datum().
virtual bool operator==(const ossimProjection &projection) const
Returns TRUE if principal parameters are within epsilon tolerance.
ossimSinusoidalProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
void setFalseEastingNorthing(double falseEasting, double falseNorthing)
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) const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimDpt forward(const ossimGpt &latLon) const
All map projections will convert the world coordinate to an easting northing (Meters).
#define SINU_COEFF_TIMES_SIN(coeff, x, latit)
double latr() const
latr().
const double & getFlattening() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
#define RTTI_DEF1(cls, name, b1)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
long Set_Sinusoidal_Parameters(double a, double f, double Central_Meridian, double False_Easting, double False_Northing)
void Get_Sinusoidal_Parameters(double *a, double *f, double *Central_Meridian, double *False_Easting, double *False_Northing) const
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.