GLIMSView Source Code Documentation

GlacierIDDef Class Reference

#include <glacieriddef.h>

Inheritance diagram for GlacierIDDef:

Inheritance graph
[legend]

List of all members.


Detailed Description

This holds data that represents a glacier id in accordance with the GLIMS specifications.

XML io routines are provided for easy serialization. A routine for producing a string representation in accordance with the GLIMS specification is provided.

History:
2007-06-14 dls - Confirmed all the information required by the GLIMS database is being captured and stored. Wrote validation function to confirm metadata is provided by user.
What's New:
2007-06-14 Validation function checks for required metadata, and reports to ValidationReport. Provides warning for non-required invalid/missing items, and errors for required items.
History:
2007-06-21 dls Removed RecordStatus

Definition at line 34 of file glacieriddef.h.


Public Member Functions

 GlacierIDDef ()
 Constructor.
 GlacierIDDef (const QString &new_glimsID)
 Constructor.
 ~GlacierIDDef ()
virtual bool fromXML (QDomElement &elem)
virtual bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
virtual void updateVersion (QDate *projectVersion)
std::string toString ()
bool validate (ValidationReport *valRep)
 Check that this glacier ID has required metadata.
virtual bool toXMLFile (std::string fname, std::string docname)
virtual bool fromXMLFile (std::string fname, std::string docname)
virtual void setCurrentVersion (std::string versionString)
virtual void setCurrentVersion (QDate versionQDate)
virtual QDate getCurrentVersion ()
virtual std::string getCurrentVersionStr ()

Public Attributes

double mLat
 LATITUDE OF GLACIER ID.
double mLon
 LONGITUDE OF GLACIER ID.
Node mImgCoord
 COORDINATE WITHIN IMAGE.
std::string mName
 NAME OF GLACIER.
std::string mWGMSID
 WGMS ID.
std::string mLocalID
 LOCAL(TO RC) ID.
std::string mParentID
 PARENT GID.
int mPrimCsfn
 PRIMARY CLASSIFICATION INDEX.
int mForm
 FORM INDEX.
int mFChar
 FRONTAL CHARACTERISTICS INDEX.
int mLChar
 LONGITUDINAL CHARACTERISTICS INDEX.
int mDomMassSrc
 DOMINANT MASS SOURCE INDEX.
int mTongueAct
 TOUNGE ACTIVITY INDEX.
float mWidth
 WIDTH.
float mLength
 LENGTH.
float mArea
 AREA.
float mAbzoneArea
 ABZONE AREA.
float mSpeed
 SPEED.
float mELA
 ELA (Equilibrium Line Altitude, i.e., altitude where net mass balance is zero, ablation equals accumulation).
std::string mELADesc
 ELA DESCRIPTION (ELA is Equilibrium Line Altitude, i.e., altitude where net mass balance is zero, ablation equals accumulation).
float mSnowLineElev
 SNOW LINE ELEVATION.

Protected Member Functions

virtual bool writeTextTag (QDomDocument &doc, QDomElement &elem, std::string tagName, std::string text, std::string id="")
virtual bool writeIntTag (QDomDocument &doc, QDomElement &elem, std::string tagName, int val, std::string id="")
virtual bool writeDoubleTag (QDomDocument &doc, QDomElement &elem, std::string tagName, double val, std::string id="")
virtual std::string readTextTag (QDomElement elem, std::string tagName="", std::string id="")
virtual int readIntTag (QDomElement elem, std::string tagName="", std::string id="")
virtual double readDoubleTag (QDomElement elem, std::string tagName="", std::string id="")
virtual QDomElement createBaseTag (QDomDocument &doc, QDomElement &elem, std::string id, std::string tagName)
virtual QDomElement getElemByTagName (QDomElement &elem, std::string name)
virtual std::string qDateToString (const QDate *aQDate)
virtual bool stringToQDate (const std::string aStrDate, QDate *aQDate)
virtual std::string qDateTimeToString (const QDateTime *aQDateTime)
virtual bool stringToQDateTime (const std::string aStrDateTime, QDateTime *aQDateTime)

Protected Attributes

QDate mCurrentVersion

Constructor & Destructor Documentation

GlacierIDDef::GlacierIDDef (  )  [inline]

Constructor.

History:
2007-06-14 dls - modified to set floats to -999 as recommended by Bruce Raup to make validation by GLIMSView and the ingestion procedure easier.

Definition at line 67 of file glacieriddef.h.

References mAbzoneArea, mArea, mDomMassSrc, mELA, mELADesc, mFChar, mForm, mLat, mLChar, mLength, mLocalID, mLon, mName, mParentID, mPrimCsfn, mSnowLineElev, mSpeed, mTongueAct, mWGMSID, and mWidth.

GlacierIDDef::GlacierIDDef ( const QString &  new_glimsID  )  [inline]

Constructor.

History:
2008-05-26 dls - added to create a "blank" glacier ID from a GLIMS ID string.

Definition at line 94 of file glacieriddef.h.

References mAbzoneArea, mArea, mDomMassSrc, mELA, mELADesc, mFChar, mForm, mLat, mLChar, mLength, mLocalID, mLon, mName, mParentID, mPrimCsfn, mSnowLineElev, mSpeed, mTongueAct, mWGMSID, and mWidth.

GlacierIDDef::~GlacierIDDef (  )  [inline]

Definition at line 138 of file glacieriddef.h.


Member Function Documentation

virtual bool GlacierIDDef::fromXML ( QDomElement &  elem  )  [inline, virtual]

