27 #include "../../../geometry/Envelope.h" 
   28 #include "../../../geometry/serialization/xml/Serializer.h" 
   29 #include "../../../xml/Reader.h" 
   30 #include "../../../xml/Writer.h" 
   31 #include "../../Band.h" 
   32 #include "../../BandProperty.h" 
   33 #include "../../Grid.h" 
   34 #include "../../Raster.h" 
   43 #include <boost/lexical_cast.hpp> 
   55     std::string k = reader.
getAttr(0);
 
   56     std::string v = reader.
getAttr(1);
 
   74   std::map<std::string, std::string>::const_iterator it = rinfo.begin();
 
   75   std::map<std::string, std::string>::const_iterator itend = rinfo.end();
 
   92   std::fstream ostr(fileName.c_str(), std::ios_base::out);
 
  112   writer.
writeAttribute(
"xmlns:xlink", 
"http://www.w3.org/1999/xlink");
 
  113   writer.
writeAttribute(
"xmlns:xsd", 
"http://www.w3.org/2001/XMLSchema-instance");
 
  114   writer.
writeAttribute(
"xmlns", 
"http://www.terralib.org/schemas/raster");
 
  115   writer.
writeAttribute(
"xsd:schemaLocation", 
"http://www.terralib.org/schemas/raster C:/Users/gribeiro/Documents/terralib5/trunk/myschemas/terralib/raster/raster.xsd");
 
  130   std::map<std::string, std::string> rinfo = raster->
getInfo();
 
  142   double* geo = 
new double[6];
 
  169   std::auto_ptr<te::gm::Envelope> e(
ReadExtent(reader));
 
  245   std::vector<te::rst::BandProperty*> bands;
 
const std::string & getName() const 
Returns the raster name. 
 
virtual void writeStartDocument(const std::string &encoding, const std::string &standalone)
 
int m_blkh
Block height (pixels). 
 
TERASTEREXPORT te::rst::BandProperty * ReadBandProperty(te::xml::Reader &reader)
 
TEDATAACCESSEXPORT void Save(const std::string &fileName)
 
This class models a XML reader object. 
 
Grid * getGrid()
It returns the raster grid. 
 
virtual double getAttrAsDouble(const std::string &name) const 
It returns the attribute value in the case of an element node with valid attributes. 
 
virtual bool next()=0
It gets the next event to be read. 
 
Auxiliary classes and functions to read geometry information from a XML document. ...
 
int m_nblocksy
The number of blocks in y. 
 
virtual std::size_t getNumberOfBands() const =0
Returns the number of bands (dimension of cells attribute values) in the raster. 
 
void setGeoreference(const te::gm::Coord2D &ulLocation, int srid, double resX, double resY)
Sets the information needed to georeference the grid. 
 
unsigned int getNumberOfRows() const 
Returns the grid number of rows. 
 
TERASTEREXPORT te::rst::Grid * ReadGrid(te::xml::Reader &reader)
 
virtual void writeStartElement(const std::string &qName)
 
virtual void writeAttribute(const std::string &attName, const std::string &value)
 
int m_type
The data type of the elements in the band. 
 
A rectified grid is the spatial support for raster data. 
 
virtual void writeEndElement(const std::string &qName)
 
TEGEOMEXPORT std::auto_ptr< te::gm::Envelope > ReadExtent(te::xml::Reader &reader)
 
int m_blkw
Block width (pixels). 
 
te::gm::Envelope * getExtent()
Returns the geographic extension of the grid. 
 
virtual boost::int32_t getElementValueAsInt32() const 
It returns the element data value in the case of VALUE node. 
 
std::size_t m_idx
The band index. 
 
virtual void writeElement(const std::string &qName, const std::string &value)
 
A raster band description. 
 
double m_noDataValue
Value to indicate elements where there is no data, default is std::numeric_limits<double>::max(). 
 
TERASTEREXPORT double * ReadGeoTransform(te::xml::Reader &reader)
 
int m_nblocksx
The number of blocks in x. 
 
An abstract class for raster data strucutures. 
 
BandProperty * getProperty()
Returns the band property. 
 
virtual const Band * getBand(std::size_t i) const =0
Returns the raster i-th band. 
 
unsigned int getNumberOfColumns() const 
Returns the grid number of columns. 
 
int getSRID() const 
Returns the grid spatial reference system identifier. 
 
virtual NodeType getNodeType() const =0
It return the type of node read. 
 
TEGEOMEXPORT void SaveExtent(const te::gm::Envelope &e, te::xml::Writer &writer)
 
An Envelope defines a 2D rectangular region. 
 
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node. 
 
TERASTEREXPORT std::vector< te::rst::BandProperty * > ReadBandPropertyVector(te::xml::Reader &reader)
 
TERASTEREXPORT void ReadRasterInfo(std::map< std::string, std::string > &rinfo, te::xml::Reader &reader)
 
virtual boost::int32_t getAttrAsInt32(const std::string &name) const 
It returns the attribute value in the case of an element node with valid attributes. 
 
virtual std::map< std::string, std::string > getInfo() const =0
It returns additional information about the raster. 
 
const double * getGeoreference() const 
Returns a list of 6 coefficients describing an affine transformation to georeference a grid...
 
TERASTEREXPORT void SaveRasterInfo(std::map< std::string, std::string > &rinfo, te::xml::Writer &writer)
 
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes. 
 
This class models a XML writer object.