OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
FONgTransform Class Referenceabstract

Transformation object that converts an OPeNDAP DataDDS to a GeoTiff file. More...

#include <FONgTransform.h>

Inheritance diagram for FONgTransform:
Inheritance graph
Collaboration diagram for FONgTransform:
Collaboration graph

Public Types

enum  no_data_type_t { none, negative, positive }
 

Public Member Functions

virtual double bottom ()
 
virtual void dump (ostream &strm) const =0
 dump the contents of this object to the specified ostream More...
 
virtual void dump (ostream &) const
 
 FONgTransform (libdap::DDS *dds, libdap::ConstraintEvaluator &evaluator, const string &localfile)
 Constructor that creates transformation object from the specified DataDDS object to the specified file. More...
 
virtual double * geo_transform ()
 Build the geotransform array needed by GDAL. More...
 
void geo_transform_set (bool state)
 
virtual int height ()
 
bool is_geo_transform_set ()
 
virtual double left ()
 
double no_data ()
 
no_data_type_t no_data_type ()
 
int num_bands ()
 
int num_var ()
 
void push_var (FONgBaseType *v)
 
virtual double right ()
 
virtual void set_bottom (int top)
 
virtual void set_height (int height)
 
virtual void set_left (int left)
 
void set_no_data (const string &nd)
 
void set_no_data_type (no_data_type_t t)
 
void set_num_bands (int n)
 
virtual void set_right (int left)
 
virtual void set_top (int top)
 
virtual void set_width (int width)
 
virtual double top ()
 
virtual void transform_to_geotiff ()
 Transforms the variables of the DataDDS to a GeoTiff file. More...
 
virtual void transform_to_jpeg2000 ()
 Transforms the variables of the DataDDS to a JPEG2000 file. More...
 
FONgBaseTypevar (int i)
 
virtual int width ()
 
virtual ~FONgTransform ()
 Destructor. More...
 

Detailed Description

Transformation object that converts an OPeNDAP DataDDS to a GeoTiff file.

This class transforms variables in a DataDDS object to a GeoTiff file. For more information on the transformation please refer to the OpeNDAP documents wiki.

Definition at line 41 of file FONgTransform.h.

Member Enumeration Documentation

Enumerator
none 
negative 
positive 

Definition at line 44 of file FONgTransform.h.

Constructor & Destructor Documentation

FONgTransform::FONgTransform ( libdap::DDS *  dds,
libdap::ConstraintEvaluator &  evaluator,
const string &  localfile 
)

Constructor that creates transformation object from the specified DataDDS object to the specified file.

Parameters
ddsDataDDS object that contains the data structure, attributes and data
dhiThe data interface containing information about the current request
localfileGeoTiff to create and write the information to
Exceptions
BESInternalError

Definition at line 62 of file FONgTransform.cc.

FONgTransform::~FONgTransform ( )
virtual

Destructor.

Cleans up any temporary data created during the transformation

Definition at line 74 of file FONgTransform.cc.

Member Function Documentation

virtual double FONgTransform::bottom ( )
inlinevirtual

Definition at line 121 of file FONgTransform.h.

virtual void BESObj::dump ( ostream &  strm) const
pure virtualinherited

dump the contents of this object to the specified ostream

This method is implemented by all derived classes to dump their contents, in other words, any state they might have, private variables, etc...

The inline function below can be used to dump the contents of an OPeNDAOObj object. For example, the object Animal is derived from BESObj. A user could do the following:

Animal *a = new dog( "Sparky" ) ; cout << a << endl ;

And the dump method for dog could display the name passed into the constructor, the (this) pointer of the object, etc...

Parameters
strmC++ i/o stream to dump the object to

