OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
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 (ostream &) const
 
virtual void dump (ostream &strm) const =0
 dump the contents of this object to the specified ostream More...
 
virtual void extract_coordinates (FONgTransform &t)
 Extract the size (pixels), element data type and top-left and bottom-right lat/lon corner points for the Grid. More...
 
bool find_lat_lon_maps ()
 A private method called by the constructor that searches for latitude and longitude map vectors. More...
 
 FONgGrid (libdap::Grid *g)
 Constructor for FONgGrid that takes a DAP Grid. More...
 
virtual double * get_data ()
 Get the data values for the band(s). Call must delete. More...
 
string get_projection (libdap::DDS *dds)
 Set the projection information For Grids, look for CF information. More...
 
libdap::Grid * grid ()
 
virtual string name ()
 
virtual void set_name (const string &n)
 
virtual void set_type (libdap::Type t)
 
virtual libdap::Type type ()
 
virtual ~FONgGrid ()
 Destructor that cleans up the grid. More...
 

Protected Attributes

string d_name
 
libdap::Type d_type
 

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 50 of file FONgGrid.h.

Constructor & Destructor Documentation

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 50 of file FONgGrid.cc.

References FONgBaseType::d_type.

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.

Member Function Documentation

virtual void FONgBaseType::dump ( ostream &  ) const
inlinevirtualinherited

Definition at line 62 of file FONgBaseType.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<<().

void FONgGrid::extract_coordinates ( FONgTransform t)
virtual

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.

Implements FONgBaseType.

Definition at line 212 of file FONgGrid.cc.

References BESDEBUG, find_lat_lon_maps(), FONgTransform::geo_transform_set(), FONgTransform::height(), FONgTransform::negative, FONgTransform::no_data(), FONgTransform::num_bands(), FONgTransform::positive, FONgTransform::push_var(), FONgTransform::set_bottom(), FONgTransform::set_height(), FONgTransform::set_left(), FONgTransform::set_no_data(), FONgTransform::set_no_data_type(), FONgTransform::set_num_bands(), FONgTransform::set_right(), FONgTransform::set_top(), FONgTransform::set_width(), and FONgTransform::width().

Here is the call graph for this function:

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 149 of file FONgGrid.cc.

Referenced by extract_coordinates().

double * FONgGrid::get_data ( )
virtual

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

Implements FONgBaseType.

Definition at line 350 of file FONgGrid.cc.

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

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.

Implements FONgBaseType.

Definition at line 307 of file FONgGrid.cc.

References GeoTiffTransmitter::default_gcs, and NULL.

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

Definition at line 69 of file FONgGrid.h.

virtual string FONgBaseType::name ( )
inlinevirtualinherited

Definition at line 48 of file FONgBaseType.h.

References FONgBaseType::d_name.

virtual void FONgBaseType::set_name ( const string &  n)
inlinevirtualinherited

Definition at line 49 of file FONgBaseType.h.

virtual void FONgBaseType::set_type ( libdap::Type  t)
inlinevirtualinherited

Definition at line 52 of file FONgBaseType.h.

virtual libdap::Type FONgBaseType::type ( )
inlinevirtualinherited

Definition at line 51 of file FONgBaseType.h.

References FONgBaseType::d_type.

Member Data Documentation

string FONgBaseType::d_name
protectedinherited

Definition at line 40 of file FONgBaseType.h.

Referenced by FONgBaseType::name().

libdap::Type FONgBaseType::d_type
protectedinherited

Definition at line 41 of file FONgBaseType.h.

Referenced by FONgGrid(), and FONgBaseType::type().


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