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

#include <GridGeoConstraint.h>

Inheritance diagram for functions::GridGeoConstraint:
Inheritance graph
Collaboration diagram for functions::GridGeoConstraint:
Collaboration graph

Public Types

enum  LatitudeSense { unknown_sense , normal , inverted }
 
enum  Notation { unknown_notation , pos , neg_pos }
 

Public Member Functions

Constructors
 GridGeoConstraint (libdap::Grid *grid)
 
 GridGeoConstraint (libdap::Grid *grid, libdap::Array *lat, libdap::Array *lon)
 
 GridGeoConstraint (libdap::Array *coverage)
 
 GridGeoConstraint (libdap::Array *coverage, libdap::Array *lat, libdap::Array *lon)
 
virtual void apply_constraint_to_data ()
 Once the bounding box is set use this method to apply the constraint.
 
virtual libdap::Grid * get_constrained_grid () const
 
Accessors/Mutators
char * get_array_data () const
 
int get_array_data_size () const
 
double * get_lat () const
 
double * get_lon () const
 
void set_lat (double *lat)
 
void set_lon (double *lon)
 
int get_lat_size () const
 
int get_lon_size () const
 
void set_lat_size (int len)
 
void set_lon_size (int len)
 
libdap::Array::Dim_iter get_lon_dim () const
 
libdap::Array::Dim_iter get_lat_dim () const
 
void set_lon_dim (libdap::Array::Dim_iter lon)
 
void set_lat_dim (libdap::Array::Dim_iter lat)
 
int get_latitude_index_top () const
 
int get_latitude_index_bottom () const
 
void set_latitude_index_top (int top)
 
void set_latitude_index_bottom (int bottom)
 
int get_longitude_index_left () const
 
int get_longitude_index_right () const
 
void set_longitude_index_left (int left)
 
void set_longitude_index_right (int right)
 
bool is_bounding_box_set () const
 
bool is_longitude_rightmost () const
 
void set_longitude_rightmost (bool state)
 
Notation get_longitude_notation () const
 
LatitudeSense get_latitude_sense () const
 
void set_longitude_notation (Notation n)
 
void set_latitude_sense (LatitudeSense l)
 
set< stringget_coards_lat_units () const
 
set< stringget_coards_lon_units () const
 
set< stringget_lat_names () const
 
set< stringget_lon_names () const
 
void set_bounding_box (double top, double left, double bottom, double right)
 

Protected Member Functions

virtual LatitudeSense categorize_latitude () const
 
Notation categorize_notation (const double left, const double right) const
 
void find_latitude_indeces (double top, double bottom, LatitudeSense sense, int &latitude_index_top, int &latitude_index_bottom) const
 
void find_longitude_indeces (double left, double right, int &longitude_index_left, int &longitude_index_right) const
 
virtual void flip_latitude_within_array (libdap::Array &a, int lat_length, int lon_length)
 
virtual bool is_bounding_box_valid (const double left, const double top, const double right, const double bottom) const
 
virtual void reorder_data_longitude_axis (libdap::Array &a, libdap::Array::Dim_iter lon_dim)
 
virtual void reorder_longitude_map (int longitude_index_left)
 
void transform_constraint_to_pos_notation (double &left, double &right) const
 
virtual void transform_longitude_to_neg_pos_notation ()
 
virtual void transform_longitude_to_pos_notation ()
 
virtual void transpose_vector (double *src, const int length)
 

Friends

class GridGeoConstraintTest
 

Detailed Description

Geographical constraint applied to a grid.

Author
James Gallagher

Definition at line 48 of file GridGeoConstraint.h.

Member Enumeration Documentation

◆ LatitudeSense

Most of the time, latitude starts at the top of an array with positive values and ends up at the bottom with negative ones. But sometimes... the world is upside down.

Definition at line 112 of file GeoConstraint.h.

◆ Notation

The longitude extents of the constraint bounding box can be expressed two ways: using a 0/359 notation and using a -180/179 notation. I call the 0/359 notation 'pos' and the -180/179 notation 'neg_pos'.

Definition at line 103 of file GeoConstraint.h.

Constructor & Destructor Documentation

◆ ~GridGeoConstraint()

virtual functions::GridGeoConstraint::~GridGeoConstraint ( )
inlinevirtual

Definition at line 76 of file GridGeoConstraint.h.

Member Function Documentation

◆ apply_constraint_to_data()

virtual void functions::GridGeoConstraint::apply_constraint_to_data ( )
virtual

Once the bounding box is set use this method to apply the constraint.

Implements functions::GeoConstraint.

◆ get_array_data()

char * functions::GeoConstraint::get_array_data ( ) const
inlineinherited

Definition at line 215 of file GeoConstraint.h.

◆ get_array_data_size()

int functions::GeoConstraint::get_array_data_size ( ) const
inlineinherited

Definition at line 219 of file GeoConstraint.h.

◆ get_coards_lat_units()

set< string > functions::GeoConstraint::get_coards_lat_units ( ) const
inlineinherited

Definition at line 340 of file GeoConstraint.h.

◆ get_coards_lon_units()

set< string > functions::GeoConstraint::get_coards_lon_units ( ) const
inlineinherited

Definition at line 344 of file GeoConstraint.h.

◆ get_constrained_grid()

