bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
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 (std::ostream &strm) const =0
 dump the contents of this object to the specified ostream
 
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.
 
virtual double * geo_transform ()
 Build the geotransform array needed by GDAL.
 
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 (FONgGrid *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.
 
virtual void transform_to_jpeg2000 ()
 Transforms the variables of the DataDDS to a JPEG2000 file.
 
FONgGridvar (int i)
 
virtual int width ()
 
virtual ~FONgTransform ()
 Destructor.
 

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

◆ no_data_type_t

enum FONgTransform::no_data_type_t

Definition at line 44 of file FONgTransform.h.

Constructor & Destructor Documentation

◆ FONgTransform()

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 64 of file FONgTransform.cc.

◆ ~FONgTransform()

FONgTransform::~FONgTransform ( )
virtual

Destructor.

Cleans up any temporary data created during the transformation

Definition at line 78 of file FONgTransform.cc.

Member Function Documentation

◆ bottom()

virtual double FONgTransform::bottom ( )
inlinevirtual

Definition at line 117 of file FONgTransform.h.

◆ dump() [1/2]

virtual void BESObj::dump ( std::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 OPeNDAPObj 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 bes::CatalogItem, bes::CatalogNode, bes::NullResponseHandler, bes::SetContextsResponseHandler, bes::ShowNodeCommand, bes::ShowNodeResponseHandler, bes::XMLSetContextsCommand, BESAbstractModule, BESApp, BESAsciiModule, BESAsciiRequestHandler, BESCatalog, BESCatalogDirectory, BESCatalogEntry, BESCatalogList, BESCatalogResponseHandler, BESCatalogUtils, BESConfigResponseHandler, BESContainer, BESContainerStorage, BESContainerStorageFile, BESContainerStorageList, BESContainerStorageVolatile, BESContextManager, BESDap4ResponseHandler, BESDapModule, BESDapRequestHandler, BESDapResponse, BESDASResponse, BESDASResponseHandler, BESDataDDSResponse, BESDataDDXResponseHandler, BESDataHandlerInterface, BESDataResponseHandler, BESDDSResponse, BESDDSResponseHandler, BESDDXResponseHandler, BESDefine, BESDefineResponseHandler, BESDefinitionStorage, BESDefinitionStorageList, BESDefinitionStorageVolatile, BESDelContainerResponseHandler, BESDelContainersResponseHandler, BESDelDefResponseHandler, BESDelDefsResponseHandler, BESDMRResponse, BESDMRResponseHandler, BESError, BESFileContainer, BESFileContainerStorage, BESFileLockingCache, BESForbiddenError, BESHelpResponseHandler, BESHTMLInfo, BESInfo, BESInfoList, BESInterface, BESInternalError, BESInternalFatalError, BESLog, BESModuleApp, BESNotFoundError, BESPlugin< M >, BESPlugin< BESAbstractModule >, BESPlugin< C >, BESPluginFactory< C >, BESPluginFactory< BESAbstractModule >, BESProcIdResponseHandler, BESReporter, BESReporterList, BESRequestHandler, BESRequestHandlerList, BESResponseHandler, BESResponseHandlerList, BESResponseObject, BESReturnManager, BESServerHandler, BESServiceRegistry, BESServicesResponseHandler, BESSetContainerResponseHandler, BESSetContextResponseHandler, BESShowContainersResponseHandler, BESShowContextResponseHandler, BESShowDefsResponseHandler, BESShowErrorResponseHandler, BESStatusResponseHandler, BESStopWatch, BESStreamResponseHandler, BESSyntaxUserError, BESTextInfo, BESTimeoutError, BESTokenizer, BESTransmitter, BESUncompressManager3, BESUsage, BESUsageModule, BESUsageRequestHandler, BESVersionInfo, BESVersionResponseHandler, BESWWW, BESWWWModule, BESWWWRequestHandler, BESXDModule, BESXDRequestHandler, BESXMLCatalogCommand, BESXMLCommand, BESXMLDapCommandModule, BESXMLDefineCommand, BESXMLDeleteContainerCommand, BESXMLDeleteContainersCommand, BESXMLDeleteDefinitionCommand, BESXMLDeleteDefinitionsCommand, BESXMLGetCommand, BESXMLInfo, BESXMLInterface, BESXMLSetContainerCommand, BESXMLSetContextCommand, BESXMLShowCommand, BESXMLShowErrorCommand, BESXMLWWWGetCommand, builddmrpp::BuildDmrppModule, builddmrpp::BuildDmrppRequestHandler, builddmrpp::NgapBuildDmrppContainer, builddmrpp::NgapBuildDmrppContainerStorage, CatalogItem, CmdApp, CmdClient, cmr::CmrCatalog, cmr::CmrContainer, cmr::CmrContainerStorage, cmr::CmrInternalError, cmr::CmrNotFoundError, CmrModule, Connection, CSV_Field, CSV_Header, CSV_Obj, CSV_Reader, CSVModule, CSVRequestHandler, DaemonCommandHandler, DapFunctionsRequestHandler, DapModule, DapRequestHandler, dmrpp::DmrppModule, dmrpp::DmrppRequestHandler, EffectiveUrlCache, FFModule, FitsModule, FitsRequestHandler, FoCovJsonModule, FoCovJsonRequestHandler, FoDapCovJsonTransform, FoDapJsonTransform, FoInstanceJsonTransform, FoJsonModule, FoJsonRequestHandler, FONcArray, FONcArrayStructureField, FONcBaseType, FONcDim, FONcMap, FONcModule, FONcRequestHandler, FONgType, functions::DapFunctions, gateway::GatewayContainer, gateway::GatewayContainerStorage, gateway::GatewayModule, gateway::GatewayRequestHandler, GatewayPathInfoCommand, GatewayPathInfoResponseHandler, GDALModule, HDF4Module, HDF5Module, http::EffectiveUrlCache, http::HttpError, httpd_catalog::HttpdCatalog, httpd_catalog::HttpdCatalogContainer, httpd_catalog::HttpdCatalogContainerStorage, httpd_catalog::HttpdCatalogError, httpd_catalog::HttpdCatalogModule, ncml_module::NCMLModule, ncml_module::NCMLRequestHandler, NCModule, ngap::NgapModule, ngap::NgapOwnedContainer, ngap::NgapOwnedContainerStorage, ngap::NgapRequestHandler, PPTClient, PPTConnection, PPTServer, s3::S3Container, s3::S3ContainerStorage, s3::S3Module, s3::S3RequestHandler, SampleModule, SampleRequestHandler, SampleSayResponseHandler, SampleSayXMLCommand, SayReporter, ServerApp, ServerHandler, ShowBesKeyCommand, ShowBesKeyResponseHandler, ShowPathInfoCommand, ShowPathInfoResponseHandler, SiteMapCommand, SiteMapResponseHandler, Socket, SocketListener, StandAloneApp, StandAloneClient, TcpSocket, TheBESKeys, UgridFunctions, UnixSocket, W10nJsonRequestHandler, W10nJsonTransform, W10NModule, W10nShowPathInfoCommand, and W10nShowPathInfoResponseHandler.

◆ dump() [2/2]

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

Definition at line 122 of file FONgTransform.h.

◆ geo_transform()

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 199 of file FONgTransform.cc.

◆ geo_transform_set()

void FONgTransform::geo_transform_set ( bool state)
inline

Definition at line 83 of file FONgTransform.h.

◆ height()

virtual int FONgTransform::height ( )
inlinevirtual

Definition at line 104 of file FONgTransform.h.

◆ is_geo_transform_set()

bool FONgTransform::is_geo_transform_set ( )
inline

Definition at line 82 of file FONgTransform.h.

◆ left()

virtual double FONgTransform::left ( )
inlinevirtual

Definition at line 111 of file FONgTransform.h.

◆ no_data()

double FONgTransform::no_data ( )
inline

Definition at line 85 of file FONgTransform.h.

◆ no_data_type()

no_data_type_t FONgTransform::no_data_type ( )
inline

Definition at line 89 of file FONgTransform.h.

◆ num_bands()

int FONgTransform::num_bands ( )
inline

Definition at line 91 of file FONgTransform.h.

◆ num_var()

int FONgTransform::num_var ( )
inline

Definition at line 95 of file FONgTransform.h.

◆ push_var()

void FONgTransform::push_var ( FONgGrid * v)
inline

Definition at line 94 of file FONgTransform.h.

◆ right()

virtual double FONgTransform::right ( )
inlinevirtual

Definition at line 118 of file FONgTransform.h.

◆ set_bottom()

virtual void FONgTransform::set_bottom ( int top)
inlinevirtual

Definition at line 114 of file FONgTransform.h.

◆ set_height()

virtual void FONgTransform::set_height ( int height)
inlinevirtual

Definition at line 101 of file FONgTransform.h.

◆ set_left()

virtual void FONgTransform::set_left ( int left)
inlinevirtual

Definition at line 108 of file FONgTransform.h.

◆ set_no_data()

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

Definition at line 86 of file FONgTransform.h.

◆ set_no_data_type()

void FONgTransform::set_no_data_type ( no_data_type_t t)
inline

Definition at line 88 of file FONgTransform.h.

◆ set_num_bands()

void FONgTransform::set_num_bands ( int n)
inline

Definition at line 92 of file FONgTransform.h.

◆ set_right()

virtual void FONgTransform::set_right ( int left)
inlinevirtual

Definition at line 115 of file FONgTransform.h.

◆ set_top()

virtual void FONgTransform::set_top ( int top)
inlinevirtual

Definition at line 107 of file FONgTransform.h.

◆ set_width()

virtual void FONgTransform::set_width ( int width)
inlinevirtual

Definition at line 100 of file FONgTransform.h.

◆ top()

virtual double FONgTransform::top ( )
inlinevirtual

Definition at line 110 of file FONgTransform.h.

◆ transform_to_geotiff()

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 318 of file FONgTransform.cc.

◆ transform_to_jpeg2000()

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 490 of file FONgTransform.cc.

◆ var()

FONgGrid * FONgTransform::var ( int i)
inline

Definition at line 97 of file FONgTransform.h.

◆ width()

virtual int FONgTransform::width ( )
inlinevirtual

Definition at line 103 of file FONgTransform.h.


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