bes  Updated for version 3.20.6
FONgTransform Class Referenceabstract

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

#include <FONgTransform.h>

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 &) const
 
virtual void dump (std::ostream &strm) const =0
 dump the contents of this object to the specified ostream More...
 
 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 (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. More...
 
virtual void transform_to_jpeg2000 ()
 Transforms the variables of the DataDDS to a JPEG2000 file. More...
 
FONgGridvar (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.

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

◆ ~FONgTransform()

FONgTransform::~FONgTransform ( )
virtual

Destructor.

Cleans up any temporary data created during the transformation

Definition at line 79 of file FONgTransform.cc.

Member Function Documentation

◆ dump()

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

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

◆ 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 319 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 487 of file FONgTransform.cc.


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