virtual libdap::Grid * functions::GridGeoConstraint::get_constrained_grid ( ) const
inlinevirtual

Definition at line 81 of file GridGeoConstraint.h.

◆ get_lat()

double * functions::GeoConstraint::get_lat ( ) const
inlineinherited

Definition at line 224 of file GeoConstraint.h.

◆ get_lat_dim()

libdap::Array::Dim_iter functions::GeoConstraint::get_lat_dim ( ) const
inlineinherited

Definition at line 262 of file GeoConstraint.h.

◆ get_lat_names()

set< string > functions::GeoConstraint::get_lat_names ( ) const
inlineinherited

Definition at line 349 of file GeoConstraint.h.

◆ get_lat_size()

int functions::GeoConstraint::get_lat_size ( ) const
inlineinherited

Definition at line 241 of file GeoConstraint.h.

◆ get_latitude_index_bottom()

int functions::GeoConstraint::get_latitude_index_bottom ( ) const
inlineinherited

Definition at line 280 of file GeoConstraint.h.

◆ get_latitude_index_top()

int functions::GeoConstraint::get_latitude_index_top ( ) const
inlineinherited

Definition at line 276 of file GeoConstraint.h.

◆ get_latitude_sense()

LatitudeSense functions::GeoConstraint::get_latitude_sense ( ) const
inlineinherited

Definition at line 327 of file GeoConstraint.h.

◆ get_lon()

double * functions::GeoConstraint::get_lon ( ) const
inlineinherited

Definition at line 228 of file GeoConstraint.h.

◆ get_lon_dim()

libdap::Array::Dim_iter functions::GeoConstraint::get_lon_dim ( ) const
inlineinherited

Definition at line 258 of file GeoConstraint.h.

◆ get_lon_names()

set< string > functions::GeoConstraint::get_lon_names ( ) const
inlineinherited

Definition at line 353 of file GeoConstraint.h.

◆ get_lon_size()

int functions::GeoConstraint::get_lon_size ( ) const
inlineinherited

Definition at line 245 of file GeoConstraint.h.

◆ get_longitude_index_left()

int functions::GeoConstraint::get_longitude_index_left ( ) const
inlineinherited

Definition at line 293 of file GeoConstraint.h.

◆ get_longitude_index_right()

int functions::GeoConstraint::get_longitude_index_right ( ) const
inlineinherited

Definition at line 297 of file GeoConstraint.h.

◆ get_longitude_notation()

Notation functions::GeoConstraint::get_longitude_notation ( ) const
inlineinherited

Definition at line 323 of file GeoConstraint.h.

◆ is_bounding_box_set()

bool functions::GeoConstraint::is_bounding_box_set ( ) const
inlineinherited

Definition at line 310 of file GeoConstraint.h.

◆ is_longitude_rightmost()

bool functions::GeoConstraint::is_longitude_rightmost ( ) const
inlineinherited

Definition at line 314 of file GeoConstraint.h.

◆ set_lat()

void functions::GeoConstraint::set_lat ( double * lat)
inlineinherited

Definition at line 232 of file GeoConstraint.h.

◆ set_lat_dim()

void functions::GeoConstraint::set_lat_dim ( libdap::Array::Dim_iter lat)
inlineinherited

Definition at line 270 of file GeoConstraint.h.

◆ set_lat_size()

void functions::GeoConstraint::set_lat_size ( int len)
inlineinherited

Definition at line 249 of file GeoConstraint.h.

◆ set_latitude_index_bottom()

void functions::GeoConstraint::set_latitude_index_bottom ( int bottom)
inlineinherited

Definition at line 288 of file GeoConstraint.h.

◆ set_latitude_index_top()

void functions::GeoConstraint::set_latitude_index_top ( int top)
inlineinherited

Definition at line 284 of file GeoConstraint.h.

◆ set_latitude_sense()

void functions::GeoConstraint::set_latitude_sense ( LatitudeSense l)
inlineinherited

Definition at line 335 of file GeoConstraint.h.

◆ set_lon()

void functions::GeoConstraint::set_lon ( double * lon)
inlineinherited

Definition at line 236 of file GeoConstraint.h.

◆ set_lon_dim()

void functions::GeoConstraint::set_lon_dim ( libdap::Array::Dim_iter lon)
inlineinherited

Definition at line 266 of file GeoConstraint.h.

◆ set_lon_size()

void functions::GeoConstraint::set_lon_size ( int len)
inlineinherited

Definition at line 253 of file GeoConstraint.h.

◆ set_longitude_index_left()

void functions::GeoConstraint::set_longitude_index_left ( int left)
inlineinherited

Definition at line 301 of file GeoConstraint.h.

◆ set_longitude_index_right()

void functions::GeoConstraint::set_longitude_index_right ( int right)
inlineinherited

Definition at line 305 of file GeoConstraint.h.

◆ set_longitude_notation()

void functions::GeoConstraint::set_longitude_notation ( Notation n)
inlineinherited

Definition at line 331 of file GeoConstraint.h.

◆ set_longitude_rightmost()

void functions::GeoConstraint::set_longitude_rightmost ( bool state)
inlineinherited

Definition at line 318 of file GeoConstraint.h.

Friends And Related Symbol Documentation

◆ GridGeoConstraintTest

friend class GridGeoConstraintTest
friend

Definition at line 64 of file GridGeoConstraint.h.


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