Skip to content

Commit

Permalink
From Alan Harris, "osgTerrain has been changed to include better supp…
Browse files Browse the repository at this point in the history
…ort for vector data

sets, which are mainly used for height data. GDAL is primarily for
raster data."
  • Loading branch information
robertosfield committed Feb 27, 2007
1 parent f9abb49 commit 3e83d53
Show file tree
Hide file tree
Showing 6 changed files with 867 additions and 70 deletions.
577 changes: 577 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

52 changes: 0 additions & 52 deletions Make/dependencies
@@ -1,62 +1,10 @@
################################################################
# Dependency library which have been installed on this system

# should we compile osgIntrospection?
COMPILE_INTROSPECTION ?= no

# should we compile any of the examples?
COMPILE_EXAMPLES ?= no

# follows are dependenices on the various plugins.

COLLADA_INSTALLED ?= no
COLLADA_DAE_HOME ?= /usr/local
COLLADA_DEBUG_LIBS ?= yes

GDAL_INSTALLED ?= no
JASPER_INSTALLED ?= no

FREETYPE_INSTALLED ?= yes

XINE_INSTALLED ?= no

QT3_INSTALLED ?= no

QT4_INSTALLED ?= no
QT4_ROOT ?= /usr/local/

SDL_INSTALLED ?= no

FLTK_INSTALLED ?= no

ifeq ($(OS),Darwin)
DARWIN_QUICKTIME ?= yes
endif

ifeq ($(DARWIN_QUICKTIME),yes)

QUICKTIME_INSTALLED ?= yes
LIBJPEG_INSTALLED ?= no
LIBUNGIF_INSTALLED ?= no
LIBTIFF_INSTALLED ?= no
LIBPNG_INSTALLED ?= no

else

QUICKTIME_INSTALLED ?= no
LIBJPEG_INSTALLED ?= yes
LIBUNGIF_INSTALLED ?= yes
LIBTIFF_INSTALLED ?= yes
LIBPNG_INSTALLED ?= yes

endif


COIN_INSTALLED ?= no
INVENTOR_INSTALLED ?= no

LIBVRML_INSTALLED ?= no

PERFORMER_INSTALLED ?= no

GLUT_INSTALLED ?= no
1 change: 1 addition & 0 deletions NEWS.txt
@@ -0,0 +1 @@
27th February 2007, VirtualPlanetBuilder project setup moving osgTerrain(part of)/osgdem/gdal plugin components of the OpenSceneGraph out into their own project.
28 changes: 28 additions & 0 deletions READEME.txt
@@ -0,0 +1,28 @@
VirtualPlanetBuilder is terrain database creation tool that is able to read
a wide range of geospatial imagery and elevation data and build from small
area terrain database to massive whole planet paged databases. These databases
can then be uploaded onto the internet and provide online GoogleEarth style
roaming of whole planet databases, or kept on local disks for high speed
access such as required for professional flight simulators.

VirtualPlanetBuilder just builds databases so for runtime viewing of database
you'll need an OpenSceneGraph based application. The VirtualPlanetBuilder
itself is based on the OpenSceneGraph real-time graphics toolkit, and creates
databases in native OpenSceneGraph binary format for maximum paging performance.
For non OpenSceneGraph based applications you'll need to convert the database
by writing your own post processing tool to convert from OpenSceneGraph native
format into you own native formats, or convert to COLLADA using the
OpenSceneGraph native support for reading and writing COLLADA.

The VirtualPlanetBuilder project grew from the original paged database
generation tools that can as part of the !OpenSceneGraph-1.2, and is now a
separate project to enable both projects to focus on their own core disciplines.
We have plans to make it even more scalable making it possible to create
multi-terabyte paged databases, and to create them across networks of
computers, each of which take part of the job of creating the complete
database. We will also provide support for database optimization for the
lower bandwidth constraints of web based 3d database visualization.


Robert Osfield.
27th February 2007
29 changes: 26 additions & 3 deletions include/osgTerrain/DataSet
Expand Up @@ -172,7 +172,15 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced

struct OSGTERRAIN_EXPORT SpatialProperties
{
enum DataType
{
NONE,
RASTER,
VECTOR
};

SpatialProperties():
_dataType(RASTER),
_numValuesX(0),
_numValuesY(0),
_numValuesZ(0) {}
Expand All @@ -181,13 +189,15 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
_cs(sp._cs),
_geoTransform(sp._geoTransform),
_extents(sp._extents),
_dataType(sp._dataType),
_numValuesX(sp._numValuesX),
_numValuesY(sp._numValuesY),
_numValuesZ(sp._numValuesZ) {}

SpatialProperties(osg::CoordinateSystemNode* cs, const GeospatialExtents& extents):
_cs(cs),
_extents(extents),
_dataType(RASTER),
_numValuesX(0),
_numValuesY(0),
_numValuesZ(0) {}
Expand All @@ -199,6 +209,7 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
_cs = sp._cs;
_geoTransform = sp._geoTransform;
_extents = sp._extents;
_dataType = sp._dataType;
_numValuesX = sp._numValuesX;
_numValuesY = sp._numValuesY;
_numValuesZ = sp._numValuesZ;
Expand All @@ -211,6 +222,7 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
osg::ref_ptr<osg::CoordinateSystemNode> _cs;
osg::Matrixd _geoTransform;
GeospatialExtents _extents;
DataType _dataType;
unsigned int _numValuesX;
unsigned int _numValuesY;
unsigned int _numValuesZ;
Expand Down Expand Up @@ -245,7 +257,8 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
SourceData(Source* source=0):
_source(source),
_hasGCPs(false),
_gdalDataset(0) {}
_gdalDataset(0),
_hfDataset(0) {}

virtual ~SourceData();

Expand All @@ -264,13 +277,15 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
virtual void readModels(DestinationData& destination);

float getInterpolatedValue(GDALRasterBand *band, double x, double y);
float getInterpolatedValue(osg::HeightField* hf, double x, double y);

Source* _source;

bool _hasGCPs;

osg::ref_ptr<osg::Node> _model;
GDALDataset* _gdalDataset;
osg::HeightField* _hfDataset;

typedef std::map<const osg::CoordinateSystemNode*,SpatialProperties> SpatialPropertiesMap;
mutable SpatialPropertiesMap _spatialPropertiesMap;
Expand Down Expand Up @@ -306,7 +321,8 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
_minLevel(0),
_maxLevel(MAXIMUM_NUMBER_OF_LEVELS),
_layer(0),
_gdalDataset(0)
_gdalDataset(0),
_hfDataset(0)
{}

Source(Type type, const std::string& filename):
Expand All @@ -319,7 +335,8 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
_minLevel(0),
_maxLevel(MAXIMUM_NUMBER_OF_LEVELS),
_layer(0),
_gdalDataset(0)
_gdalDataset(0),
_hfDataset(0)
{}

void setSortValue(double s) { _sortValue = s; }
Expand All @@ -340,6 +357,10 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
void* getGdalDataset();
const void* getGdalDataset() const;

void setHFDataset(void* hfDataset);
void* getHFDataset();
const void* getHFDataset() const;

void setCoordinateSystemPolicy(ParameterPolicy policy) { _coordinateSystemPolicy = policy; }
ParameterPolicy getCoordinateSystemPolicy() const { return _coordinateSystemPolicy; }

Expand Down Expand Up @@ -453,6 +474,8 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
ResolutionList _requiredResolutions;

GDALDataset* _gdalDataset;

osg::HeightField* _hfDataset;
};

enum CompositeType
Expand Down

0 comments on commit 3e83d53

Please sign in to comment.