User:D-ECHO/Canada Land Cover
The Government of Canada publishes a Landsat-based vector landcover product (Land Cover Canada/LCC2000-V) on their Open Government website. The following guide explains how to use this data to make custom scenery for FlightGear.
License Note
Note Please note that the author of this guide is no law professional and thus the following is only a subjective interpretation of the information. |
The website states that the data is available under the Open Government License - Canada, available here. This license, in my interpretation, allows to use the data for a scenery later released under the GPL v2+, as long as you Acknowledge the source of the Information by including any attribution statement specified by the Information Provider(s) and, where possible, provide a link to this licence.[1]. Furthermore, it states that the statement Contains information licensed under the Open Government Licence – Canada. shall be used, when there is no specific attribution statement given.[2]. Given that I couldn't find any specific attribution statement on the product's website, I use the following statement in the scenery's README.md files in order to comply with the license requirements:
Following sources have been used:
(...)
* Landcover Data from Canadian Land Cover, Circa 2000 (Vector) - GeoBase Series, 1996-2005
available under: https://open.canada.ca/data/en/dataset/97126362-5a85-4fe0-9dc2-915464cfdbb7
released under the Open Government License - Canada (https://open.canada.ca/en/open-government-licence-canada)
Contains information licensed under the Open Government Licence – Canada.
Obtaining
In order to download the data for the area of your interest, you need to find the index for said tile. The best way for this, in my experience, is to use the Index of available files available as a .kmz file to use in Google Earth. There you can see the index to download from [3] as well as get the direct download link by clicking on the tile you want. The data comes in .zip files that need to be extracted before further use.
Processing
Splitting the shapefile
Before being able to run ogr-decode on the data, the one big shapefile that comes as the download needs to be split into the different features (Town, Heath, Farmland etc.). The catalog gives a good overview of the features along with their codes. The following, used as a linux shell script, will automatically create the required folders and split the main shapefile.
Note This script still has potential for improvement, the catalog can help in identifying features and trying to find the best FlightGear equivalent. |
mkdir lcc_water lcc_barrencover lcc_glacier lcc_rock lcc_developed lcc_heath lcc_scrub lcc_wetland lcc_herb lcc_grassland lcc_mixedcrop lcc_drycrop lcc_pasture lcc_deciduousforest lcc_evergreenforest lcc_mixedforest
for i in *.shp; do
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '20'" lcc_water/lcc_water_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '30'" lcc_barrencover/lcc_barrencover_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '31'" lcc_glacier/lcc_glacier_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '32'" lcc_rock/lcc_rock_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '33'" lcc_barrencover/lcc_exposed_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '34'" lcc_developed/lcc_developed_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '35' OR COVTYPE = '36' OR COVTYPE = '37'" lcc_barrencover/lcc_sparseveg_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '40'" lcc_heath/lcc_bryoids_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE BETWEEN '50' AND '53'" lcc_scrub/lcc_scrub_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE BETWEEN '80' AND '82'" lcc_wetland/wetland_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '83' OR COVTYPE BETWEEN '100' AND '104'" lcc_herb/lcc_herb_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '110'" lcc_grassland/lcc_grassland_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '120'" lcc_mixedcrop/lcc_mixedcrop_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '121'" lcc_drycrop/lcc_drycrop_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '122'" lcc_pasture/lcc_pasture_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE = '200' OR COVTYPE BETWEEN '220' AND '223'" lcc_deciduousforest/lcc_deciduousforest_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE BETWEEN '210' AND '213'" lcc_evergreenforest/lcc_evergreenforest_$i.shp $i
ogr2ogr -f "ESRI Shapefile" -where "COVTYPE BETWEEN '230' AND '233'" lcc_mixedforest/lcc_mixedforest_$i.shp $i
done
Note This script assumes that there are only Canada Land Cover type .shp files in the folder it is executed in. |
Decoding the shapefiles
Assuming you have used the above script, the following processes the split shapefiles using ogr-decode:
ogr-decode --all-threads --max-segment 500 --area-type Town work/Town lcc_developed
ogr-decode --all-threads --max-segment 500 --area-type Pasture work/Pasture lcc_pasture
ogr-decode --all-threads --max-segment 500 --area-type MixedCrop work/MixedCrop lcc_mixedcrop
ogr-decode --all-threads --max-segment 500 --area-type MixedCrop work/MixedCrop lcc_drycrop
ogr-decode --all-threads --max-segment 500 --area-type DeciduousForest work/DeciduousForest lcc_deciduousforest
ogr-decode --all-threads --max-segment 500 --area-type EvergreenForest work/EvergreenForest lcc_evergreenforest
ogr-decode --all-threads --max-segment 500 --area-type MixedForest work/MixedForest lcc_mixedforest
ogr-decode --all-threads --max-segment 500 --area-type Grassland work/Grassland lcc_grassland
ogr-decode --all-threads --max-segment 500 --area-type Heath work/Heath lcc_heath
ogr-decode --all-threads --max-segment 500 --area-type Scrub work/Scrub lcc_scrub
ogr-decode --all-threads --max-segment 500 --area-type Rock work/Rock lcc_rock
ogr-decode --all-threads --max-segment 500 --area-type BarrenCover work/BarrenCover lcc_barrencover
ogr-decode --all-threads --max-segment 500 --area-type Glacier work/Glacier lcc_glacier
ogr-decode --all-threads --max-segment 500 --area-type Marsh work/Marsh lcc_wetland
ogr-decode --all-threads --max-segment 500 --area-type Lake work/Lake lcc_water
ogr-decode --all-threads --max-segment 500 --area-type HerbTundra work/HerbTundra lcc_herb
Afterwards you can run tg-construct as normal.
Suggested additional data
Given the high accuracy of OSM Coastline data as well as the lack of linear features in Canada Land Cover data, the following features should be additionally used from OpenStreetMap:
- Default ( OSM Landmass, either from OSM Data Land Polygons or extracted from your area's openstreetmap file with the tag natural=coastline/place=island/place=islet )
- Roads
- Rivers/Streams
Additionally, as Land Cover Canada is very unspecific about developed areas (there is only 33 Exposed Land and 34 Developed), you might want to use OSM data for
- Residential Areas
- Commercial Areas
- Industrial Areas
- Transportation Areas (railway, ports)
- Mines
- Landfills
depending on the quality of OSM coverage in your region of interest
LCC to FlightGear mapping
This table shows which area codes and descriptions are mapped to which material names in FlightGear. It is basically a condensed version of the information in the above scripts as well as the code descriptions from the catalog PDF file. Bold Material names are used by the scripts above.
Code | Description [3] | FlightGear Material |
---|---|---|
0 / 10 / 11 / 12 | Unusable (Feature Catalog describes it as Unclassified, Cloud or Shadow) | none (could be used as Default in case OSM Coastline isn't used) |
20 | Water | InlandWater / Lake |
30 | Barren | BarrenCover |
31 | Snow and Ice | Glacier |
32 | Rock and Rubble | Rock |
33 | Exposed Land | BarrenCover [4] |
34 | Developed | Town [5] |
35 - 37 | Sparse Vegetation | BarrenCover [6] |
40 | Bryoids | Heath |
50 - 53 | Shrubland | Scrub |
80 - 82 | Wetland | Marsh |
83, 100 - 104 | Herbs | HerbTundra |
110 | Grassland | Grassland |
120 | Cropland | MixedCrop |
121 | Annual Cropland | DryCrop |
122 | Pastures | Pasture |
200 | Forest | DeciduousForest |
210 - 213 | Coniferous Forest | EvergreenForest |
220 - 223 | Deciduous Forest | DeciduousForest |
230 - 233 | Mixed Forest | MixedForest |
- ↑ [1]
- ↑ [2]
- ↑ Feature Catalog
- ↑ The feature catalog describes a variety of possible land uses or covers, including burned and parking areas
- ↑ The feature catalog describes a variety of possible land uses or covers, including roads, urban areas and mines
- ↑ I couldn't really find a well matching material, suggestions are welcome.