The document provides guidance for a project to implement 3D visualization and analysis tools in an open source web GIS. It outlines objectives to render local terrain data and 3D building models in a web GIS, and develop 3D analysis tools. It describes related work in terrain visualization and 3D city models. Methods discussed include using SRTM data to create terrain tiles, developing techniques to dynamically render 3D building models, and algorithms for terrain profiling and viewshed analysis. The results demonstrate terrain and 3D models rendered on a local server and profile/viewshed tools. Limitations and potential for future work are also discussed.
3. To implement method to render local terrain data
on server side to be made 3D visualisable in
Open Source Web GIS at client side.
To develop a method to visualise 3D models of
built structures in Open Source Web GIS
dynamically, hierarchically and with speedy
rendering.
To develop 3D GIS analysis tools for Open Source
Web GIS.
3
5. Related Work:
STK-terrain[1] service is provided by Analytical Graphics
Inc. which uses a combination of multiple sources like
NED, EU-DEM, USGS-SRTM, CGIAR-SRTM and GTOPO30.
3D CityDB webclient[2] facilitates interactive 3D
visualization and exploration of large semantic 3D city
models.
Geocontext Profiler[3] which is an online resource which
allows to make topographic profiles anywhere on Earth in
the seabed and ocean floor. Various scientific graphs are
available such as Median line, Trend Line, First fresnal
zone, etc.
5
10. SRTM 90m DEM download
◦ Geotiff files downloaded in tiled form for entire globe from
http://www.cgiar-csi.org/data/srtm-90m-digital-elevation-
database-v4-1
◦ Compressed files with total size accounting to around 57 GB
Mosaic operation
◦ All the uncompressed tiles of Geotiff DEM files were mosaiced using
“Mosaic Images” tool
◦ The final size of the mosaiced global DEM Geotiff file was around 125
GB
Create Image Pyramid using gdal
◦ Using gdal_retile[4] tool image pyramid was created with parameters:
Resampling method: Bilinear
Levels: 6
Pixel Size: 1024 x 1024
◦ Total tiled image accounting to size of around 154 GB
10
11. Geotifftranslate Utility
This utility is included in the GTP[5] plugin and was used to convert
“int16 grayscale” images to “int8 RGB” geotiff images from the image
pyramid.
Used GeoserverTerrainProvider(GTP) javascript plugin
Cesium Terrain Provider (javascript)
11
Fig. Image Pyramid Layer of RGB DEM in Geoserver
17. 17
Class Limits Colour
Class 1 36.38m < Building ht.<= 172m
and Footprint area > 150sq.m,
Dark Orange
Class 2 21.58m < Building ht.<=36.38m
and Footprint area > 150sq.m
Orange
Class 3 9.85m < Building ht <= 21.58m
and Footprint area
Green
Class 4 Building height <= 9.85m and
Footprint area > 150sq.m,
Dark Green
Table. Classification of 3D building models
18. 18
Level Camera Altitude Classes included
Level 1 2000m < Camera Height<= 5000m Class 1
Level 2 1000m < Camera Height<= 2000m Class 2
Level 3 Camera Height<=1000m Class 3 and Class 4
Table. Hierarchy of 3D building models
23. Algorithm used in the QGIS plugin “Viewshed Analysis”[7]:
1. Parameters used are:
i. Observation point location
ii. Observer height
iii. Target height
iv. Viewshed Radius
v. Earth Curvature (Boolean) - optional
vi. Atmospheric refraction - optional
2. The perimeter pixel positions of the viewshed area are identified.
3. The target pixels’ positions are stored in a matrix.
4. Rays are casted from centre of viewpoint pixel to the pixels on the
perimeter.
5. Based on angle calculations, visibility is decided for each pixel in
binary and a visibility matrix is created.
6. Based on this visibility matrix, Binary Viewshed Raster is created.
23
25. Sr. No. Type Software
1 Servers Apache Tomcat, Web Server in
Bhuvan, XAMPP Apache during
development, Geoserver
2 Database PostgreSQL 9.1 + PostGIS 2.0
3 Libraries Cesium-1.20 javascript lib.,
GDAL and OGR python libs.
4 Programming Languages Javascript, PHP, HTML, Python,
cURL
5 Packages QGIS Essen
6 OS Windows-7 64-bit used for
development
25
Fig. List of software used while development
31. 31
Fig. Level 1 of 3D models
2000m < Camera Ht. <= 5000m
Fig. Level 2 of 3D models
1000m < Camera Ht. <= 2000m
Fig. Level 1 of 3D models
Camera Ht. <= 1000m
41. Choice of DEM used for terrain data is merely
experimental and updating DEM source is on the
roadmap.
High res. of DEM will need more number of levels
to be created in image pyramid which in turn
asks for more tiles to be transferred from server.
Performance of terrain loading depends on the
web service used such as WMS, WMTS, TMS etc.
Terrain Profile will be accurate if process is
initiated after the terrain tiles are loaded.
41
42. 42
Property Open Source 3D
Terrain Profile
Geocontext Terrain
Profile
Sampling
Distance
> (Total Dist./5000) (Total Dist./512)
Selection of
points
By mouse click only Mouse click, KML or GPX
import
Path
Visualization
3D 2D
Other Scientific
Graphs
NA Median line, Trend line
and First Fresnal Zone.
Elevation for
Oceanic region
NA Seabed
Table. Comparison of Geocontext Profiler and Developed Open Source 3D Terrain Profile
43. Zonal Statistics was performed on the
building footprints shapefile to get elevation
data for each building. But the models are not
exactly seated on the terrain. This
observation points to two possible reasons.
◦ The draping of terrain is not occurring accurately
due to either ambiguity in GeoserverTerrainProvider
or rendering process of Cesium itself OR
◦ There is some issue with the parsing of CZML
scripts in Cesium
43
44. 44
Fig. Floating models even after using elevation used by performing
Zonal Statistics on the polygon shapefile
45. All the proposed methods have been successfully implemented.
3 out of the 4 proposed methods are being used by Bhuvan 3D platform and the
4th method is also on the verge of being applied.
Except the Terrain rendering method, other 3 methods are genuinely created with
no such implementation found anywhere else during research.
The implemented system can be further modified to include more analysis tools
like analysis of 3D models (proximity, volume, etc.), solar potential mapping,
cumulative viewshed, etc.
Since the applications developed with the use of Cesium library heavily use
graphics, both client and server side processing amount should be balanced.
There is need of better standardization of 3D models’ data types and modeling
methods so that cross-platform compatibility could be achieved.
45
46. 1. STK world terrain (http://cesiumjs.org/data-and-assets/terrain/stk-world-terrain.html)
2. Cloud-based 3D Web Client based on 3D City Database: By Chair of Geoinformatics, Technische Universität
München.(http://www.3dcitydb.net/3dcitydb/fileadmin/3DWebClient/index.html)
3. Geocontext Profiler (http://www.geocontext.org/publ/2010/04/profiler/en/)
4. gdal_retile (http://www.gdal.org/gdal_retile.html)
5. Geoserver Terrain Provider plugin https://github.com/kaktus40/Cesium-GeoserverTerrainProvider
6. QGIS Plugin “Viewshed Analysis algorithm ” http://hub.qgis.org/wiki/viewshed/Algorithm
7. CZML data format https://github.com/AnalyticalGraphicsInc/cesium/wiki/CZML-Structure
46
-STK(Systems Tool Kit), NED(National Elevation Dataset), CGIAR(Consultative Group on International Agricultural Research)
-
-Resampling
-Total distance in 1st step so that minimum sampling dist. Can be calculated
-Bresenham circle
Earth curvature and light refraction
Similar to other viewshed algorithms available, it is possible to account for effects of the Earth’s curvature and refraction of the light when travelling through the atmosphere. Following formula is used to adjust height values in the DEM:
z adjusted = z DEM – (Dist 2 / Diam Earth ) * (1 – Refraction)
Where:Dist: The planimetric distance between the observation point and the target point.Refraction: The refractivity coefficient of light (normally it has the opposite, but smaller, effect than the curvature).Diam: The diameter of the earth that is calculated as Semi-major axis + Semi-minor axis. These values are taken from the projection system assigned to the Raster by QGIS. In case of error or unrealistic values, the default Semi-major axis of 6378137 meters and flattening of 298.257 are used.
Viewshed procedure
1) select observation point
2) Give parameters: Radius, Observer ht, target ht
3) Find the corresponding tile for selected obs pt
4) on the fly create a mosiac of surrounding 8 tiles using gdal tools
5) Restricing max radius to 90km, create binary viewshed and polygonised shapefile using customized python.
6) Automatically create layer in geoserver
7) Render on Cesium globe using WebMapServiceImageryProvider