bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
JPEG2000Transmitter Class Reference

BESTransmitter class named "geotiff" that transmits an OPeNDAP data object as a geotiff file. More...

#include <JPEG2000Transmitter.h>

Inheritance diagram for JPEG2000Transmitter:
Inheritance graph
Collaboration diagram for JPEG2000Transmitter:
Collaboration graph

Public Member Functions

virtual bool add_method (std::string method_name, p_transmitter trans_method)
 
virtual void dump (std::ostream &strm) const
 dumps information about this object
 
virtual p_transmitter find_method (std::string method_name)
 
 JPEG2000Transmitter ()
 Construct the JPEG2000Transmitter, adding it with name geotiff to be able to transmit a data response.
 
virtual bool remove_method (std::string method_name)
 
virtual void send_html (BESInfo &info, BESDataHandlerInterface &dhi)
 
virtual void send_response (const std::string &method, BESResponseObject *obj, BESDataHandlerInterface &dhi)
 
virtual void send_text (BESInfo &info, BESDataHandlerInterface &dhi)
 

Static Public Member Functions

static void send_data_as_jp2 (BESResponseObject *obj, BESDataHandlerInterface &dhi)
 The static method registered to transmit OPeNDAP data objects as a netcdf file.
 

Static Public Attributes

static std::string default_gcs
 

Detailed Description

BESTransmitter class named "geotiff" that transmits an OPeNDAP data object as a geotiff file.

The JPEG2000Transmitter transforms an OPeNDAP DataDDS object into a geotiff file and streams the new (temporary) geotiff file back to the client.

See also
BESTransmitter

Definition at line 41 of file JPEG2000Transmitter.h.

Constructor & Destructor Documentation

◆ JPEG2000Transmitter()

JPEG2000Transmitter::JPEG2000Transmitter ( )

Construct the JPEG2000Transmitter, adding it with name geotiff to be able to transmit a data response.

The transmitter is created to add the ability to return OPeNDAP data objects (DataDDS) as a geotiff file.

The OPeNDAP data object is written to a geotiff file locally in a temporary directory specified by the BES configuration parameter JPEG2000.Tempdir. If this variable is not found or is not set then it defaults to the macro definition JPEG2000_TEMP_DIR.

Note
The mapping from a 'returnAs' of "geotiff" to this code is made in the JPEG2000Module class.
See also
JPEG2000Module

Definition at line 82 of file JPEG2000Transmitter.cc.

◆ ~JPEG2000Transmitter()

virtual JPEG2000Transmitter::~JPEG2000Transmitter ( )
inlinevirtual

Definition at line 49 of file JPEG2000Transmitter.h.

Member Function Documentation

◆ add_method()

bool BESTransmitter::add_method ( std::string method_name,
p_transmitter trans_method )
virtualinherited

Definition at line 56 of file BESTransmitter.cc.

◆ dump()

void BESTransmitter::dump ( std::ostream & strm) const
virtualinherited

dumps information about this object

Displays the pointer value of this instance along with the names of register transmit methods

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

Implements BESObj.

Definition at line 134 of file BESTransmitter.cc.

◆ find_method()

p_transmitter BESTransmitter::find_method ( std::string method_name)
virtualinherited

Definition at line 78 of file BESTransmitter.cc.

◆ remove_method()

bool BESTransmitter::remove_method ( std::string method_name)
virtualinherited

Definition at line 67 of file BESTransmitter.cc.

◆ send_data_as_jp2()

void JPEG2000Transmitter::send_data_as_jp2 ( BESResponseObject * obj,
BESDataHandlerInterface & dhi )
static

The static method registered to transmit OPeNDAP data objects as a netcdf file.

This function takes the OPeNDAP DataDDS object, reads in the data (can be used with any data handler), transforms the data into a netcdf file, and streams back that netcdf file back to the requester using the stream specified in the BESDataHandlerInterface.

Parameters
objThe BESResponseObject containing the OPeNDAP DataDDS object
dhiBESDataHandlerInterface containing information about the request and response
Exceptions
BESInternalErrorif the response is not an OPeNDAP DataDDS or if there are any problems reading the data, writing to a netcdf file, or streaming the netcdf file

Definition at line 127 of file JPEG2000Transmitter.cc.

◆ send_html()

void BESTransmitter::send_html ( BESInfo & info,
BESDataHandlerInterface & dhi )
virtualinherited

Definition at line 114 of file BESTransmitter.cc.

◆ send_response()

void BESTransmitter::send_response ( const std::string & method,
BESResponseObject * obj,
BESDataHandlerInterface & dhi )
virtualinherited

Definition at line 89 of file BESTransmitter.cc.

◆ send_text()

void BESTransmitter::send_text ( BESInfo & info,
BESDataHandlerInterface & dhi )
virtualinherited

Definition at line 101 of file BESTransmitter.cc.

Member Data Documentation

◆ default_gcs

string JPEG2000Transmitter::default_gcs
static

Definition at line 55 of file JPEG2000Transmitter.h.


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