25 # define PI_OVER_2 ( M_PI / 2.0) 28 # define TWO_PI (2.0 * M_PI) 30 #define MAX_LAT (( M_PI * 89.99972222222222) / 180.0) 31 #define LAMBERT_m(clat,essin) (clat / sqrt(1.0 - essin * essin)) 32 #define LAMBERT_t(lat,essin) tan(PI_OVER_4 - lat / 2) / \ 33 pow((1.0 - essin) / (1.0 + essin), es_OVER_2) 34 #define ES_SIN(sinlat) (es * sinlat) 42 #define LAMBERT_NO_ERROR 0x0000 43 #define LAMBERT_LAT_ERROR 0x0001 44 #define LAMBERT_LON_ERROR 0x0002 45 #define LAMBERT_EASTING_ERROR 0x0004 46 #define LAMBERT_NORTHING_ERROR 0x0008 47 #define LAMBERT_FIRST_STDP_ERROR 0x0010 48 #define LAMBERT_SECOND_STDP_ERROR 0x0020 49 #define LAMBERT_ORIGIN_LAT_ERROR 0x0040 50 #define LAMBERT_CENT_MER_ERROR 0x0080 51 #define LAMBERT_A_ERROR 0x0100 52 #define LAMBERT_B_ERROR 0x0200 53 #define LAMBERT_A_LESS_B_ERROR 0x0400 54 #define LAMBERT_HEMISPHERE_ERROR 0x0800 55 #define LAMBERT_FIRST_SECOND_ERROR 0x1000 120 double parallel2Degree)
141 double falseNorthing)
151 double falseNorthing)
184 double easting = 0.0;
185 double northing = 0.0;
251 std::ios_base::fmtflags f = out.flags();
253 out << setiosflags(ios::fixed) << setprecision(15);
255 out <<
"// ossimLambertConformalConicProjection::print\n" 274 double Origin_Latitude,
275 double Central_Meridian,
276 double Std_Parallel_1,
277 double Std_Parallel_2,
278 double False_Easting,
279 double False_Northing)
298 double slat, slat1, clat;
374 n = log(m1 / m2) / log(t1 / t2);
378 F = m1 / (
n * pow(t1,
n));
380 if ((t0 == 0) && (
n < 0))
392 double *Origin_Latitude,
393 double *Central_Meridian,
394 double *Std_Parallel_1,
395 double *Std_Parallel_2,
396 double *False_Easting,
397 double *False_Northing)
const 431 double *Northing)
const 468 if (fabs(fabs(Latitude) -
PI_OVER_2) > 1.0e-10)
470 slat = sin(Latitude);
477 if ((Latitude *
n) <= 0)
510 double *Longitude)
const 529 double rho, rho0_MINUS_dy;
532 double tempPHI = 0.0;
536 double tolerance = 4.85e-10;
555 rho0_MINUS_dy =
rho0 - dy;
556 rho = sqrt(dx * dx + (rho0_MINUS_dy) * (rho0_MINUS_dy));
563 rho0_MINUS_dy *= -1.0;
568 theta = atan2(dx, rho0_MINUS_dy);
571 while (fabs(PHI - tempPHI) > tolerance)
581 if (fabs(*Latitude) < 2.0e-7)
588 if (*Longitude >
M_PI)
590 if (*Longitude -
M_PI < 3.5e-6)
595 if (*Longitude < -
M_PI)
597 if (fabs(*Longitude +
M_PI) < 3.5e-6)
603 if (fabs(*Longitude) < 2.0e-7)
605 if (*Longitude >
M_PI)
607 else if (*Longitude < -
M_PI)
637 if (!ossimMapProjection::operator==(proj))
641 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.
Represents serializable keyword/value map.
const char * find(const char *key) const
bool almostEqual(T x, T y, T tolerance=FLT_EPSILON)
virtual const ossimString & code() const
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().
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
const double & getA() const
double lonr() const
Returns the longitude in radian measure.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
static const char * STD_PARALLEL_1_KW
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)
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
static const char * STD_PARALLEL_2_KW
virtual std::ostream & print(std::ostream &out) const
Prints data members to stream.
std::basic_ostream< char > ostream
Base class for char output streams.
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.