Howto:Create custom terrain: Difference between revisions

Jump to navigation Jump to search
Update to QGis 1.7.0, correct CRS settings, no conversion needed (!)
m (Robot: Cosmetic changes)
(Update to QGis 1.7.0, correct CRS settings, no conversion needed (!))
Line 42: Line 42:


* QGIS Download for Linux/OSX/Windows [http://www.qgis.org/en/download/current-software.html]
* QGIS Download for Linux/OSX/Windows [http://www.qgis.org/en/download/current-software.html]


The following is largely adapted from the [http://stattosoftware.com/flightgear/tutorial/index.html original QGIS scenery tutorial], which you may find of use.
The following is largely adapted from the [http://stattosoftware.com/flightgear/tutorial/index.html original QGIS scenery tutorial], which you may find of use.
Line 49: Line 48:
# Modify the filter to search for *.tif files.
# Modify the filter to search for *.tif files.
# Add the TIFF file you have just downloaded.
# Add the TIFF file you have just downloaded.
# Click on <tt>Layer > Add a new vector layer</tt> or on the corresponding icon. A dialog should pop up.
# Rightclick on the image in the layer sidebar and choose <tt>Set layer CRS</tt>, to select a projection model. This depends on the location of the area you're about to create. Look up your project's UTM coordinate through [http://upload.wikimedia.org/wikipedia/commons/e/ed/Utm-zones.jpg this image]. For Texel this is 31U, north of the equator, so we choose <tt>Projected Coordinate Systems > Universal Transverse Mercator (UTM) > WSG84 / UTM zone 31N</tt>. Always select 'WGS84', as that is the globe model used in FlightGear.
#* Make sure the file type is an ESRI Shapefile.  
# Click on <tt>Layer > New > New Shapefile Layer</tt> or on the corresponding icon. A dialog should pop up.
#* Make sure the vector type is set to polygon.  
## Make sure the vector type is set to polygon.  
#* You need to create a data column for this layer. Create a column called 'class'. Make sure it is a string column. Add it to the attribute list by selecting the Add Values Manually button. The 'OK' button should now be available for you to select. Select 'OK'.  
## Click the 'specify CRS' button, to select a projection model. This must be the same as we did for the tiff background image.
#* There should be a dialog box prompting you to save your vector layer. Save it in your scenery directory with your GeoTIFF. (This is not required but significantly helps organization.)  
## You need to create a data column for this layer. Create a new attribute called 'class'. Make sure it is a 'text data' (string) column. Add it to the attribute list.  
#* A projection box should pop up. Select 'WGS 1984'. After all, that is the globe model used in FlightGear.
## The 'OK' button should now be available for you to select. Select 'OK'.  
## There should be a dialog box prompting you to save your vector layer. Save it in your scenery directory with your GeoTIFF. (This is not required but significantly helps organization.)  
# Your vector layer should appear in the left-hand toolbar. You are ready to begin digitizing.
# Your vector layer should appear in the left-hand toolbar. You are ready to begin digitizing.
# Select the newly created layer in the layer list, toggle editing (<tt>Layer > Toggle Editing</tt>) and finally select Capture Polygon from the same menu/toolbar.
# Select the newly created layer in the layer list, toggle editing (<tt>Layer > Toggle Editing</tt>) and finally select Capture Polygon from the same menu/toolbar.
Line 71: Line 71:
# Click OK to save the snapping options.
# Click OK to save the snapping options.


==== Distinguishing Land Class Types from LANDSAT data ====
==== Distinguishing Land Class Types from LANDSAT data ====I
You may Google Maps or Yahoo Maps running alongside your program to see what is what on the black/white image, but most areas are recognizable without use of the software. If you need help determining what part of the black-and-white image, please currently refer to the [http://stattosoftware.com/flightgear/tutorial/index.html#distinguishing original Stattosoftware Scenery Tutorial]. Instead of determining in a single band image you can also combine different ETM+ bands in a RGB file. Some information about different band combinations can be found here [http://web.pdx.edu/~emch/ip1/bandcombinations.html].
You may Google Maps or Yahoo Maps running alongside your program to see what is what on the black/white image, but most areas are recognizable without use of the software. If you need help determining what part of the black-and-white image, please currently refer to the [http://stattosoftware.com/flightgear/tutorial/index.html#distinguishing original Stattosoftware Scenery Tutorial]. Instead of determining in a single band image you can also combine different ETM+ bands in a RGB file. Some information about different band combinations can be found here [http://web.pdx.edu/~emch/ip1/bandcombinations.html].


Line 82: Line 82:
# Do the same for all other classes.
# Do the same for all other classes.
# To make the difference between land and sea (landmass) we save the entiry shapefile (<tt>Layer > Save as Shapefile</tt>).
# To make the difference between land and sea (landmass) we save the entiry shapefile (<tt>Layer > Save as Shapefile</tt>).
We have been working with UTM coordinates so far. To generate scenery that can be used in FlightGear we need to convert the shapefiles to the latitude/longitude format.
* '''Windows'''
*# Download [http://www.forestpal.com/fgis.html fGIS] and install it as described.
*# Open an empty project and visit <tt>Utilities > Shapefile Projection Utility</tt>.
*# Look up your projects UTM coordinate through [http://upload.wikimedia.org/wikipedia/commons/e/ed/Utm-zones.jpg this image]. For Texel this is 31U, so we choose UTM31 in fGIS. If your project is located south of the equator, you tick the S box.
*# Set the Output Shapefile Project to <tt>Lat./Lon.</tt>.
*# Now click the Input Shapefile button to load the shapefile that we exported from QGIS.
*# Using the Output Shapefile button we decide where we want to store the lat/lon shapefile. This has to be a non-exisiting file, so remove before updating.
*# Click the Convert button.
*# Repeat this process for all shapefiles.


If you want to see these shapefiles integrated into the Custom Scenery database you can contact papillon81 and statto (through IRC or Forum). Please be remembered that your data has to be derived from freely available (public domain) sources. Other material can not be integrated due to legal issues.
If you want to see these shapefiles integrated into the Custom Scenery database you can contact papillon81 and statto (through IRC or Forum). Please be remembered that your data has to be derived from freely available (public domain) sources. Other material can not be integrated due to legal issues.

Navigation menu