Implemented in BESContainer, BESPlugin< M >, BESLog, BESInterface, BESContainerStorage, BESDataHandlerInterface, BESResponseHandler, BESPluginFactory< C >, BESError, BESCatalogEntry, BESFileLockingCache, BESDefinitionStorage, BESInfo, BESKeys, BESApp, BESVersionInfo, W10nJsonTransform, CmdClient, BESCatalogList, BESCatalogUtils, Connection, FoDapJsonTransform, BESServiceRegistry, libdap::ReProjectionFunctions, BESExceptionManager, StandAloneClient, Socket, BESDapResponse, BESContainerStorageList, BESContainerStorageFile, BESRequestHandler, FONcArray, BESTokenizer, BESDefinitionStorageList, PPTConnection, BESXMLCommand, BESFileContainer, BESXMLInfo, FoInstanceJsonTransform, BESContainerStorageCatalog, BESDefineResponseHandler, BESBasicInterface, BESDefinitionStorageVolatile, BESWWW, FONcTransform, BESCatalog, DaemonCommandHandler, BESDapErrorInfo, TcpSocket, BESRequestHandlerList, BESResponseHandlerList, BESContainerStorageVolatile, UnixSocket, BESAggFactory, BESDefine, GatewayContainer, BESCache3, BESTextInfo, BESDapError, BESHTMLInfo, BESUsage, BESSilentInfo, BESUncompressManager3, NCMLContainer, BESModuleApp, BESXMLInterface, BESAggregationServer, BESTransmitter, CSV_Obj, FONcGrid, ncml_module::NCMLCacheAggResponseHandler, BESXMLDefineCommand, BESContextManager, FONcBaseType, BESReturnManager, BESStopWatch, FONcMap, PPTServer, BESReporterList, BESInfoList, BESSetContainerResponseHandler, FONcDim, NCMLContainerStorage, CmdApp, BESDapNullAggregationServer, CSV_Field, CSV_Header, BESBaseApp, CSV_Reader, BESDDXResponseHandler, BESDelDefResponseHandler, BESDelDefsResponseHandler, BESMemoryGlobalArea, BESSetContextResponseHandler, FONcStr, FONcStructure, BESDataDDXResponseHandler, BESCatalogResponseHandler, BESDelContainersResponseHandler, BESHelpResponseHandler, BESShowContainersResponseHandler, FONcByte, BESXMLGetCommand, DapRequestHandler, BESCatalogDirectory, BESDelContainerResponseHandler, BESShowContextResponseHandler, FONcDouble, FONcFloat, FONcInt, FONcSequence, FONcShort, GatewayContainerStorage, PPTClient, StandAloneApp, BESDASResponseHandler, BESDataResponseHandler, BESShowErrorResponseHandler, BESVersionResponseHandler, FONcModule, BESDDSResponseHandler, BESConfigResponseHandler, BESShowDefsResponseHandler, BESStatusResponseHandler, FoJsonModule, ServerApp, BESProcessEncodedString, BESDataDDSResponse, BESDDSResponse, BESDMRResponseHandler, BESProcIdResponseHandler, BESServicesResponseHandler, BESDASResponse, BESResponseObject, ncml_module::NCMLRequestHandler, ShowPathInfoResponseHandler, ncml_module::NCMLCacheAggXMLCommand, BESServerHandler, BESInternalError, FONgModule, SocketListener, BESInternalFatalError, BESSyntaxUserError, BESForbiddenError, BESNotFoundError, FONcRequestHandler, BESXMLGetDataDDXCommand, CSVModule, BESDMRResponse, BESBasicHttpTransmitter, BESBasicTransmitter, BESAbstractModule, FitsModule, ServerHandler, BESXMLCatalogCommand, BESXMLDeleteContainerCommand, BESXMLDeleteContainersCommand, BESXMLDeleteDefinitionCommand, BESXMLDeleteDefinitionsCommand, BESXMLSetContainerCommand, BESXMLSetContextCommand, BESXMLShowCommand, BESXMLShowErrorCommand, BESReporter, BESStreamResponseHandler, BESAsciiModule, FFModule, HDF5Module, BESXMLWWWGetCommand, FoJsonRequestHandler, W10nJsonRequestHandler, BESDap4ResponseHandler, BESDapModule, BESDapRequestHandler, CSVRequestHandler, BESAsciiRequestHandler, BESUsageModule, BESUsageRequestHandler, BESWWWModule, BESWWWRequestHandler, HDF4Module, ncml_module::NCMLModule, BESXMLDapCommandModule, NCModule, UgridFunctions, DapFunctions, FONgRequestHandler, FitsRequestHandler, W10NModule, BESXDModule, BESXDRequestHandler, GDALModule, DapModule, GatewayModule, ShowPathInfoCommand, and GatewayRequestHandler.

Referenced by operator<<().

virtual void FONgTransform::dump ( ostream &  ) const
inlinevirtual

Definition at line 126 of file FONgTransform.h.

double * FONgTransform::geo_transform ( )
virtual

Build the geotransform array needed by GDAL.

This code uses values gleaned by FONgBaseType:extract_coordinates() to build up the six value array of transform parameters that GDAL needs to set the geographic transform.

Note
This method returns a pointer to a class field; don't delete it.
Returns
A pointer to the six element array of parameters (doubles)

Definition at line 192 of file FONgTransform.cc.

References BESDEBUG.

Referenced by transform_to_geotiff(), and transform_to_jpeg2000().

void FONgTransform::geo_transform_set ( bool  state)
inline

Definition at line 87 of file FONgTransform.h.

Referenced by FONgGrid::extract_coordinates().

virtual int FONgTransform::height ( )
inlinevirtual
bool FONgTransform::is_geo_transform_set ( )
inline

Definition at line 86 of file FONgTransform.h.

