News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Netherlands (2146x2180) and discussion of better map-making methods

Started by Carl, June 18, 2020, 04:03:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Carl

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.

Combuijs

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?  ;) )
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Carl

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!

Combuijs

I did not remember the password, but Isaac has give me a new one. Map is added to Simutrans Maps. Thanks a lot!
Bob Marley: No woman, no cry

Programmer: No user, no bugs



danivenk

Let me start off on a good note, thank you soo much for making a high-quality large heightmap for the Netherlands! It looks great however there are some things that I've noticed that are worth noting as they are either geographically wrong or just weird.

For example, I noticed that some rivers are dotted around but not connected. I guess this is partly because the accuracy of the data makes it so that the rivers aren't fully shown in the height map.
On a similar note, some rivers like the Rhine or IJssel are entirely missing, but that can probably be accounted for in the accuracy of the model you used. The same could be said for the Afsluitdijk or the Markwaarddijk.

There are also some mines near the Dutch border in Germany that, because of how you've created the height map, are generated by the game as water (sea level).

I also noticed that most inland lakes (and also rivers not connected to the sea) are all created at the same level as the ground surrounding them. But I have a feeling that might just be because of the way Simutrans generates those.

I was wondering what your stance is on the points made and whether they would be fixed/changed or not.

Carl

Thanks for the comments, Dani!

I think it comes down to a mixture of data quality problems and lack of local knowledge.

The rivers derived from the natural features data seem to be incomplete, with the gap around Gorinchem being the most obvious one but not the only one. It's also possible that some were filtered out by my crude step of filtering out smaller water features to make the set more manageable. They also only show data within the Netherlands borders (this would be easily fixed).

Someone with local knowledge would be much better placed to notice and correct such errors, but I'm quite unfamiliar with the Netherlands. I think the lesson is that you'll always get best results building a heightmap of an area that you're familiar with.

It's also likely that better quality data is available for the water areas. If I were doing this for the UK, again, I'd be using official data from a body like the Environment Agency or Defra. But I don't know what the equivalent ones would be for the Netherlands.

The point about the mines at the border is interesting. Because of the way I've done this, inland areas below sea level shouldn't show as water. This suggests that they were included as "water" in the natural features dataset.

Carl

This week I found an excellent source for rivers and inland water to aid with this method: the EU-Hydro River Network Database.

It's a large download, and you have to create a login, but it provides very detailed geographical data to aid with creating accurate heightmaps.

This week I found an excellent source for rivers and inland water to aid with this method: the EU-Hydro River Network Database.

It's a large download, and you have to create a login, but it provides very detailed geographical data to aid with creating accurate heightmaps.

Edit: I should add, there are a lot of spurious layers in the download (like river basin areas) - you only really need the river polygon, canal polygon and inland water polygon to make a realistic looking map, as per the image below (Neusideler See and Danube)