Annotated table of contents with links for all the Terrain repositories on GitHub: Jaanga Terrain Contents
Primary read me file for this project: Jaanga Terrain
For the latest viewer see: unFlatland Read me
For an applied use of this techmology see: FGx Plane Spotter
Three quite different ways of viewing the Terrain data:
Live Demo: unFlatland (latest)
Web page: unFlatland Read me
Source code: unFlatland
- Loads Jonathan de Ferranti's 3 second data set
- About one data point about every 90 meters
- Access approximately 2.85 GB of Terrain data
Live demo: Hello World
Web page: Hello World Read Me
Source code: Hello World
- Loads Jonathan de Ferranti's 15 second data set
- About one data point about every 500 meters
- Data set overs the entire world
- Approx 185 MB file size
- Very simple code - can be used as boileeplate
- Set location, zoom and scale using window.location.hash. Source code page has sample links
Live Demo: PNG Viewer
Web page: PNG Viewer Read Me
Source code: PNG Viewer
- View the PNG files used as heightmaps
- Set location, zoom and scale using window.location.hash.
- Source code page has sample links
For Leap Motion device enabled and earlier versions see: Flying Leap 3D
2014-01-28 ~ Following text is out of date and/or a work in progress
The fastest, smallest, sweetest 3D Map code you ever did see.
You have two ways of viewing the Jaanga Terrain Viewer files:
- Code hosted on GitHub: jaanga.github.io
- Source code on GitHub: github.com/jaanga << You are now probably here.
Mission: to develop the database of online 3D terrain elevation bitmaps so that you can zoom in and out of OSM-style maps while the state-of-the-art resolution of the terrain in 3D.
Vision: Make available to the world - for a wide variety of cartography uses - an easily accessible and readily usable terrain data set of the entire earth.
unFlatland uses bitmaps to store terrain vertical elevation data. The color of the pixel is linked to a table that list the altitude indicated for each color. The X and Y position of the pixel in the bitmap corresponds to the longitude and latitude of the indicated location. Further background on this technique may be found at Jaume Sánchez's "Blocky Earth" and Bjørn Sandvik's tutorial at Textural terrains with three.js.
This techniques creates actual 3D geometry that can cast shadows and things can bump into. It should nor be confused with bump mapping - a process that simulates 3D user shaders.
Apart from the 3D data is is useful to overlay the terrain with geographical features such as road maps and satellite photos. The intention is that unFlatland follows all Slippy Map tile conventions. Wherever Slippy Map has a tile with its 2D data, unFlatland should supply a corresponding tile with terrain elevation data. Of course, neither the Slippy Map providers nor the terrain bitmaps can supply data for ever square nanometer of the world, so interpolation is required.
Given that unFlatland is new and the dataset is very rudimentary, it has to much interpolating. For Revision 1 there are only 64 bitmaps corresponding to Slippy Map zoom level 4. To make matters even worse, there is so much data on each of these bitmaps that, if you attempt to display zoom level 4 (or 5 or 6) that you will bring your computer to a halt. Currently, unFlatland is set to interpolate elevation data between zoom levels 7 to 12.
The following sections begin to identify the work that need to be done in order to have the 3D data match the quality of the 2D data.
A great source for the Slippy Map tiles is Open Street Map.
- Tiles are 256 × 256 pixel PNG files
- Each zoom level is a directory, each column is a subdirectory, and each tile in that column is a file
- Filename(url) format is /zoom/x/y.png
Examples:
- The world: 256x256 bitmap for OSM zoom level 0: http://b.tile.openstreetmap.org/0/0/0.png
- San Francisco Airport (KSFO) for OSM zoom level 12: http://b.tile.openstreetmap.org/12/655/1585.png
- Handy calculator: http://oms.wff.ch/calc.htm
Elevation data is likely to be sourced from one of the following locations:
- http://dds.cr.usgs.gov/srtm/
- http://www.viewfinderpanoramas.org/dem3.html#hgt
- http://srtm.csi.cgiar.org/Index.asp
Learning how to reprocess the zoom level 4 bitmaps so they cover levels 1 through 6 should take not much more than a few days. Sourcing the data so that elevations work well between zoom levels, say, 10 to 14 or higher is going to take some research, collaboration and scheming.
At zoom level 18, the number of tiles required is over 68 trillion. For the purposes of an amateur project, the upper limit may be zoom level 6 (4096 tiles) or 7 (16384 tiles). This number of files may be processed and stored at no charge on GitHub. For the higher zoom levels, data will be interpolated. These higher zoom levels would obtain data from a special set of zoom level 6 or 7 bitmaps that have much higher resolutions than 256x256 - perhaps as high as 1024x1024 or 2048x2048. The size limit of the special bitmaps would be determined by assessing acceptable download limes. Obtaining and making available to the world terrain elevation bitmaps that work well down to zoom level 14 or so appears very doable even by a group of amateurs.
Once the data is collected it should be kept in its own GitHub gh-pages repository and then maintained at, say, quarterly intervals
Any thoughts, suggestions or guidance on preparing these terrain elevation bitmaps using simple tools will be greatly appreciated.
Even such moderately detailed terrain elevation bitmap data, if readily available in locations such as GitHub, will change cartography forever - because it will make it easier than ever before for even beginning programmers to create 3D mapping apps.
See also the very interesting history of the word 'flatland'.
Older unFlatland versions:
See also the post on Jaanga.com: http://jaanga.github.io/events/sf-webgl-2013-06-26/
The code on this site makes extensive use of the latest and most demanding Internet technologies - including HTML 5 and WebGL and HTML.
In order to view the files or run the apps on this web site you will need a device and browser that provides good support for WebGL. WebGL is the JavaScript API for rendering interactive 3D graphics and 2D graphics within any compatible web browser without the use of plug-ins.
Hardware: Generally WebGL support requires a computer with an Intel Core i5 processor or better with an external GPU such as one made by Nvidia or AMD. Successful use of the apps on a phone or tablet is highly unlikely. A computer that is good for heavy gaming is a likely to be satisfactory. A mouse or other pointing device with a scroll wheel is also highly recommended so that you can zoom, pant and rotate in 3D.
Browser Support: The apps here are currently being and tested with the Google Chrome browser. The apps here may work with the FireFox or Opera browsers, but most likely will not work with Safari or Internet Explorer. Bugs on browsers other than Chrome need not be reported until such as the work settles down and an effort to support more browsers is initiated.
copyright © 2014 Jaanga authors ~ All work herein is under the MIT License
This app is at an early and volatile stage. Not all licensing requirements may have been fully met let alone identified. It is the intension of the authors to play fair and all such requirements will either be met or the feature in question will turned off.
GTOPO30 Topography - On-Line Map Construction Tool
Open Street Map
copyright © OpenStreetMap contributors
Three.js
Copyright © 2010-2013 three.js authors
In the course of preparing this app, data has been obtained via several servers including:
And many thanks to:
The JavaScript DOM
Jaume Sánchez and his "Blocky Earth" for giving me the idea that elevations are obtainable and you can do reverse Mercator projections.
And also to Bjørn Sandvik and his tutorial at Textural terrains with three.js.
See also and in particular FGx on GitHub which has been the cause and the impetus for this work.
2014-03-15 ~ Theo
- Update read me files
2014-01-30 ~ 2014-03-15
- Many updates
- See individual folders for details
2014-01-29 ~ Theo
- R5 is out
- Updating now is OK
- Var statements added
2014-01-15 ~ Theo
- R5 light is up
2013-12-18 ~ Theo
- Expanding the read me
2013-12-17 ~ Theo
- Expanding Read Me
- Added index.html and latest.html
2013-12-15 ~ Theo
- R4.1
- Adds toggle to display placards with nearby place names
2013-12-14 ~ Theo
- Code clean up
- Help info added to
- Read me file added to
- Numerous bug fixes: works in FF. Mouse OK
2013-12-13 ~ Theo
- R4 Added
- Name space added
- place names from external file
- More overlay map choices
- Code clean up
- Select zoom levels
- Help screen added