couven92 wrote:
I am stumbling across the limitations of the Map Tiles functionality in TransDEM. I want to have OpenStreetMap tiles of zoom level 18 (or greater) along my line. But since zoom 18 has such a small scale, the downloaded tile is very small, only giving me a tile some metres around my route. Is there any way to set the radius around the route to get the tiles for?
If I want large scale all over in my tests I simply duplicate the polyline marking the course of the route and move the (slightly adjusted) copies laterally. But normally I go for a smaller scale (suitable for ground textures) and only use large scale or ortho-imagery in the immediate vicinity of the route.
Quote:
However, I am fairly solid on the use of OSM Tile Servers, so I'd be happy to just calculate a bounding box and download all tiles directly from OSM myself. However, by looking at the .png and .trf files that TransDEM stores, I can see that TransDEM does some post-processing to the tile once it has been downloaded from OSM.
Quite a bit indeed, like stitching together and converting from normalized Mercator to UTM.
Quote:
Roland, can you explain the .trf file format
The .trf file defines a two-dimensional affine transformation plus the UTM zone and some extras. However, for TransDEM purposes, the transformation is limited to translation and uniform scaling.
Code:
Transformation=2DAffine+UTMZone+Aux
Punkt0.x=0.000000000000
Punkt0.y=0.000000000000
Punkt0_t.x=488012.576720125740
Punkt0_t.y=5726234.030064094800
Alpha=0.000000000000
Skalierung.x=15.849891521343
Skalierung.y=15.849891521343
Scherung=0.000000000000
UTMZone=32U
Groesse.x=20319.560930362342
Groesse.y=15168.346185925710
png=1
- Punkt0 and Punkt0_t define the translation. Punkt0 is the SE corner in image coordinates and must always be 0. Punkt0_t is the same point in UTM coordinates.
- alpha defines the rotation and must be 0.
- Skalierung defines scaling, metres per pixel, and must be the same for x and y
- Scherung defines shear and must be 0.
- UTMZone is self speaking
- Groesse is an option with some built-in redundancy. It defines image size in UTM coordinates (metres) and allows the actual image to be resized outside TransDEM, hereby invalidating the specified scaling. Groesse, if present, always has precedence over Skalierung.
- png simply says that the associated image is in png format. Originally the image format was gif.
Quote:
Secondly, from looking at .lgb files, I can see that they are just a text file that lists all *_georef *.png/*.trf files that were created by TransDEM. How does .lgb handle overlap?
No specific handling, all images remain independent and will be stacked upon each other. The operating system handles decompressing and memory consumption.
Quote:
Which picture is on top, the later or earlier entry in the .lgb-file?
The later.
Quote:
Is there any way to make an .lgb file reference files in subdirectories relative to the .lgb file?
I'm afraid not. Any absolute relative path in an entry will be stripped off.
couven92 wrote:
Hmm, I tried to simply write an arbitrary multiple of 256 into the Map Size Width & Height field, and it turns out that actually CAN write any value there. However, the resulting image is still ~2048x2048px regardless…
Oh, it should not allow arbitrary values. There are practical limitations. 2048x2048 not only means 64 tiles per image to be downloaded, but also to convert the images to UTM, pixel by pixel. Duplicating the image width means quadrupling the number of pixels and all pixel operations. Furthermore, some operations use integer 64bit arithmetic for exact results and these may run into overflow with large dimension images.