Difference between revisions of "Sirvard Nshanyan"
m |
|||
(One intermediate revision by one user not shown) | |||
Line 23: | Line 23: | ||
− | <h3> Getting the | + | <h3> Getting the data </h3> |
There are several servers, where geographic data can be requested from. A whole slue of them can be found at http://www.globalmapper.com/index_data.html. | There are several servers, where geographic data can be requested from. A whole slue of them can be found at http://www.globalmapper.com/index_data.html. | ||
http://casil.ucdavis.edu/casil/imageryBaseMapsLandCover/imagery/urban_imagery/0.3meter_urban_area/overflights/san_diego/ can be referred to alternatively for getting texture information in San Diego area (trace the link up by directories for more download options of other areas within the U.S.). The problem with this source, however, is that one cannot arbitrarily specify an area on the map, but will have to suffice by the preexisting data files. | http://casil.ucdavis.edu/casil/imageryBaseMapsLandCover/imagery/urban_imagery/0.3meter_urban_area/overflights/san_diego/ can be referred to alternatively for getting texture information in San Diego area (trace the link up by directories for more download options of other areas within the U.S.). The problem with this source, however, is that one cannot arbitrarily specify an area on the map, but will have to suffice by the preexisting data files. | ||
Line 59: | Line 59: | ||
− | <h3> From 2D -> 3D </h3> | + | <h3> From 2D -> 3D and up on the wall </h3> |
run: | run: | ||
Line 67: | Line 67: | ||
''osgviewer filename'' - run this to view the generated .osga file | ''osgviewer filename'' - run this to view the generated .osga file | ||
+ | |||
+ | |||
+ | To load the .osga file into covise, the file needs to be included in: | ||
+ | |||
+ | covise/config/ivl.xml -> under <Image><Files> <nameInPluginsList value="filename" /> </Files></Image> | ||
+ | |||
Line 104: | Line 110: | ||
~/plugins/Image/Image.txt | ~/plugins/Image/Image.txt | ||
osgdem --help | osgdem --help | ||
− | |||
− | |||
− | |||
− | |||
− | |||
* osgdem is located at /home/covise/covise/extern_libs/src/VirtualPlanetBuilder/bin | * osgdem is located at /home/covise/covise/extern_libs/src/VirtualPlanetBuilder/bin | ||
* ivl.xml is a lab specific config. file | * ivl.xml is a lab specific config. file | ||
* sand.xml is a machine specific config. file | * sand.xml is a machine specific config. file |
Latest revision as of 03:13, 13 April 2009
Contents |
A Comprehensive Guide to 3D GIS Data Visualisation in Covise
The aim of this project is to combine 2 dimensional texture information obtained from GIS sources with height/elevation map creating a 3D visualization. The final product can be of arbitrary resolution, and given high resolution data map, it can make a nifty environment easily navigable on a large real estate provided by a tiled display wall.
In order to achieve this, some rudimentary knowledge of GIS data formatting and various data sampling/representation techniques is essential. Some assisting vocabulary that can be further exploited through links from http://en.wikipedia.org/wiki/Geodetic_system
Geodetic system - used to translate positions on products (navigation, geodesy, cartography, satellite navigation systems) to their real positions on Earth. ~Coordinate systems
- WGS 84/ 72/ 64/ 60 - world geodetic system - used by GPS, differs from Greenwich by ~112m (OSGB36)
- NAD 27/ 83 - north american datum (very similar to WGS 84)
- OSGB36 - ordinance survey of great britain
- ED50 - european datum - military system, used by NATO
- The Universal Transverse Mercator (UTM) and Universal Polar Stereographic (UPS) coordinate systems both use a metric-based cartesian grid laid out on a conformally projected surface to locate positions on the surface of the Earth. The UTM system is not a single map projection but a series of map projections, one for each of sixty zones. The UPS system is used for the polar regions, which are not covered by the UTM system. (http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system)
geodesy - deals with measurement and representation of the earth including its gravitational field in a 3d time-varying space datum - a set of reference points/surface on the earth's surface against which position measurements are made and often an associated model of the shape of the earth (ellipsoid) to define a geographic coordinate system. 2) reference point/surface/axis on an object against which measurements are made -> horizontal datums - used to describe a point of earth's surface in lat./long. or other coordinate system (NAD27/83, WGS84) -> vertical datums - elevations or depths
Specifics on the elevation data encoding can be found at http://data.geocomm.com/sdts/fs04000.pdf
Getting the data
There are several servers, where geographic data can be requested from. A whole slue of them can be found at http://www.globalmapper.com/index_data.html. http://casil.ucdavis.edu/casil/imageryBaseMapsLandCover/imagery/urban_imagery/0.3meter_urban_area/overflights/san_diego/ can be referred to alternatively for getting texture information in San Diego area (trace the link up by directories for more download options of other areas within the U.S.). The problem with this source, however, is that one cannot arbitrarily specify an area on the map, but will have to suffice by the preexisting data files.
However, for the purposes of both ease/consistency (in terms of getting all info needed from the same place) and free of charge service, I used the USGS (United States Geological Survey) seamless server for my downloads. A sample data request looks like this -> http://extract.cr.usgs.gov/Website/distreq/RequestSummary.jsp?AL=33.44244,33.428832,-117.60239,-117.61862&CS=250&PR=0&MD=CD&PL=F0F02HZ,ND302HZ,ND902HZ,OSD02HZ
1. Go to http://seamless.usgs.gov/website/seamless/viewer.htm 2. Under Downloads, click "Define Download Area by Coordinates". 3. Select "Modify Download Request". 4. Select "National Elevation Dataset (NED) 1/9 Arc Second" and "Orthoimagery - San Diego County, CA - 0.3048m Color Jan 2006"
The easiest way to get the coordinates of an area for step 2 is through Google Earth. Just zoom into the area of interest on the globe and set placemarks at the edges of that area. The latitude/longitude values, then, can be obtained by right clicking on the placemark. The super-awesome Google Earth also has a 'measure', which helps to see how big the selected area is. The coordinates to be entered at "Define Download Area by Coordinates" menu are those corresponding to the top left and bottom right of the marks of the selected area.
Step 3 can be eliminated by making the selections of the desired datasets at the right of the map on the main screen, before going to step 2.
Example: For UCSD campus the coordinates are:
- Latitude from 32deg 51' 33" N (south end) to 32deg 53' 12" N (north end)
- Longitude from 117deg 13' 22" W (east end) to 117deg 15' 18" W (west end)
Pixel-file size relationship A pixel is misconstrued as a bit in many tech issues.. 8 bits to a byte in real data, However, to show a pixel in any color on an LCD it takes 3 dots (RGB) and each dot requires 256 levels of intensity which takes a byte each to represent that. So , not mixing bits with pixels is very important. To represent a pixel on an LCD in 24 bit resolution, requires 3 bytes of data, or 24 bits, or 3 dots in a triangle. depending on the resolution, there are probably 24 or 32 bits per pixel but could be more or less. If it is 24bit, then that is three bytes per pixel. if you have 7168 bytes, then you have about 2390 pixels. Not even a mega pixel is seems. You have about .002 megapixels.
Output format: GeoTIFF (http://cropwiki.irri.org/everest/index.php/GeoTiff)
The server will offer two images to download for orthoimagery, because the area selected covers two stored tiles. Use gdal_merge.py to merge the two images. Documentation for it is at http://www.gdal.org/gdal_merge.html
The merge tool itself is at /home/covise/covise/extern_libs/src/gdal-1.6.0/swig/python/scripts/
Once the files are downloaded, the texture map can be easily viewed by either double clicking on the icon, or using either one of these command line utilities - 'display filename (part of imagemagik), 'gimp filename. However, for viewing the elevation map, there are no existing software on the gneiss server; but this can be achieved by installing a free/trial copy of Global Mapper (http://www.globalmapper.com/) and opening the file there.
From 2D -> 3D and up on the wall
run: osgdem --xx 10 --yy 10 -t texture.tif --xx 10 --yy 10 -d height.tif -l 4 -v 0.1 -o whatever.ive -a terrain.osga
Details found at http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem.
osgviewer filename - run this to view the generated .osga file
To load the .osga file into covise, the file needs to be included in:
covise/config/ivl.xml -> under <Image><Files> <nameInPluginsList value="filename" /> </Files></Image>
Useful command line tools for getting details on files
- identify - ImageMagik utility
- look at .prj file included in the downloaded folder from the USGS seamless server - vim filename
- gdalinfo
http://www.gdal.org/gdalwarp.html - gdalwarp can be used for reprojecting the data in one set into another coordinate platform (ex. UTM -> geographic data). Reference - http://www.msh-tools.com/rep3d.html
other tools from gdal tool library as needed (http://www.gdal.org/gdal_utilities.html).
Other sources used:
- http://www.wikipedia.com - extensively
- http://www.fgdc.gov/usng/index.html
- http://www.uscg.mil/hq/cg5/cg534/nsarc/Georeferencing_info.asp
- http://seamless.usgs.gov/faq/highres_faq.php
- http://casil.ucdavis.edu/pages/data.html
- http://fidnet.com/~jlmoore/usng/ - display of utm regions
In order to convert .tff -> .osga, run:
osgdem --xx 10 --yy 10 -t filename.tif -l 3 -a archiveName.osga
For NTF files do:
osgdem --xx 10 --yy 10 -t texture.ntf --xx 10 --yy 10 -d elevation.tif -l 4 -o filename.ive -a terrain.osga
For more information, refer to:
http://virtualplanetbuilder.osgforge.org/ http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem ~/plugins/Image/Image.txt osgdem --help
- osgdem is located at /home/covise/covise/extern_libs/src/VirtualPlanetBuilder/bin
- ivl.xml is a lab specific config. file
- sand.xml is a machine specific config. file