geo-data / cesium-terrain-builder

A C++ library and associated command line tools designed to create terrain tiles for use in the Cesium JavaScript library
Other
706 stars 338 forks source link

Gap problem in showing parts tiled more detailed of a geotiff tiled in normal zoom level #71

Open safa833 opened 6 years ago

safa833 commented 6 years ago

Primarily, let me tell what I want to do and problem that I came across after doing.

new project

  1. A was tiled between 0-13 zoom level
  2. B was tiled between 14-15 zoom level

layer.jsons of 1 and 2 were combined.

combined

and then It appears a result like below :

combined

How to solve gap problem ?

Thanks in advance

Fork I used is @ahuarte47's fork

ahuarte47 commented 6 years ago

I think that geotiff B should have the spatial envelope (xmin,ymin,xmax,ymax) just aligned to the grid of the TMS profile used (Geodetic or Mercator).

safa833 commented 6 years ago

I dont understand completely what you said @ahuarte47 , Can you explain it on an example ?

ahuarte47 commented 6 years ago

The tiles are created using a predefined spatial grid (Geodetic or Mercator). I think you will have to move only the tiles of the second B-geotiff process that completely overlap with the grid at each z-level. You can't replace the folder, you have to replace only a set of tiles of each folder. May be you need a batch or something to detect these set of tiles according to their full path and the bounds of your B geotiff.

ediebold commented 6 years ago

@safa833 - It should be noted that using @ahuarte47's solution above would cause you to lose part of geotiff B's data - since you'll be ignoring it's partial tiles.

Unfortunately, there's not really another way to go about this, except for using GDAL to combine the original DEMS (upscaling the bigger DEM in the process) and then tiling the result. Of course, this is wasteful, but the current open source tools don't really leave you with a better option at the moment.