28 static const char* PARAMETER_KEYWORDS[] = {
"map_offset_x",
33 static const char* MAP_PROJ_FILE_KW =
"map_proj_filename";
44 theAdjParams(NUM_ADJ_PARAMS),
62 theAdjParams(NUM_ADJ_PARAMS),
63 theMapProjection(map_proj),
79 theAdjParams(NUM_ADJ_PARAMS),
80 theMapProjection(copy_this.theMapProjection),
94 theAdjParams(NUM_ADJ_PARAMS),
111 theAdjParams(NUM_ADJ_PARAMS),
199 const double& heightEllipsoid,
220 worldPoint.
height(heightEllipsoid);
271 if (map_prefix.
size() && (map_prefix[map_prefix.
size()-1] !=
'.'))
273 map_prefix +=
"map_proj.";
294 static const ossimString MODULE (
"ossimAdjMapModel::loadState() -- ");
296 const char* value_str;
298 ossimString error_msg (MODULE+
"Error encountered reading keyword: ");
304 if ((!value_str) || (strcmp(value_str,
TYPE_NAME(
this))))
310 if (map_prefix.
size() && (map_prefix[map_prefix.
size()-1] !=
'.'))
312 map_prefix +=
"map_proj.";
323 value_str = kwl.
find(prefix, MAP_PROJ_FILE_KW);
326 throw (error_msg + MAP_PROJ_FILE_KW);
332 throw "Error encountered instantiating map ";
343 value_str = kwl.
find(prefix, PARAMETER_KEYWORDS[i]);
346 throw (error_msg + PARAMETER_KEYWORDS[i]).chars();
348 value = atof(value_str);
380 "//*****************************************************************\n" 381 "// Template for Adjustable Map Model keywordlist\n" 382 "//*****************************************************************\n" 388 <<
"// Derived-class AdjMapModel Keywords:\n" 390 << PARAMETER_KEYWORDS[
OFFSET_X] <<
": <east offset meters>\n" 391 << PARAMETER_KEYWORDS[
OFFSET_Y] <<
": <north offset meters>\n" 392 << PARAMETER_KEYWORDS[
ROTATION] <<
": <degrees CW>\n" 393 << PARAMETER_KEYWORDS[
SCALE_X] <<
": <ratio>\n" 394 << PARAMETER_KEYWORDS[
SCALE_Y] <<
": <ratio>\n" 407 out << PARAMETER_KEYWORDS[i] <<
": " <<
theAdjParams[i] << endl;
virtual ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
takes a filename.
void setParameterDescription(ossim_uint32 idx, const ossimString &descrption)
double computeParameterOffset(ossim_uint32 idx) const
virtual void initAdjustableParameters()
Initializes adjustable parameters to their default values.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual ossimDpt getMetersPerPixel() const
Fetches the GSD from the internal map projection.
Represents serializable keyword/value map.
const char * find(const char *key) const
double nan()
Method to return ieee floating point double precision NAN.
virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint) const
static ossimMapProjectionFactory * instance()
ColumnVector theAdjParams
This is the vector of UNNORMALIZED, BIASED parameters as used in the model.
virtual std::ostream & print(std::ostream &out) const
Extends base-class implementation. Dumps contents of object to ostream.
void setAdjustmentDescription(const ossimString &description)
static const char * TYPE_KW
virtual void updateModel()
Following a change to the adjustable parameter set, this virtual is.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
std::string::size_type size() const
virtual ossimGpt origin() const
virtual ossimObject * dup() const
Returns pointer to a new instance, copy of this.
void newAdjustment(ossim_uint32 numberOfParameters=0)
const char * chars() const
For backward compatibility.
bool initializeFromMap()
Initializes base class data members after map model established.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual std::ostream & print(std::ostream &out) const
ossimErrorCode theErrorStatus
static void writeGeomTemplate(ostream &os)
virtual void lineSampleToWorld(const ossimDpt &image_point, ossimGpt &worldPoint) const
Overrides base class virtual.
virtual void setAdjustableParameter(ossim_uint32 idx, double value, bool notify=false)
virtual void worldToLineSample(const ossimGpt &world_point, ossimDpt &image_point) const
Rigorous inverse transform implented, overrides base-class' iterative.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Fulfills ossimObject base-class pure virtuals.
void removeAllAdjustments()
ossimRefPtr< ossimMapProjection > theMapProjection
static void writeGeomTemplate(ostream &os)
Writes a template of geom keywords processed by loadState and saveState.
virtual void lineSampleHeightToWorld(const ossimDpt &image_point, const double &heightEllipsoid, ossimGpt &worldPoint) const
Overrides base class pure virtual.
Special "sensor model" that provides a conventional map projection but with.
ossimAdjMapModel()
Constructs to uninitialized state (needed by factory).
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Fulfills ossimObject base-class pure virtuals.
virtual ossimDpt getMetersPerPixel() const
void setParameterCenter(ossim_uint32 idx, double center, bool notify=false)
virtual void lineSampleHeightToWorld(const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const
This is the pure virtual that projects the image point to the given elevation above ellipsoid...
virtual ~ossimAdjMapModel()
ground to image faster (you don't need DEM)
RTTI_DEF1(ossimAdjMapModel, "ossimAdjMapModel", ossimSensorModel)
std::basic_ostream< char > ostream
Base class for char output streams.