Dev Tutorial [Editor] Aerial Imagery

Road-hog123

An Orange Bus
Administrator
UKDT
Dec 10, 2015
1,758
To aid with building highly-accurate real maps, OMSI 2 can display aerial imagery onto tiles so that the map can be built with everything aligned correctly. For the aerial imagery to work, your map must be using real-world coordinates.

The first step to using Aerial Imagery in the OMSI Editor is to go into /OMSI 2/maps/ and create a directory called aerials. Inside this directory create another with exactly the same name as your map's directory, e.g.: /OMSI 2/maps/aerials/Grundorf/.

Now we need to tell OMSI where to look online to find the aerial imagery. To do this, you need to edit the options.cfg file in the main OMSI 2 directory. Right at the bottom of the file is the tag:
Code:
[Editor_LinkAerial]
Directly under it a link should exist for the site that distributes the aerial images OMSI will download, but by default it is not set. There are several links available that work here, the easiest to start with is OpenStreetMap imagery:
Code:
http://b.tile.openstreetmap.org/~z/~x/~y.png
Paste this directly below the tag, save the file and then load the Editor. To display the images in the Editor, go to the tile tab and check the "Use tile aerials" option:
upload_2016-9-17_14-46-15.png
The resolution of the above link is limited to 256px, so leave the slider alone and click "Dnl. current Tile". This will download a JPEG image into the directory you created earlier and apply it to the tile you're on. Additionally, any tiles that have not yet been downloaded will display the most recently downloaded image. As the images are stored locally on your computer, they will now appear each time the tile aerials are activated without having to redownload them. It's also possible to change the link after downloading some images and then download some other tiles with a different mapping style if you want to mix mapping types.

On the subject of changing the link, you'll probably find that the 256px streetmap imagery leaves rather a lot to be desired in terms of detail, but luckily there are alternatives provided by GCMods:
Code:
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&apicode=YourBingAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&type=road&apicode=YourBingAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&service=google&hres=1&apicode=YourGoogleAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&service=google&apicode=YourGoogleAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&service=google&type=roadmap&apicode=YourGoogleAPICode
These links give Aerial and Streetmap imagery from Bing and Google, but they don't work unless you provide an API code.

To get an API code to use the Bing imagery, you'll need to go to the Bing Maps Dev Center and sign in with a Microsoft account. Then, go to the My Keys section and create a new Basic/Not-For-Profit key. This will give you a key which you can paste in place of YourBingAPICode in the links above.

To get an API code to use the Google imagery, you'll need to create a Google Maps Static API key, which requires a Google Cloud Platform account, which requires a Debit/Credit card as requests to the API are pay-as-you-go. You get $300 credit with your free trial, which is enough for over 2,000 tiles at max resolution, so it's only really an issue if you are but a child. This will give you a key which you can paste in place of YourGoogleAPICode in the links above.

With the exception of the first Google link, imagery can then be downloaded up to 2048px square. For higher resolutions, the game will appear to freeze for quite some time while the image is downloaded. Google imagery is usually much higher quality and more recent that Bing imagery, however it has a watermark on each 256px square. The first Google link is slightly strange as it only works at the 256px setting, but actually downloads a 512px image with only the one watermark rather than the usual 4...
 
Last edited:
D

DVA_MEKA18

I tried it and it didnt work not sure if i did something wrong?
 

Costar1198

Some guy from Croydon innit
Mar 30, 2016
188
I think you need "load whole map at start" checked, wouldn't work for me otherwise. did you do that?
 

ross4122

Scottish Vyking Veg
Staff Team Leader
Content Control
Premium Subscriber
Apr 1, 2016
1,006
Did you get any errors?
 

Lakitu

Prepare for trouble! Make it double!
Content Control
Jan 1, 1970
737
You did convert to world co-ordinates? Also be aware this only works when building a map from scratch, converting an existing map to world co-ordinates will delete all the objects and splines afaik.
 

Road-hog123

An Orange Bus
Administrator
UKDT
Dec 10, 2015
1,758
Which link are you trying to use? Are you sure you've copied it correctly?
 
D

Deleted member 422

I guess this is screaming at me "Oi, you've done something wrong!....
upload_2017-6-3_19-27-48.png