diff --git a/Creating-shape-files-in-QGIS-for-map-data.md b/Creating-shape-files-in-QGIS-for-map-data.md index f39aae6..c42746d 100644 --- a/Creating-shape-files-in-QGIS-for-map-data.md +++ b/Creating-shape-files-in-QGIS-for-map-data.md @@ -52,7 +52,11 @@ Make sure you use the project CRS (projection) and that it is a polygon. Also ma ## 3) Oceans -For the ocean I downloaded the OSM Ocean Polygon files (source https://osmdata.openstreetmap.de/data/water-polygons.html). These are WGS84-projected chunks of ocean. Select all the vector objects that are relevant to the map, and use the Vector->Geoprocessing->Dissolve command to merge the cells into one object. This will output a new temporary layer (can be slow to do). This layer we can now save and reproject it to the relevant UTM projection, like UTM 21S for the Falklands map. Be sure to reproject only after dissolve or you will potentially get gaps in the ocean file. + +### 3.1 Getting the source data and processing it +For the ocean I downloaded the OSM Ocean Polygon files (source https://osmdata.openstreetmap.de/data/water-polygons.html). These are WGS84-projected chunks of ocean. Select all the vector objects that are relevant to the map, and use the Vector->Geoprocessing->Dissolve command to merge the cells into one object. This will output a new temporary layer (can be slow to do). This layer we can now save and reproject it to the relevant UTM projection, like UTM 21S for the Falklands map. Right click on the temporary output layer and select Export -> Save Feature As... Be sure to reproject only after dissolve or you will potentially get gaps in the ocean file. +![image](https://user-images.githubusercontent.com/20801481/202793894-95c1c32e-fc72-4edf-ac21-1f0be10f1016.png) + Once you have the ocean file dissolved and projected to the correct UTM projection you can clip it to the game area overlay (Vector -> Geoprocessing -> Clip). @@ -60,13 +64,72 @@ Once you have the ocean file dissolved and projected to the correct UTM projecti Once again this is saved as a temporary file which you now can save to disk. +### 3.2 Generating Liberation-usable land and sea data. The final step is now to generate the land mass for Liberation as well as the actual ocean. Remember, we want to keep this data as lightweight as possible so we will first simplify the data. Use Vector->Geometry tools->Simplify and try different values ![Simplify](https://user-images.githubusercontent.com/20801481/191523064-c2a99d11-6e8e-4006-9e90-d4fd17fbce98.JPG) A tolerance value of 250 is probably fine at this stage but you can go more aggressive if you want to. -After we simplified the data now is the time to generate land data and ocean data. To make sure we get some margins so you cant accidentally move the carrier right to the beach or spawn units in the sea I want to use a buffer zone from the shore inland for the land map and a buffer zone from the shore out towards the sea. In the South Atlantic map I elected for a 750m buffer inland and a 1500m buffer out to sea. The 1500m buffer out to sea means a lot of the smaller sounds and bays will be eliminated, further simplifying our data. +After we simplified the data now is the time to generate land data and ocean data. We will use the basic, simplified ocean to generate both the land and sea area. To make sure we get some margins so you cant accidentally move the carrier right to the beach or spawn units in the sea I want to use a buffer zone from the shore inland for the land map and a buffer zone from the shore out towards the sea. In the South Atlantic map I elected for a 750m buffer inland and a 1500m buffer out to sea. The 1500m buffer out to sea means a lot of the smaller sounds and bays will be eliminated, further simplifying our data. ![Buffer](https://user-images.githubusercontent.com/20801481/191524446-24c970f2-21da-4127-90eb-320d7e5b47f8.JPG) +![image](https://user-images.githubusercontent.com/20801481/202790839-50c00420-ba95-484c-b680-f7dfa6308dee.png) +Here we can see our ocean that is buffered outwards from the shore 1500m + +To actually get land area as opposed to a sea that reaches inland 750m we need to use the difference command (Vector -> Geoprocessing -> Difference) +![image](https://user-images.githubusercontent.com/20801481/202793193-1f9c069a-6f59-43b3-8d1c-eb1ebb2d5be0.png) + +Make sure you have the Game area as input layer and the buffered sea as overlay. + +You should now have something like this: + +![image](https://user-images.githubusercontent.com/20801481/202793331-76950224-4a3e-4326-9de6-cc371a3e72ed.png) + +**Congratulations, you now have the land and sea data!** + +## 4. Exclusion data +Naturally, not all of the landmass is suitable to have warring armies on them. We should at least make lakes and rivers off-limits, and big cities too. We need to get source data to work with, process this data to make it as light-weight as possible. + +### 4.1 Downloading OSM vector source data +From the link below you can find collections of OSM source data that you can download and add to your QGIS project. +https://download.geofabrik.de/index.html + +The easiest way is to download the SHP files for individual countries. In this case I downloaded Argentina and Chile and added the layers I thought necessary to the map: water, waterways and landuse. + +### 4.1.1 Processing the data + +Once we have all the files, we need to do the following: +* Resave the files in proper projection +* Clip the files to only encompass the game area +* Simplify the data +* Buffer lakes and rivers slightly + +This can be done using the same techniques we learned in section 3. + +### 4.2 Downloading DEM data for slope analysis. +This step is potentially optional, but if the map contains many mountains and steep terrain like the South Atlantic map does it can be worthwhile to do. + +https://search.earthdata.nasa.gov/search/granules?p=C1546314043-LPDAAC_ECS&pg[0][v]=f&pg[0][gsk]=-start_date&q=nasadem&sb[0]=-71.22656%2C-51.47764%2C-68.23828%2C-49.30728&tl=1662388101!3!!&lat=-50.901136037047934&long=-73.1337890625&zoom=6 + +We will NASAs EarthDataSearch portal to find DEM data. I have used the NASADEM Merged DEM Global 1 arc second V001 dataset since it is reasonably high-resolution and free to use. You will need to register for the service, log-in, search the site for the correct dataset, and then draw an outline of the area you want to create a download link. + +![image](https://user-images.githubusercontent.com/20801481/202798042-3b9a1d61-1b6a-47ea-9539-411ccb41c9e6.png) + +### 4.2.1 Processing the DEM files. +To make editing easier, you will want to merge all your cells into one file using Raster->Miscellaneous->Merge. It can still be useful to retain one or two cells for testing commands on a smaller dataset so you are sure you get what you want. + +Now that we have the DEM file, we need to visualize the data. At this point, you should probably have an instance of DCS open so you can cross-reference the ingame view to better judge what slopes are fine and what are excessive. + +We will use the Raster -> Analysis -> Slope tool to make a slope map + +![image](https://user-images.githubusercontent.com/20801481/202802845-300c2cac-2009-4e01-a3c4-0fccbe6f474e.png) + +The slope mape can be visualized by right clicking on the layer and selecting properties, and selecting the Symbology tab. Here we will select "Singleband Pseudocolor" and play around with the values to find what slope value should be the cutoff, values above which are considered impassable. + +![image](https://user-images.githubusercontent.com/20801481/202803476-32ca60dc-2d30-40e1-a88d-078f89e67b0c.png) + +![image](https://user-images.githubusercontent.com/20801481/202803996-38d2dd8b-4daf-4d3d-82fb-0e04defe0151.png) + +By zooming out and changing color palettes and values of various colors you can probably find a value that seems reasonable. In the image above the red-value areas are probably bad for ground units while the other colors are passable.