GeoTessCPP 2.6.1 Software to facilitate storage and retrieval of 3D information about the Earth.

Loading...
Searching...
No Matches
GeoTessModelUtils.h
Go to the documentation of this file.
1//- ****************************************************************************
2//-
3//- Copyright 2009 Sandia Corporation. Under the terms of Contract
4//- DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
5//- retains certain rights in this software.
6//-
7//- BSD Open Source License.
8//- All rights reserved.
9//-
10//- Redistribution and use in source and binary forms, with or without
11//- modification, are permitted provided that the following conditions are met:
12//-
13//- * Redistributions of source code must retain the above copyright notice,
14//- this list of conditions and the following disclaimer.
15//- * Redistributions in binary form must reproduce the above copyright
16//- notice, this list of conditions and the following disclaimer in the
17//- documentation and/or other materials provided with the distribution.
18//- * Neither the name of Sandia National Laboratories nor the names of its
19//- contributors may be used to endorse or promote products derived from
20//- this software without specific prior written permission.
21//-
22//- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23//- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24//- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25//- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26//- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27//- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28//- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29//- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30//- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31//- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32//- POSSIBILITY OF SUCH DAMAGE.
33//-
34//- ****************************************************************************
35
36#ifndef GEOTESSMODELUTILS_OBJECT_H
37#define GEOTESSMODELUTILS_OBJECT_H
38
39// **** _SYSTEM INCLUDES_ ******************************************************
40
41#include <iostream>
42#include <fstream>
43#include <vector>
44#include <map>
45#include <string>
46
47// use standard library objects
48 using namespace std;
49
50// **** _LOCAL INCLUDES_ *******************************************************
51
52#include "CPPUtils.h"
53#include "GeoTessInterpolatorType.h"
54
55// **** _BEGIN GEOTESS NAMESPACE_ **********************************************
56
57 namespace geotess {
58
59// **** _FORWARD REFERENCES_ ***************************************************
60
61 class GeoTessModel;
62 class GeoTessPosition;
63
64// **** _CLASS DEFINITION_ *****************************************************
65
83 class GEOTESS_EXP_IMP GeoTessModelUtils
84{
85 private:
86
87
88 public:
89
90 GeoTessModelUtils() {};
91 virtual ~GeoTessModelUtils() {};
92
101 static int updatePointsPerLayer(GeoTessPosition& pos, int firstLayer,
102 int lastLayer, double maxSpacing,
103 vector<int>& pointsPerLayer);
104
109 static string getBoreholeString(GeoTessModel& pos, double lat, double lon);
110
122 static string getBoreholeString(GeoTessPosition& pos, double maxSpacing,
123 int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal,
124 vector<int>& attributes);
125
129 static void getBorehole(GeoTessPosition& pos,
130 double maxSpacing, int firstLayer,
131 int lastLayer, bool convertToDepth,
132 bool reciprocal, vector<int>& attributes,
133 vector<vector<double> >& borehole);
134
138 static void getBorehole(GeoTessPosition& pos,
139 vector<int>& pointsPerLayer, bool convertToDepth,
140 bool reciprocal, const vector<int>& attributes,
141 vector<vector<double> >& borehole);
142
167 static void getMapValuesDepth(GeoTessModel& model,
168 vector<double>& latitudes, vector<double>& longitudes, int layerId, double depth,
169 const GeoTessInterpolatorType& horizontalType,
170 const GeoTessInterpolatorType& radialType, bool reciprocal, vector<int>& attributes,
171 vector<vector<vector<double> > >& values);
172
173 static void getSlice(GeoTessModel& model, const double* const x0,
174 const double* const x1, int nx,
175 double maxRadialSpacing, int firstLayer,
176 int lastLayer, const GeoTessInterpolatorType& horizontalType,
177 const GeoTessInterpolatorType& radialType,
178 const string& spatialCoordinates, bool reciprocal,
179 const vector<int>& attributes,
180 vector<vector<vector<double> > >& transect);
181
203 static void getMapValuesLayer(GeoTessModel& model,
204 vector<double>& latitudes, vector<double>& longitudes, int layerId, double fractionalRadius,
205 const GeoTessInterpolatorType& horizontalType,
206 const GeoTessInterpolatorType& radialType, bool reciprocal, vector<int>& attributes,
207 vector<vector<vector<double> > >& values);
208
226 static void getMapLayerBoundary(GeoTessModel& model,
227 vector<double>& latitudes, vector<double>& longitudes, int layerId,
228 bool top, bool convertToDepth, const GeoTessInterpolatorType& horizontalType,
229 const GeoTessInterpolatorType& radialType,
230 vector<vector<double> >& values);
231
232}; // end class GeoTessModelUtils
233
234} // end namespace geotess
235
236#endif // GEOTESSMODELUTILS_OBJECT_H
GEOTESS_EXP_IMP
#define GEOTESS_EXP_IMP
Definition CPPGlobals.h:71
CPPUtils.h
GeoTessInterpolatorType.h
geotess::GeoTessInterpolatorType
Enumeration of the interpolation algorithms supported by GeoTess including LINEAR,...
Definition GeoTessInterpolatorType.h:72
geotess::GeoTessModel
Top level class that manages the GeoTessMetaData, GeoTessGrid and GeoTessData that comprise a 3D Eart...
Definition GeoTessModel.h:120
geotess::GeoTessModelUtils::getMapValuesLayer
static void getMapValuesLayer(GeoTessModel &model, vector< double > &latitudes, vector< double > &longitudes, int layerId, double fractionalRadius, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, bool reciprocal, vector< int > &attributes, vector< vector< vector< double > > > &values)
geotess::GeoTessModelUtils::getBorehole
static void getBorehole(GeoTessPosition &pos, vector< int > &pointsPerLayer, bool convertToDepth, bool reciprocal, const vector< int > &attributes, vector< vector< double > > &borehole)
geotess::GeoTessModelUtils::getMapValuesDepth
static void getMapValuesDepth(GeoTessModel &model, vector< double > &latitudes, vector< double > &longitudes, int layerId, double depth, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, bool reciprocal, vector< int > &attributes, vector< vector< vector< double > > > &values)
geotess::GeoTessModelUtils::~GeoTessModelUtils
virtual ~GeoTessModelUtils()
Definition GeoTessModelUtils.h:91
geotess::GeoTessModelUtils::GeoTessModelUtils
GeoTessModelUtils()
Definition GeoTessModelUtils.h:90
geotess::GeoTessModelUtils::getSlice
static void getSlice(GeoTessModel &model, const double *const x0, const double *const x1, int nx, double maxRadialSpacing, int firstLayer, int lastLayer, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, const string &spatialCoordinates, bool reciprocal, const vector< int > &attributes, vector< vector< vector< double > > > &transect)
geotess::GeoTessModelUtils::updatePointsPerLayer
static int updatePointsPerLayer(GeoTessPosition &pos, int firstLayer, int lastLayer, double maxSpacing, vector< int > &pointsPerLayer)
geotess::GeoTessModelUtils::getBoreholeString
static string getBoreholeString(GeoTessModel &pos, double lat, double lon)
geotess::GeoTessModelUtils::getMapLayerBoundary
static void getMapLayerBoundary(GeoTessModel &model, vector< double > &latitudes, vector< double > &longitudes, int layerId, bool top, bool convertToDepth, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, vector< vector< double > > &values)
geotess::GeoTessModelUtils::getBorehole
static void getBorehole(GeoTessPosition &pos, double maxSpacing, int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal, vector< int > &attributes, vector< vector< double > > &borehole)
geotess::GeoTessModelUtils::getBoreholeString
static string getBoreholeString(GeoTessPosition &pos, double maxSpacing, int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal, vector< int > &attributes)
geotess::GeoTessPosition
Information about an interpolated point at an arbitrary position in a model.
Definition GeoTessPosition.h:102
geotess
Definition ArrayReuse.h:55