virtual double FONgTransform::left ( )
inlinevirtual

Definition at line 115 of file FONgTransform.h.

Referenced by set_left(), and set_right().

double FONgTransform::no_data ( )
inline

Definition at line 89 of file FONgTransform.h.

Referenced by FONgGrid::extract_coordinates().

no_data_type_t FONgTransform::no_data_type ( )
inline

Definition at line 93 of file FONgTransform.h.

Referenced by transform_to_geotiff(), and transform_to_jpeg2000().

int FONgTransform::num_bands ( )
inline
int FONgTransform::num_var ( )
inline

Definition at line 99 of file FONgTransform.h.

void FONgTransform::push_var ( FONgBaseType v)
inline

Definition at line 98 of file FONgTransform.h.

Referenced by FONgGrid::extract_coordinates().

virtual double FONgTransform::right ( )
inlinevirtual

Definition at line 122 of file FONgTransform.h.

virtual void FONgTransform::set_bottom ( int  top)
inlinevirtual

Definition at line 118 of file FONgTransform.h.

References top().

Referenced by FONgGrid::extract_coordinates().

Here is the call graph for this function:

virtual void FONgTransform::set_height ( int  height)
inlinevirtual

Definition at line 105 of file FONgTransform.h.

References height().

Referenced by FONgGrid::extract_coordinates().

Here is the call graph for this function:

virtual void FONgTransform::set_left ( int  left)
inlinevirtual

Definition at line 112 of file FONgTransform.h.

References left().

Referenced by FONgGrid::extract_coordinates().

Here is the call graph for this function:

void FONgTransform::set_no_data ( const string &  nd)
inline

Definition at line 90 of file FONgTransform.h.

References NULL.

Referenced by FONgGrid::extract_coordinates().

void FONgTransform::set_no_data_type ( no_data_type_t  t)
inline

Definition at line 92 of file FONgTransform.h.

Referenced by FONgGrid::extract_coordinates().

void FONgTransform::set_num_bands ( int  n)
inline

Definition at line 96 of file FONgTransform.h.

Referenced by FONgGrid::extract_coordinates().

virtual void FONgTransform::set_right ( int  left)
inlinevirtual

Definition at line 119 of file FONgTransform.h.

References left().

Referenced by FONgGrid::extract_coordinates().

Here is the call graph for this function:

virtual void FONgTransform::set_top ( int  top)
inlinevirtual

Definition at line 111 of file FONgTransform.h.

References top().

Referenced by FONgGrid::extract_coordinates().

Here is the call graph for this function:

virtual void FONgTransform::set_width ( int  width)
inlinevirtual

Definition at line 104 of file FONgTransform.h.

References width().

Referenced by FONgGrid::extract_coordinates().

Here is the call graph for this function:

virtual double FONgTransform::top ( )
inlinevirtual

Definition at line 114 of file FONgTransform.h.

Referenced by set_bottom(), and set_top().

void FONgTransform::transform_to_geotiff ( )
virtual

Transforms the variables of the DataDDS to a GeoTiff file.

Scan the DDS of the dataset and find the Grids that have been projected. Try to render their content as a GeoTiff. The result is a N-band GeoTiff file.

Definition at line 311 of file FONgTransform.cc.

References BESDEBUG, FALSE, geo_transform(), FONgBaseType::get_data(), FONgBaseType::get_projection(), height(), no_data_type(), none, NULL, num_bands(), var(), and width().

Referenced by GeoTiffTransmitter::send_data_as_geotiff().

Here is the call graph for this function:

void FONgTransform::transform_to_jpeg2000 ( )
virtual

Transforms the variables of the DataDDS to a JPEG2000 file.

Scan the DDS of the dataset and find the Grids that have been projected. Try to render their content as a JPEG2000. The result is a N-band JPEG2000 file.

Note
This method is a copy of the transform_to_geotiff() method and most of the code here could be factored out. However, the real utility of this method will be in its ability to write GML for a GMLJP2 response... 12/14/12
Since the available GMLJP2 drivers for GDAL only support making files using the CreateCopy() mathod, we make a MEM dataset, load it with data and then use that to make GMLJP2 file.

Definition at line 417 of file FONgTransform.cc.

References BESDEBUG, FALSE, geo_transform(), FONgBaseType::get_data(), FONgBaseType::get_projection(), height(), no_data_type(), none, NULL, num_bands(), var(), and width().

Referenced by JPEG2000Transmitter::send_data_as_jp2().

Here is the call graph for this function:

FONgBaseType* FONgTransform::var ( int  i)
inline

Definition at line 101 of file FONgTransform.h.

Referenced by transform_to_geotiff(), and transform_to_jpeg2000().

virtual int FONgTransform::width ( )
inlinevirtual

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