virtual bool GlacierIDDef::toXML ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id = "" 
) [inline, virtual]

virtual void GlacierIDDef::updateVersion ( QDate *  projectVersion  )  [inline, virtual]

Definition at line 205 of file glacieriddef.h.

References mDomMassSrc, mFChar, mForm, mLChar, mPrimCsfn, and mTongueAct.

std::string GlacierIDDef::toString (  )  [inline]

< THE GID TO BE RETURNED

< STRING BUFFER

< 'N' OR 'S'

< HOLDS PRECEDING ZEROS FOR LON

< HOLDS PRECEDING ZEROS FOR LAT

< HOLDS FOLLOWING ZEROS FOR LON

< HOLDS FOLLOWING ZEROS FOR LAT

< LENGTH OF LAT PRECISION

< LENGTH OF LON PRECISION

Definition at line 222 of file glacieriddef.h.

References mLat, and mLon.

Referenced by GLIMSProject::exportGLIMSIngest(), GlacierIDChooserDlg::loadList(), GlacierConfigDlg::loadList(), and validate().

bool GlacierIDDef::validate ( ValidationReport valRep  )  [inline]

Check that this glacier ID has required metadata.

Returns:
bool true if glacier id is valid, and false if not
History:
2007-06-21 dls Removed RecordStatus check

Definition at line 300 of file glacieriddef.h.

References mAbzoneArea, mArea, mDomMassSrc, mELA, mELADesc, mFChar, mForm, mLat, mLChar, mLength, mLocalID, mLon, mName, mParentID, mPrimCsfn, mSnowLineElev, mSpeed, mTongueAct, mWGMSID, mWidth, ValidationReport::reportError(), ValidationReport::reportWarning(), ValidationReport::subsectionBegin(), ValidationReport::subsectionEnd(), and toString().

Referenced by GLIMSGIDData::validate().

Here is the call graph for this function:

bool XMLSerializeable::writeTextTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
std::string  text,
std::string  id = "" 
) [protected, virtual, inherited]

virtual bool XMLSerializeable::writeIntTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
int  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual bool XMLSerializeable::writeDoubleTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
double  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

std::string XMLSerializeable::readTextTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [protected, virtual, inherited]

virtual int XMLSerializeable::readIntTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual double XMLSerializeable::readDoubleTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual QDomElement XMLSerializeable::createBaseTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id,
std::string  tagName 
) [inline, protected, virtual, inherited]

QDomElement XMLSerializeable::getElemByTagName ( QDomElement &  elem,
std::string  name 
) [protected, virtual, inherited]

Definition at line 119 of file xmlserializeable.cpp.

Referenced by fromXML().

std::string XMLSerializeable::qDateToString ( const QDate *  aQDate  )  [protected, virtual, inherited]

bool XMLSerializeable::stringToQDate ( const std::string  aStrDate,
QDate *  aQDate 
) [protected, virtual, inherited]

std::string XMLSerializeable::qDateTimeToString ( const QDateTime *  aQDateTime  )  [protected, virtual, inherited]

Definition at line 149 of file xmlserializeable.cpp.

References XMLSerializeable::qDateToString().

Here is the call graph for this function:

bool XMLSerializeable::stringToQDateTime ( const std::string  aStrDateTime,
QDateTime *  aQDateTime 
) [protected, virtual, inherited]

Definition at line 205 of file xmlserializeable.cpp.

References XMLSerializeable::stringToQDate().

Here is the call graph for this function:

bool XMLSerializeable::toXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

bool XMLSerializeable::fromXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

void XMLSerializeable::setCurrentVersion ( std::string  versionString  )  [virtual, inherited]

Definition at line 249 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::stringToQDate().

Referenced by MainToolbar::setupProj().

Here is the call graph for this function:

void XMLSerializeable::setCurrentVersion ( QDate  versionQDate  )  [virtual, inherited]

Definition at line 254 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

QDate XMLSerializeable::getCurrentVersion (  )  [virtual, inherited]

Definition at line 258 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

std::string XMLSerializeable::getCurrentVersionStr (  )  [virtual, inherited]

Definition at line 262 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::qDateToString().

Here is the call graph for this function:


Member Data Documentation

COORDINATE WITHIN IMAGE.

Definition at line 38 of file glacieriddef.h.

std::string GlacierIDDef::mName

std::string GlacierIDDef::mWGMSID

ELA (Equilibrium Line Altitude, i.e., altitude where net mass balance is zero, ablation equals accumulation).

Definition at line 54 of file glacieriddef.h.

Referenced by GlacierIDDlg::addClicked(), GLIMSProject::exportGLIMSIngest(), fromXML(), GlacierIDDef(), GLIMSProject::importGIDsFromShapefile(), GLIMSProject::importGLIMSIngestData(), GlacierIDDlg::loadGID(), toXML(), and validate().

ELA DESCRIPTION (ELA is Equilibrium Line Altitude, i.e., altitude where net mass balance is zero, ablation equals accumulation).

Definition at line 56 of file glacieriddef.h.

Referenced by GlacierIDDlg::addClicked(), GLIMSProject::exportGLIMSIngest(), fromXML(), GlacierIDDef(), GLIMSProject::importGIDsFromShapefile(), GLIMSProject::importGLIMSIngestData(), GlacierIDDlg::loadGID(), toXML(), and validate().

QDate XMLSerializeable::mCurrentVersion [protected, inherited]


The documentation for this class was generated from the following file:

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov