-
Notifications
You must be signed in to change notification settings - Fork 7
Tile stitching
With all the available methods to generate a mesh for a tiff we are facing the problem that we do not have shared vertices at tile edges as described by the quantized mesh standard. This results in seems between tiles because of possible height difference but also because the normals are only calculated for a tile and don't take adjecent tiles into account. The seems can be spotted in the left part of the image below. In CTOD we solve this by requesting neighbouring tiles and make sure we have shared vertices and if needed average the height and normals. The terrain factory makes sure we download all needed data without duplicate request, the COG Processor processes the COG data making a mesh and normals, the Terrain Processor makes sure we have have shared edge vertices and the heights and normals are correct on the edges.
Stitching: Averaged normals between adjecent tiles
When requesting neighbouring tiles we want to prevent duplicate requests to the COG, this is handled in the TerrainFactory.
- Terrain request comes in
- Spawn cog request for terrain and adjecent tiles for each terrain request
- Check if Processed COG is in cache, yes -> set cog data in terrain request, no -> add to requests queue if not added yet.
- Download COG data and process using a COG processor
- Add data to cache
- Set COG data for all terrain requests that need this data
- Check if a terrain requests has all the COG data it needs
- Run the terrain processor
- Return Quantized Mesh