Microsoft Visual C++ is recommended, one of these versions:
- VC7.1, also known as Microsoft Visual C++ .NET 2003
- VC9.0, also known as Microsoft Visual C++ 2008
- VC10.0, also known as Microsoft Visual C++ 2010
It may also be possible to use Cygwin/gcc, by adapting the existing Unix makefiles, but this has not been well tested.
Using very old versions of MSVC (e.g. VC6) is not recommended, and project/workspace files are not provided for that version. However, if you want to attempt that route, see issues with VC6.
The VTP software is very ambitious and attempts to be comprehensive, so unavoidably it depends on many other libraries. As Newton said, "If I have seen further than others, it is because I have stood on the shoulders of giants."
The following six libraries, built for both VC7.1 and VC9, are conveniently contained in WinAPIs-1104.zip (1 MB)
For 3D rendering of terrain, you will need:
To compile the GUI applications (VTBuilder and Enviro) you will need:
| VC7.1 | VC9 |
| wx2.8.7-bin-vc71.zip (9 MB) | wx2.8.7-bin-vc9.zip (9 MB) |
For 3D applications (e.g. Enviro) you need:
| VC7.1 | VC9 |
| osg-2.80-bin-vc71.zip (9 MB) | osg-2.80-bin-vc9.zip (11 MB) |
OSG_USE_FLOAT_MATRICES
to ON in the CMake pass. (It's marked as an "Advanced Option" in the
CMake GUI.)Optional Libraries:
If you want to have another option for texture compression (besides standard OpenGL), you can grab Simon Brown's squish library.
If you are using the pre-built wxWidgets headers/libs, skip this step.
To build wxWidgets , use the workspace
wx2.8.7/build/msw/wx_dll.dswYou will build both the configurations "DLL Unicode Debug" and "DLL Unicode Release".
The simplest way is to build the whole workspace, but it's not really necessary. The VTP projects use only the "aui", base", "core", "net", and "gl" libraries.
Building wxWidgets is a fairly complex subject. I highly recommend the following the following steps:
- Replace your file
include/wx/msw/setup.hwith this setup.h, which turns off a large number of things for a simpler, smaller library.- Remove all of following hard-coded libraries in the wx project settings under "Project Properties: Linker: Input":
wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.libYou won't need them.
- Replace your file
include/msvc/wx/setup.hwith this setup.h, which will automatically cause all (and only) the necessary libraries to be linked.- Remember, build only the projects "aui", "base", "core", "net" and "gl".
Source code (2.2 MB zip file)
You can unzip it anywhere, but i recommend simply using the root of any drive.Alternately, you can get the very latest VTP source from SVN.
CMake is recommended, especially for VC10 which doesn't let you set environment-wide paths.
With CMake
|
With the standard project files1. Add the library paths to your development environment
2. In MSVC, load each VTP 'solution' to build the applications that you want to use, e.g.:E.g. for VC 7.1:
Note that all the solutions for VC9 have a -vc9 in their filename, e.g.:
|
Beside the large, useful application Enviro and VTBuilder, the are also six smaller application provided as small, simple examples of how to use the VTP terrain library on top of various application frameworks:
VTP\TerrainApps\Simple(Builds directly on OSG)(uses GLUT)
VTP\TerrainApps\glutSimple(uses MFC)
VTP\TerrainApps\mfcSimple(uses SDL)
VTP\TerrainApps\sdlSimple(uses wxWidgets)
VTP\TerrainApps\wxSimple(uses FLTK)
VTP\TerrainApps\fltkSimple
vtp-apps-data.zip (8 MB) (required) contains basic data for the main applications, including a world map for use by VTBuilder, and earth image, plant images, road textures, etc. for Enviro. You should unzip this to the same place as your source, for example if your VTP source is in
C:\work\vtp, unzip it there and it will create a folderC:\work\vtp\Data.Optional:
- Hawaii-demo-0411.zip (32 MB) (optional) contains some demo terrain data, including elevation and satellite imagery for the Island of Hawai`i. You don't need this if you are only going to use your own geospatial data.
- vtp-plantlib.zip (80 MB) (optional) contains the VTP Plant library of billboard plant textures.
Set the following environment variables as follows, or change the path if you installed GDAL and PROJ4 in some other location.
GDAL_DATA=C:\APIs\gdal160\data
PROJ_LIB=C:\VTP\proj\nadThis will allow you to use State Plane Coordinates, do conversion between different Datums, and other projection operations.
Some of the DLLs which you have installed or built will need to be found at runtime. You can either copy them to a location on your path, or (recommended) add them to your PATH environment variable. Typical paths include:
\APIs\bzip2-1.0.3-bin
\APIs\gdal180\bin
\APIs\libcurl-7.15.0
\APIs\libpng-1.2.12
\APIs\netcdf-3.5.0.win32bin\bin
\APIs\osg-2.80-bin\bin
\APIs\wx2.8.7\lib\vc_dll
If you have also downloaded the pre-built binaries then you will find documentation for each application in the Docs folder under each directory. Alternately, documentation is online.
See the FAQ and status pages for bug reports, feature requests, etc.
Try the software on your own geospatial data!
Send feedback to myself or the mailing list!