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

A DAP Grid with file out netcdf information included. More...

#include <FONgGrid.h>

Inheritance diagram for FONgGrid:
Inheritance graph
Collaboration diagram for FONgGrid:
Collaboration graph

Public Member Functions

virtual void dump (std::ostream &strm) const =0
 dump the contents of this object to the specified ostream
 
virtual void extract_coordinates (FONgTransform &t)
 Get the GDAL/OGC WKT projection string.
 
bool find_lat_lon_maps ()
 
 FONgGrid (libdap::Grid *g)
 Constructor for FONgGrid that takes a DAP Grid.
 
virtual double * get_data ()
 Get the data values for the band(s). Call must delete.
 
string get_projection (libdap::DDS *dds)
 Set the projection information For Grids, look for CF information. If it's not present, use the default Geographic Coordinate system set in the bes/module conf file. if it is present, look at the attributes and dope out a Well Known Geographic coordinate string.
 
libdap::Grid * grid ()
 
virtual libdap::Type type ()
 
virtual ~FONgGrid ()
 Destructor that cleans up the grid.
 

Protected Member Functions

virtual void dump (ostream &) const
 
virtual string name ()
 
virtual void set_name (const string &n)
 
virtual void set_type (libdap::Type t)
 

Protected Attributes

string d_name
 
libdap::Type d_type
 

Friends

class FONgTransform
 

Detailed Description

A DAP Grid with file out netcdf information included.

This class represents a DAP Grid with additional information needed to write it out to a netcdf file. Includes a reference to the actual DAP Grid being converted, the maps of the grid stored as FOncMap instances, and the array of the grid stored as a FONgArray.

NetCDF does not have grid representation. For this reason, we flatten out the grid as different arrays (maps) as well as the grid's actual array.

It is possible to share maps among grids, so a global map list is kept as well.

Definition at line 52 of file FONgGrid.h.

Constructor & Destructor Documentation

◆ FONgGrid() [1/2]

FONgGrid::FONgGrid ( libdap::Grid * g)

Constructor for FONgGrid that takes a DAP Grid.

Parameters
gA DAP BaseType that should be a grid

Definition at line 49 of file FONgGrid.cc.

◆ ~FONgGrid()

FONgGrid::~FONgGrid ( )
virtual

Destructor that cleans up the grid.

The DAP Grid instance does not belong to the FONgGrid instance, so it is not deleted.

Definition at line 84 of file FONgGrid.cc.

◆ FONgGrid() [2/2]

FONgGrid::FONgGrid ( )
inline

Definition at line 83 of file FONgGrid.h.

Member Function Documentation

◆ 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 FONgGrid::dump ( ostream & ) const
inlineprotectedvirtual

Definition at line 103 of file FONgGrid.h.

◆ extract_coordinates()

void FONgGrid::extract_coordinates ( FONgTransform & t)
virtual

Get the GDAL/OGC WKT projection string.

Extract the size (pixels), element data type and top-left and bottom-right lat/lon corner points for the Grid. Also determine if this is a 2D or 3D Grid and, in the latter case, ensure that the first dimension is not lat or lon. In that case, the geotiff will have N bands, where N is the number of elements from the first dimension in the current selection.

Definition at line 203 of file FONgGrid.cc.

◆ find_lat_lon_maps()

bool FONgGrid::find_lat_lon_maps ( )

A private method called by the constructor that searches for latitude and longitude map vectors. This method returns false if either map cannot be found. It assumes that the d_grid and d_dds fields are set.

The d_longitude, d_lon, d_lon_length and d_lon_grid_dim (and matching lat) fields are modified.

Note
Rules used to find Maps:
  • Latitude: If the Map has a units attribute of "degrees_north", "degree_north", "degree_N", or "degrees_N"
  • Longitude: If the map has a units attribute of "degrees_east" (eastward positive), "degree_east", "degree_E", or "degrees_E"
Returns
True if the maps are found, otherwise False

Definition at line 144 of file FONgGrid.cc.

◆ get_data()

double * FONgGrid::get_data ( )
virtual

Get the data values for the band(s). Call must delete.

Definition at line 337 of file FONgGrid.cc.

◆ get_projection()

string FONgGrid::get_projection ( libdap::DDS * dds)

Set the projection information For Grids, look for CF information. If it's not present, use the default Geographic Coordinate system set in the bes/module conf file. if it is present, look at the attributes and dope out a Well Known Geographic coordinate string.

Definition at line 296 of file FONgGrid.cc.

◆ grid()

libdap::Grid * FONgGrid::grid ( )
inline

Definition at line 73 of file FONgGrid.h.

◆ name()

virtual string FONgGrid::name ( )
inlineprotectedvirtual

Definition at line 89 of file FONgGrid.h.

◆ set_name()

virtual void FONgGrid::set_name ( const string & n)
inlineprotectedvirtual

Definition at line 90 of file FONgGrid.h.

◆ set_type()

virtual void FONgGrid::set_type ( libdap::Type t)
inlineprotectedvirtual

Definition at line 93 of file FONgGrid.h.

◆ type()

virtual libdap::Type FONgGrid::type ( )
inlinevirtual

Definition at line 82 of file FONgGrid.h.

Friends And Related Symbol Documentation

◆ FONgTransform

friend class FONgTransform
friend

Definition at line 67 of file FONgGrid.h.

Member Data Documentation

◆ d_name

string FONgGrid::d_name
protected

Definition at line 86 of file FONgGrid.h.

◆ d_type

libdap::Type FONgGrid::d_type
protected

Definition at line 87 of file FONgGrid.h.


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