GeoTessCPP  2.0.0
Software to facilitate storage and retrieval of 3D information about the Earth.
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
include/GeoTessModelUtils.h
Go to the documentation of this file.
00001 //- ****************************************************************************
00002 //- 
00003 //- Copyright 2009 Sandia Corporation. Under the terms of Contract
00004 //- DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
00005 //- retains certain rights in this software.
00006 //- 
00007 //- BSD Open Source License.
00008 //- All rights reserved.
00009 //- 
00010 //- Redistribution and use in source and binary forms, with or without
00011 //- modification, are permitted provided that the following conditions are met:
00012 //- 
00013 //-    * Redistributions of source code must retain the above copyright notice,
00014 //-      this list of conditions and the following disclaimer.
00015 //-    * Redistributions in binary form must reproduce the above copyright
00016 //-      notice, this list of conditions and the following disclaimer in the
00017 //-      documentation and/or other materials provided with the distribution.
00018 //-    * Neither the name of Sandia National Laboratories nor the names of its
00019 //-      contributors may be used to endorse or promote products derived from
00020 //-      this software without specific prior written permission.
00021 //- 
00022 //- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00023 //- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024 //- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025 //- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
00026 //- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00027 //- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00028 //- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00029 //- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00030 //- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00031 //- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00032 //- POSSIBILITY OF SUCH DAMAGE.
00033 //-
00034 //- ****************************************************************************
00035 
00036 #ifndef GEOTESSMODELUTILS_OBJECT_H
00037 #define GEOTESSMODELUTILS_OBJECT_H
00038 
00039 // **** _SYSTEM INCLUDES_ ******************************************************
00040 
00041 #include <iostream>
00042 #include <fstream>
00043 #include <vector>
00044 #include <map>
00045 #include <string>
00046 
00047 // use standard library objects
00048 using namespace std;
00049 
00050 // **** _LOCAL INCLUDES_ *******************************************************
00051 
00052 #include "CPPUtils.h"
00053 #include "GeoTessInterpolatorType.h"
00054 
00055 // **** _BEGIN GEOTESS NAMESPACE_ **********************************************
00056 
00057 namespace geotess {
00058 
00059 // **** _FORWARD REFERENCES_ ***************************************************
00060 
00061 class   GeoTessModel;
00062 class GeoTessPosition;
00063 
00064 // **** _CLASS DEFINITION_ *****************************************************
00065 
00083 class GEOTESS_EXP_IMP GeoTessModelUtils
00084 {
00085 private:
00086 
00087 
00088 public:
00089 
00090         GeoTessModelUtils() {};
00091         virtual                                                 ~GeoTessModelUtils() {};
00092 
00101         static int                                      updatePointsPerLayer(GeoTessPosition& pos, int firstLayer,
00102                         int lastLayer, double maxSpacing,
00103                         vector<int>& pointsPerLayer);
00104 
00109         static string                           getBoreholeString(GeoTessModel& pos, double lat, double lon);
00110 
00122         static string                           getBoreholeString(GeoTessPosition& pos, double maxSpacing,
00123                         int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal,
00124                         vector<int>& attributes);
00125 
00129         static void                     getBorehole(GeoTessPosition& pos,
00130                         double maxSpacing, int firstLayer,
00131                         int lastLayer, bool convertToDepth,
00132                         bool reciprocal, vector<int>& attributes,
00133                         vector<vector<double> >& borehole);
00134 
00138         static void                     getBorehole(GeoTessPosition& pos,
00139                         vector<int>& pointsPerLayer, bool convertToDepth,
00140                         bool reciprocal, const vector<int>& attributes,
00141                         vector<vector<double> >& borehole);
00142 
00167         static void getMapValuesDepth(GeoTessModel& model,
00168                         vector<double>& latitudes, vector<double>& longitudes, int layerId, double depth,
00169                         const GeoTessInterpolatorType& horizontalType,
00170                         const GeoTessInterpolatorType& radialType, bool reciprocal, vector<int>& attributes,
00171                         vector<vector<vector<double> > >& values);
00172 
00173         static void getSlice(GeoTessModel& model, const double* const x0,
00174                         const double* const x1, int nx,
00175                         double maxRadialSpacing, int firstLayer,
00176                         int lastLayer, const GeoTessInterpolatorType& horizontalType,
00177                         const GeoTessInterpolatorType& radialType,
00178                         const string& spatialCoordinates, bool reciprocal,
00179                         const vector<int>& attributes,
00180                         vector<vector<vector<double> > >& transect);
00181 
00203         static void getMapValuesLayer(GeoTessModel& model,
00204                         vector<double>& latitudes, vector<double>& longitudes, int layerId, double fractionalRadius,
00205                         const GeoTessInterpolatorType& horizontalType,
00206                         const GeoTessInterpolatorType& radialType, bool reciprocal, vector<int>& attributes,
00207                         vector<vector<vector<double> > >& values);
00208 
00226         static void getMapLayerBoundary(GeoTessModel& model,
00227                         vector<double>& latitudes, vector<double>& longitudes, int layerId,
00228                         bool top, bool convertToDepth, const GeoTessInterpolatorType& horizontalType,
00229                         const GeoTessInterpolatorType& radialType,
00230                         vector<vector<double> >& values);
00231 
00232 }; // end class GeoTessModelUtils
00233 
00234 } // end namespace geotess
00235 
00236 #endif  // GEOTESSMODELUTILS_OBJECT_H