GeoTessCPP  2.2.3
Software to facilitate storage and retrieval of 3D information about the Earth.
GeoTessModelUtils.h
Go to the documentation of this file.
1 //- ****************************************************************************
2 //-
3 //- Copyright 2009 National Technology & Engineering Solutions of Sandia, LLC
4 //- (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
5 //- Government 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 //- 1. Redistributions of source code must retain the above copyright notice,
14 //- this list of conditions and the following disclaimer.
15 //-
16 //- 2. Redistributions in binary form must reproduce the above copyright
17 //- notice, this list of conditions and the following disclaimer in the
18 //- documentation and/or other materials provided with the distribution.
19 //-
20 //- 3. Neither the name of the copyright holder nor the names of its
21 //- contributors may be used to endorse or promote products derived from
22 //- this software without specific prior written permission.
23 //-
24 //- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 //- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 //- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 //- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28 //- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 //- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 //- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 //- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 //- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 //- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 //- POSSIBILITY OF SUCH DAMAGE.
35 //-
36 //- ****************************************************************************
37 
38 #ifndef GEOTESSMODELUTILS_OBJECT_H
39 #define GEOTESSMODELUTILS_OBJECT_H
40 
41 // **** _SYSTEM INCLUDES_ ******************************************************
42 
43 #include <iostream>
44 #include <fstream>
45 #include <vector>
46 #include <map>
47 #include <string>
48 
49 // use standard library objects
50 using namespace std;
51 
52 // **** _LOCAL INCLUDES_ *******************************************************
53 
54 #include "CPPUtils.h"
56 
57 // **** _BEGIN GEOTESS NAMESPACE_ **********************************************
58 
59 namespace geotess {
60 
61 // **** _FORWARD REFERENCES_ ***************************************************
62 
63 class GeoTessModel;
64 class GeoTessPosition;
65 
66 // **** _CLASS DEFINITION_ *****************************************************
67 
86 {
87 private:
88 
89 
90 public:
91 
93  virtual ~GeoTessModelUtils() {};
94 
103  static int updatePointsPerLayer(GeoTessPosition& pos, int firstLayer,
104  int lastLayer, double maxSpacing,
105  vector<int>& pointsPerLayer);
106 
111  static string getBoreholeString(GeoTessModel& pos, double lat, double lon);
112 
124  static string getBoreholeString(GeoTessPosition& pos, double maxSpacing,
125  int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal,
126  vector<int>& attributes);
127 
131  static void getBorehole(GeoTessPosition& pos,
132  double maxSpacing, int firstLayer,
133  int lastLayer, bool convertToDepth,
134  bool reciprocal, vector<int>& attributes,
135  vector<vector<double> >& borehole);
136 
140  static void getBorehole(GeoTessPosition& pos,
141  vector<int>& pointsPerLayer, bool convertToDepth,
142  bool reciprocal, const vector<int>& attributes,
143  vector<vector<double> >& borehole);
144 
169  static void getMapValuesDepth(GeoTessModel& model,
170  vector<double>& latitudes, vector<double>& longitudes, int layerId, double depth,
171  const GeoTessInterpolatorType& horizontalType,
172  const GeoTessInterpolatorType& radialType, bool reciprocal, vector<int>& attributes,
173  vector<vector<vector<double> > >& values);
174 
175  static void getSlice(GeoTessModel& model, const double* const x0,
176  const double* const x1, int nx,
177  double maxRadialSpacing, int firstLayer,
178  int lastLayer, const GeoTessInterpolatorType& horizontalType,
179  const GeoTessInterpolatorType& radialType,
180  const string& spatialCoordinates, bool reciprocal,
181  const vector<int>& attributes,
182  vector<vector<vector<double> > >& transect);
183 
205  static void getMapValuesLayer(GeoTessModel& model,
206  vector<double>& latitudes, vector<double>& longitudes, int layerId, double fractionalRadius,
207  const GeoTessInterpolatorType& horizontalType,
208  const GeoTessInterpolatorType& radialType, bool reciprocal, vector<int>& attributes,
209  vector<vector<vector<double> > >& values);
210 
228  static void getMapLayerBoundary(GeoTessModel& model,
229  vector<double>& latitudes, vector<double>& longitudes, int layerId,
230  bool top, bool convertToDepth, const GeoTessInterpolatorType& horizontalType,
231  const GeoTessInterpolatorType& radialType,
232  vector<vector<double> >& values);
233 
234 }; // end class GeoTessModelUtils
235 
236 } // end namespace geotess
237 
238 #endif // GEOTESSMODELUTILS_OBJECT_H
geotess::GeoTessModelUtils::getBorehole
static void getBorehole(GeoTessPosition &pos, vector< int > &pointsPerLayer, bool convertToDepth, bool reciprocal, const vector< int > &attributes, vector< vector< double > > &borehole)
geotess
Definition: ArrayReuse.h:57
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::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
A collection of static utilities that extract organized information from a GeoTessModel.
Definition: GeoTessModelUtils.h:86
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::getBoreholeString
static string getBoreholeString(GeoTessModel &pos, double lat, double lon)
geotess::GeoTessModelUtils::GeoTessModelUtils
GeoTessModelUtils()
Definition: GeoTessModelUtils.h:92
geotess::GeoTessModelUtils::getBoreholeString
static string getBoreholeString(GeoTessPosition &pos, double maxSpacing, int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal, vector< int > &attributes)
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)
GeoTessInterpolatorType.h
geotess::GeoTessModelUtils::updatePointsPerLayer
static int updatePointsPerLayer(GeoTessPosition &pos, int firstLayer, int lastLayer, double maxSpacing, vector< int > &pointsPerLayer)
GEOTESS_EXP_IMP
#define GEOTESS_EXP_IMP
Definition: CPPGlobals.h:73
geotess::GeoTessModel
Top level class that manages the GeoTessMetaData, GeoTessGrid and GeoTessData that comprise a 3D Eart...
Definition: GeoTessModel.h:123
geotess::GeoTessPosition
Information about an interpolated point at an arbitrary position in a model.
Definition: GeoTessPosition.h:104
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)
CPPUtils.h
geotess::GeoTessModelUtils::~GeoTessModelUtils
virtual ~GeoTessModelUtils()
Definition: GeoTessModelUtils.h:93
geotess::GeoTessInterpolatorType
Enumeration of the interpolation algorithms supported by GeoTess including LINEAR,...
Definition: GeoTessInterpolatorType.h:74