The International Simutrans Forum

 

Author Topic: Netherlands (2146x2180) and discussion of better map-making methods  (Read 1123 times)

0 Members and 1 Guest are viewing this topic.

Offline Carl

  • Devotee
  • *
  • Posts: 1682
    • Website
  • Languages: EN
Making heightmaps for Simutrans isn't as popular as it used to be, if this board is anything to go by. But here's a new heightmap of the Netherlands which I produced using QGIS. I did this as a proof of concept for making heightmaps in a different/better way. Below I've described how it's different from other methods and the data I used.

Download it here: https://www.dropbox.com/s/kch2acm6uk6gv61/NL.ppm?dl=0



I've been using GIS software for work a lot over the last few years, and thinking recently about how to apply some of the methods to Simutrans. Here I've used the free software QGIS which is easy to get to grips with.

Many heightmap-creation methods use Digital Elevation Model (DEM) data like SRTM as a starting point. Here I've combined SRTM with other geographical data to produce a more detailed result. SRTM is great for getting the profile of mountains, but it's less good for flat and low-lying areas. In the Netherlands, for example, much of the land is below sea level - as shown by the pink areas on the image below.



So SRTM alone won't always produce a good heightmap of coastal areas - at least, a lot of post-processing will be needed. To get around this I've used extra geographical data to plug the gap. The European Environment Agency has boundary data for the European coastline that looks like this when you load it into QGIS:



This is just a flat polygon, so while it gives us an accurate land/sea divide, it won't give us the terrain elevation. So we combine this with SRTM using the styling options in QGIS. All areas with a terrain elevation below a certain threshold on the SRTM layer (say 50 metres) are set to transparent - meaning that none of the erroneous below sea level data shows up:



The colours on the above image are just for demonstration. Everything shown  in grey is being provided by the coastline boundary datafile. The other colours are being provided by SRTM. We can set the colours of each layer and each elevation step as we like, and tinker with the elevation thresholds, to eventually end up with something like the image below. All of these colours are Simutrans-ready except for the sea.



We don't have to stop here. Geographical data is also available for other natural features like rivers and lakes. Simple ones are available here. I got a more detailed one in the 'Netherlands natural features' data file here. This has a lot of features, not just water, but once you filter to features with the type 'river' or 'riverbank' it looks like this:



I remember spending a lot of time manually drawing rivers on shapefiles in the past, so this step saves a lot of time. But the rivers are still too detailed. So we can also filter to only show features with an area above a certain threshold. This gives us a more manageable set of features that enhance the detail of the map nicely. We can tidy some of them up in post processing.



When you're happy, you can export a PNG from QGIS and then work on the final stages (e.g. colour replacement for seas) in GIMP or another image editor. For this map I used this stage to remove some of the smaller rivers. You choose your image size when at the time of exporting and don't need to worry about that during processing.

I had to find extra data for the Markermeer for this map, since it wasn't in the coastline shapefile or the waterways shapefile. I doubt most projects would have that problem.

You could also add bathymetry GIS data to get sea depths too, but I haven't looked into that yet.

Another advantage that of doing things this way is that QGIS allows you to set the map projection to something that makes sense for the area of the world you're working on. For this map I used a local UTM projection which means that every tile on the map represents approximately the same area.

A couple of tips:

- To style the SRTM DEM layer in QGIS: you need to set the styling to 'singleband pseudocolour', set interpolation to 'discrete', and probably set mode to 'equal interval'. Then you can tinker with the values and colours as you like. You can access the styling through the 'symbology' window in QGIS under layer properties).

- When exporting from QGIS, be sure to turn off antialiasing.

This wasn't a full tutorial so let me know if you try this and want any help with particular steps. Also, let me know if you have any requests for heightmaps produced this way.

Offline Combuijs

  • Web Team
  • Moderator
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Netherlands (2146x2180) and discussion of better map-making methods
« Reply #1 on: June 19, 2020, 07:34:01 AM »
Lovely map, Carl, it's pretty accurate, the best I have seen for the Netherlands. Perhaps in the weekend I can find time to put it on the Simutrans Maps website. That is, if I can remember the password.  :-[

I could comment on all kinds of minor errors in the map, but I appreciate that the Netherlands is a very difficult country to get an accurate coastline or an accurate run of the rivers from,

Interesting method you have used!

(Now, will we get a simulation of Dutch train traffic?  ;) )

Offline Carl

  • Devotee
  • *
  • Posts: 1682
    • Website
  • Languages: EN
Re: Netherlands (2146x2180) and discussion of better map-making methods
« Reply #2 on: June 19, 2020, 09:35:01 AM »
Thanks Combuijs! I think the Netherlands is a nice demo for this because it shows both the potential and the limitations: while very detailed maps are possible, there is always a limit to to how accurate they can be without painstaking manual work on top of what the geographical data gives you.

Quote
(Now, will we get a simulation of Dutch train traffic?  ;) )
Ha! I do have plans to branch out from my existing maps this year to some smaller one-off projects... Netherlands isn't on the list yet, but who knows!

Offline Combuijs

  • Web Team
  • Moderator
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Netherlands (2146x2180) and discussion of better map-making methods
« Reply #3 on: June 27, 2020, 09:18:30 PM »
I did not remember the password, but Isaac has give me a new one. Map is added to Simutrans Maps. Thanks a lot!