DEM TerrainGenerator for OpenSim
This tool takes USGS DEM files and creates OpenSim terrains. Here are some pictures:
Pre-compiled executable, along with test DEM files and a README:
opensim-terraingen-0-2-1.tar.gz (June 19, 2008)
opensim-terraingen-0-1-0.tar.gz (June 10, 2008)
The source is distributed under BSD license. The source is here:
$ svn co http://mondego.calit2.uci.edu/svn-opensim-terraingen/trunk
Feedback, patches, etc. welcome.
User Guide
$ bin/TerrainGenerator.exe <dem file> <we regions> <sn regions> [-col <start_col in dem> -row <start_row in dem> | -east <easting> -north <northing> | -lat <latitude> -lon <longitude>] [-split] For example, $ bin/TerrainGenerator.exe data/sf_north.dem 3 1 -col 10 -row 402 $ bin/TerrainGenerator.exe data/sf_north.dem 3 1 -east 544153 -north 4182092 $ bin/TerrainGenerator.exe data/sf_north.dem 3 1 -lat 37-47-06.00-N -lon 122-29-54.8-W All of these will create a file data/sf_north.r32 for a 3x1 grid. The given point, in whatever form, corresponds to the SouthWestern corner of the terrain tile. The -split option produces (we x sn) files, one per region, in case you need to load the terrain in different simulators. Warning: the lat/lon seems to be a couple of hundred meters off from the values in Google maps/Earth. Not sure why. Please take that into account and try a few values until you get the exact terrain you want. The example files provided here are from San Francisco North; they both cover the same area. See this for the corresponding area: http://www.lib.berkeley.edu/EART/dem/dem.html The area is approx. 11Km WE x 13Km SN. sf_north.dem has a ground resolution of 10m; SanFranciscoNorth.dem has a ground resolution of 30m; In order to spec the stating point effectively, you need to know the basics of USGS DEM files. But, roughly, divide the area by the resolution, and you'll get these numbers. In the example above, we're starting in the column 10, which is 100m from the West border of the area, and row 400 which is 4Km from the South border of the area. This will produce the clif north of the Legion of Honor. If you use -lat/-lon, you need to get those values from elsewhere, e.g. Google maps. But the given point must be inside the area that the DEM file covers.Full USGS spec