Marcus Str.
Husband, flight sim pilot, IT specialist

About | Tweets | Code | CV | Categories | Ortho4XP Tiles | Live Stream


I made my own Ortho4XP tile server
 
X-Plane


Let it be known to you that storing the tiles for an entire country, in my case Germany, with ZL 16 and ZL 18 at airports, will take up an considerable amount of space. So much that it ate up my entire space when bulk-generating all the tiles with custom DEM - and ran into all sorts of funky errors when it could no longer write to my drive.

I knew this is going to be large, but not that large. Turns out all tiles for Germany are 417 GB (minus one tile, which I am unable to build as some data seems to be wrong or corrupt).

Luckily I am running a server in my place with about 4TB of total space, which essentially functions as Time Machine for my data.

So my solution for being able to store huge amounts of Ortho4XP tiles is: store them on the server.

This is how I achieved to create my own Ortho tile server:

- Generate a number of tiles in bulk, for example 10 tiles, locally, through Ortho4XP as normal
- Move the generated tiles into a dedicated folder on the server
- Repeat steps 1 and 2 until all tiles you want are generated (in my case all of Germany)
- Mount a network drive in Windows which links directly to that folder on the server

On the server, cd into the folder where the tiles are and run this command:

tree -dai -L 1 > tiles.txt


This will export a list of all folder names into a file called tiles.txt in the same folder.

Open the tiles.txt file and remove the first line (the "."), and the last line which tells you how many folders there are, leaving you with just a list of all folder names.

How do you get this into your X-Plane scenery? Symbolic links. Yes, Windows can do these too... for a long time I didn't know that either. But I think this only works on NTFS formatted drives.

To make things easy, I built a small PowerShell script to make this a quick job:

foreach($line in [System.IO.File]::ReadLines("O:\tiles.txt"))
{
$l = -join("M:\Flight Sim\Scenery\", $line)
$r = -join("O:\", $line)
New-Item -Path $l -ItemType SymbolicLink -Value $r
}


Where in the first line the "O:\lines.txt" points to the network drive you mounted and the text file you generated.
$l is the drive and folder where your scenery lives, and
$r is the network drive with the Ortho4XP tiles (remember, all folders in this drive are the tile folders).

Save this script somewhere. For example "OrthoTiles.ps1". IMPORTANT: PowerShell must be able to run scripts - so you may need to set that remote policy as admin.

I also recommend to run this script in a PowerShell which is opened as Admin.

And that's it, congratulations! You now own a Ortho4XP tile server.







© 2024 Marcus Str.