754
edits
Line 33: | Line 33: | ||
Choose RASTER data, which will download a geo-referenced TIF image. | Choose RASTER data, which will download a geo-referenced TIF image. | ||
Note that the mapping from landcover to materials is performed in Materials/base/landclass-mapping.xml, and currently only maps CORINE raster landclasses. If you have another landcover source (e.g. the US NLCD | Note that the mapping from landcover to materials is performed in Materials/base/landclass-mapping.xml, and currently only maps CORINE raster landclasses. If you have another landcover source (e.g. the US NLCD), you will need to use your GIS (Grass, QGIS) to convert them such that the raster uses the correct landclass indexes. | ||
=== Using Vector Data === | |||
If you wish to create higher resolution scenery, you may need to convert from vector data. | |||
Key points: | |||
* Open the Attribute Table | * If required, re-project to WGS84. Ensure you project and layer are in the same projection. | ||
* Create a new field (c_index) with type int | * Map the vector polygons to have the correct landclass. In QGIS, you can do this as follows: | ||
* Open the field calculator the update the new field (c_index) using a calculation that maps from the landclass fields in your data. For CORINE vector data this is the c18 field. An example is below, and some mappings are available [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ws30/mappings/ here]: | ** Open the Attribute Table | ||
** Create a new field (c_index) with type int | |||
** Open the field calculator the update the new field (c_index) using a calculation that maps from the landclass fields in your data. For CORINE vector data this is the c18 field. An example is below, and some mappings are available [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ws30/mappings/ here]: | |||
<syntaxhighlight> | <syntaxhighlight> | ||
CASE | CASE | ||
Line 54: | Line 59: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Use a rasterize command to create a raster: | |||
* Use a rasterize command to create a raster: | |||
gdal_rasterize -l CORINE_Modified_WGS84 -a Landclass -ts 35000.0 33300.0 -a_nodata 48.0 -te 3.0 51.0 8.0 54.0 -ot Byte -of GTiff -co COMPRESS=NONE -co BIGTIFF=IF_NEEDED /home/stuart/FlightGear/VPB/data/Modified/CORINE_Modified_WGS84.gpkg /home/stuart/FlightGear/VPB/data/10m/Netherlands2.tif | gdal_rasterize -l CORINE_Modified_WGS84 -a Landclass -ts 35000.0 33300.0 -a_nodata 48.0 -te 3.0 51.0 8.0 54.0 -ot Byte -of GTiff -co COMPRESS=NONE -co BIGTIFF=IF_NEEDED /home/stuart/FlightGear/VPB/data/Modified/CORINE_Modified_WGS84.gpkg /home/stuart/FlightGear/VPB/data/10m/Netherlands2.tif |