Git Product home page Git Product logo

cesium-terrain-builder's Introduction

Cesium Terrain Builder

This is a C++ library and associated command line tools designed to create terrain tiles for use with the Cesium JavaScript library.

Cesium can create interactive 3D globes (à la Google Earth) in your web browser whereby imagery is draped over a model of the underlying terrain. Cesium provides a number of different sources for the terrain data, one of which is height map data for use with the CesiumTerrainProvider JavaScript class.

Cesium Terrain Builder can be used to create the tilesets that sit behind a terrain server used by CesiumTerrainProvider. Note that these tools do not provide a way of serving up those tilesets to the browser: instead Cesium Terrain Server is designed to serve terrain tilesets. In particular the Docker geodata/cesium-terrain-server image is designed to simplify the visualisation of terrain tilesets.

Command Line Tools

The following tools are built on top of the C++ libctb library:

ctb-tile

This creates gzipped terrain tiles from a GDAL raster representing a Digital Elevation Model (DEM), saving the resulting tiles to a directory. It calculates the maximum zoom level concomitant with the native raster resolution and creates terrain tiles for all zoom levels between that maximum and zoom level 0 where the tile extents overlap the raster extents, resampling and subsetting the data as necessary. E.g.

ctb-tile --output-dir ./terrain-tiles dem.tif

The input raster should contain data representing elevations relative to sea level. NODATA (null) values are not currently dealt with: these should be filled using interpolation in a data preprocessing step.

Note that in the case of multiband rasters, only the first band is used as the input DEM.

As well as creating terrain tiles, the tool can also be used for generating tiles in GDAL supported formats using the --output-format option. This provides similar functionality to the gdal2tiles.py script. Tiles can be created in either Web Mercator or Global Geodetic projections using the --profile option. e.g.

ctb-tile --output-format JPEG --profile mercator \
  --output-dir ./jpeg-tiles RGB-image.tif

An interesting variation on this is to specify --output-format VRT in order to generate GDAL Virtual Rasters: these can be useful for debugging and are easily modified programatically.

Usage: ctb-tile [options] GDAL_DATASOURCE

Options:

  -V, --version                 output program version
  -h, --help                    output help information
  -o, --output-dir <dir>        specify the output directory for the tiles (defaults to working directory)
  -f, --output-format <format>  specify the output format for the tiles. This is either `Terrain` (the default) or any format listed by `gdalinfo --formats`
  -p, --profile <profile>       specify the TMS profile for the tiles. This is either `geodetic` (the default) or `mercator`
  -c, --thread-count <count>    specify the number of threads to use for tile generation. On multicore machines this defaults to the number of CPUs
  -t, --tile-size <size>        specify the size of the tiles in pixels. This defaults to 65 for terrain tiles and 256 for other GDAL formats
  -s, --start-zoom <zoom>       specify the zoom level to start at. This should be greater than the end zoom level
  -e, --end-zoom <zoom>         specify the zoom level to end at. This should be less than the start zoom level and >= 0
  -r, --resampling-method <algorithm> specify the raster resampling algorithm.  One of: nearest; bilinear; cubic; cubicspline; lanczos; average; mode; max; min; med; q1; q3. Defaults to average.
  -n, --creation-option <option> specify a GDAL creation option for the output dataset in the form NAME=VALUE. Can be specified multiple times. Not valid for Terrain tiles.
  -z, --error-threshold <threshold> specify the error threshold in pixel units for transformation approximation. Larger values should mean faster transforms. Defaults to 0.125
  -m, --warp-memory <bytes>     The memory limit in bytes used for warp operations. Higher settings should be faster. Defaults to a conservative GDAL internal setting.
  -R, --resume                  Do not overwrite existing files
  -q, --quiet                   only output errors
  -v, --verbose                 be more noisy

Recommendations

  • For performance reasons it is recommended that the input raster be in the same spatial reference system as the output tile grid in order to bypass the need to reproject the data. For terrain data this is World Geodetic System (WGS 84). If the source data is in another spatial reference system, however, the tool will attempt to reproject the data but with an associated performance penalty.

  • For large rasters a tile based format (as opposed to scanline based) will drastically speed up processing. A block size that is similar to the tile output size (i.e. 65x65 for terrain tiles) should be chosen.

  • Adding overviews to the source dataset will speed up tile generation. The overview will be chosen whose resolution most closely matches that of the zoom level being rendered. Overviews will only be downsampled, never upsampled. As such, it is recommended to use rolutions corresponding to the Global Geodetic Profile in the Tile Mapping Service specification. See the gdaladdo tool for creating overviews.

  • DEM datasets composed of multiple files can be composited into a single GDAL Virtual Raster (VRT) dataset for use as input to ctb-tile and ctb-extents. See the gdalbuildvrt tool.

  • Setting GDAL runtime configuration options will also affect Cesium Terrain Builder. Specifically the GDAL_CACHEMAX environment variable should be set to a relatively high value, in conjunction with the warp memory, if required (see next recommendation).

  • If warping the source dataset then set the warp memory to a relatively high value. The correct value is system dependent but try starting your benchmarks from a value where the combined value of GDAL_CACHEMAX and the warp memory represents about 2/3 of your available RAM.

  • ctb-tile will resample data from the source dataset when generating tilesets for the various zoom levels. This can lead to performance issues and datatype overflows at lower zoom levels (e.g. level 0) when the source dataset is very large. To overcome this the tool can be used on the original dataset to only create the tile set at the highest zoom level (e.g. level 18) using the --start-zoom and --end-zoom options. Once this tileset is generated it can be turned into a GDAL Virtual Raster dataset for creating the next zoom level down (e.g. level 17). Repeating this process until the lowest zoom level is created means that the resampling is much more efficient (e.g. level 0 would be created from a VRT representation of level 1). Because terrain tiles are not a format supported by VRT datasets you will need to perform this process in order to create tiles in a GDAL DEM format as an intermediate step. VRT representations of these intermediate tilesets can then be used to create the final terrain tile output.

ctb-info

This provides various information on a terrain tile, mainly useful for debugging purposes.

Usage: ctb-info [options] TERRAIN_FILE

Options:

  -V, --version                 output program version
  -h, --help                    output help information
  -e, --show-heights            show the height information as an ASCII raster
  -c, --no-child                hide information about child tiles
  -t, --no-type                 hide information about the tile type (i.e. water/land)

ctb-export

This exports a terrain tile to GeoTiff format for use in GIS software. Terrain tiles do not contain information defining their tile location, so this must be specified through the command options.

Note that the tool does not normalise the terrain data to sea level but displays it exactly as it is found in the terrain data.

Usage: ctb-export -i TERRAIN_FILE -z ZOOM_LEVEL -x TILE_X -y TILE_Y -o OUTPUT_FILE

Options:

  -V, --version                 output program version
  -h, --help                    output help information
  -i, --input-filename <filename> the terrain tile file to convert
  -z, --zoom-level <int>        the zoom level represented by the tile
  -x, --tile-x <int>            the tile x coordinate
  -y, --tile-y <int>            the tile y coordinate
  -o, --output-filename <filename> the output file to create

ctb-extents

Sometimes it is useful to see the extent of coverage of terrain tilesets that would be produced from a raster. This tool does this by outputting each zoom level as a GeoJSON file containing the tile extents for that particular zoom level.

Usage: ctb-extents GDAL_DATASET

Options:

  -V, --version                 output program version
  -h, --help                    output help information
  -o, --output-dir <dir>        specify the output directory for the geojson files (defaults to working directory)
  -p, --profile <profile>       specify the TMS profile for the tiles. This is either `geodetic` (the default) or `mercator`
  -t, --tile-size <size>        specify the size of the tiles in pixels. This defaults to 65 for terrain tiles and 256 for other GDAL formats
  -s, --start-zoom <zoom>       specify the zoom level to start at. This should be greater than the end zoom level
  -e, --end-zoom <zoom>         specify the zoom level to end at. This should be less than the start zoom level and >= 0

LibCTB

libctb is a library implemented in standard C++11. It is capable of creating terrain tiles according to the heightmap-1.0 terrain format. It does not provide a way of serving up or storing the resulting tiles: this is application specific. Instead its aim is simply to take a GDAL supported raster format representing a Digital Terrain Model (DTM) and convert this to terrain tiles.

See the source code for the tools provided with the library (e.g. ctb-tile) for examples on how the library is used to achieve this.

Documentation

Doxygen based documentation is available for the C++ code: run the doxygen command in the doc/ directory and point your browser at doc/html/index.html.

Status

Although the software has been used to create a substantial number of terrain tile sets currently in production use, it should be considered beta quality software: it needs broader testing, a comprehensive test harness and the API is liable to change.

The software has primarily been developed and deployed on a Linux OS, and this is the only officially supported platform. However, it has been reported as compiling and running on:

  • Windows using Visual Studio 2010 and 2013 (see this issue).

  • Mac OS X Mavericks using clang (see this issue).

Porting it to other systems should be relatively painless as the library dependencies have been ported to numerous systems and the code itself is standard C++11.

Requirements

Runtime requirements

Ensure GDAL >= 2.0.0 is installed. At the time of writing this is not a stable release so you may need to use a nightly build or to build the source directly from version control. Specifically, you will need a version of trunk that has added the min,max,med,q1 and q3 resampling algorithms. In the subversion repository this is commit 28717 and on the GitHub mirror this is 0a90a34.

Build requirements

In addition to ensuring the GDAL library is installed, you will need the GDAL source development header files. You will also need CMake to be available.

Installation

From Source

  1. Ensure your system meets the requirements above.

  2. Download and unpack the source.

  3. In the root package directory, assuming you are on a UNIX system, type mkdir build && cd build && cmake .. && make install.

  4. On a UNIX system you may need to run ldconfig to update the shared library cache.

Alternatively in step 3 above you can create a debug build by running cmake -DCMAKE_BUILD_TYPE=Debug ... You can also install to a different location by specifying the CMAKE_INSTALL_PREFIX directive e.g. cmake -DCMAKE_INSTALL_PREFIX=/tmp/terrain ...

Note that if you have GDAL installed in a custom location (e.g under /home/user/install) it will likely not be found by running cmake ... In this case you will need to provide the GDAL_LIBRARY_DIR, GDAL_LIBRARY and GDAL_INCLUDE_DIR directives e.g.

cmake -DGDAL_LIBRARY_DIR=/home/user/install/lib \
      -DGDAL_LIBRARY=/home/user/install/lib/libgdal.so \
      -DGDAL_INCLUDE_DIR=/home/user/install/include \
      ..

Using Docker

homme/cesium-terrain-builder is a Docker image that bundles the CTB tools and simplifies their deployment. Follow the link for usage information.

The only requirement to getting up and running with Cesium Terrain Builder is having docker available on your system: all software dependencies, build and installation issues are encapsulated in the image.

In addition, the geodata/cesium-terrain-server Docker image provides a way of visualising the tilesets created by homme/cesium-terrain-builder.

Limitations and TODO

  • Create a comprehensive test harness (possibly using Bandit, including code coverage and valgrind analysis.

  • Better coordination between threads in ctb-tile to enable graceful exits if there is a fatal error or other interrupt.

  • Add support for the new quantized-mesh-1.0 terrain format.

  • The ctb-tile command currently only outputs files to a directory and as such is subjected to filesystem limits (e.g. inode limits): it should be able to output tiles in a format that overcomes these limits and which is still portable and accessible. SQLite would appear to be a strong contender.

  • Provide hooks into the GDAL error handling mechanism to more gracefully intercept GDAL errors.

  • Expose tilers using a standard container api (map and/or vector).

  • Enable more options to be passed to the VRT warper by parameterising GDALWarpOptions::papszWarpOptions and GDALCreateGenImgProjTransformer2 in GDALTiler::createRasterTile.

  • Encapsulate the multithreading tile generation functionality currently implemented in ctb-tile within the library to make it more widely available.

  • One of the ctb-tile recommendations above illustrates a process for efficiently creating tilesets at lower zoom levels by resampling an already generated tileset at the next highest zoom level. This could be built directly into the ctb-tile tool. An implementation could create a read-only GDAL TiledDataset driver (or use a VRT, if it efficiently supports the large number of tile files) which accesses the already generated tileset; this dataset could then be used as an input to the tiler.

  • Add support for interpolating out NODATA values. This could be done using either GDALFillNodata() or GDALGridCreate().

  • Adding support for creating water masks to tiles could be useful: at the moment all tiles are flagged as being of type 'land' (see this issue).

Issues and Contributing

Please report bugs or issues using the GitHub issue tracker.

Code and documentation contributions are very welcome, either as GitHub pull requests or patches. If you cannot do this but would still like to improve the software, particularly overcoming the limitations listed above, then please consider funding further development.

License

The Apache License, Version 2.0.

Acknowledgements

Software development funded by the Maritime Archaeology Trust and the European Regional Development Fund through the Interreg IVA 2 Seas Programme.

Software developed by GeoData through the University of Southampton Open Source Geospatial Laboratory.

Thanks to everyone in the community who has contributed to the code base.

Contact

Homme Zwaagstra [email protected]

cesium-terrain-builder's People

Contributors

chris-cooper avatar gberaudo avatar homme avatar jule- avatar kyosho- avatar thomas001 avatar tmizu23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cesium-terrain-builder's Issues

There are too many 5000 heights in .terrain files.

I create .terrain files using ctb-tile, but each .terrain file has same value 5000 of height in any zoom level.

>ctb-info -e 0.terrain Heights: 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000

The original file is csv file it contains xyz scatter data of 20 million rows.

68562.610,53987.280,3.910
68587.400,53987.460,3.400
68545.530,53955.270,4.350

GeoTiff file view is here.

The follows are my codes.

>gdal_grid -a invdistnn -zfield field_3 -a_srs EPSG:2444 -of GTiff -txe 66500 68745 -tye 54000 51500 -outsize 4000 4000 -ot Float32 kunisaki.vrt kunisaki-grid2.tif --config GDAL_NUM_THREADS ALL_CPUS
>gdalwarp -t_srs EPSG:4326 kunisaki-grid2.tif kunisaki-grid2-wgs84.tiff
>ctb-tile --output-dir data/tilesets/terrain-tiles/ kunisaki-grid2-wgs84.tiff

How can I get .terrain files from scatter data for ctb?

Tiles getting created in root output folder

Hi Guys

Every now and then I come across this problem. Running this command
ctb-tile --output-dir "/data/output" "/data/source/input.tif"

99% of the time everything is fine and all files and folders get created in the output folder just fine. But sometimes something strange happens, it creates millions of .terrain files directly under the root of the output directory.

Has anyone else seen this or know why it could be happening?

Missing some terrain tiles

Following #6 and #9 issues, I am trying to generate and use terrain in Cesium.

When I try to generate terrain for N24E032.hgt SRTM 3 file:

ctb-tile --output-dir test N24E032.hgt
0...10...20...30...40...50...60...70...80...90...100 - done.

And then load the TMS layer in Cesium, I have error 404 loading issues:

GET http://localhost/test/2/4/3.terrain 404 (Not Found) Cesium.js:18650
An error occurred in "CesiumTerrainProvider": Failed to obtain terrain tile X: 4 Y: 0 Level: 2. Cesium.js:19770

GET http://localhost/test/4/18/11.terrain 404 (Not Found) Cesium.js:18650
An error occurred in "CesiumTerrainProvider": Failed to obtain terrain tile X: 18 Y: 4 Level: 4. 

As you can notice, Cesium cannot find 2/4/3.terrain file but error report that it failed to obtain terrain tile X: 4 Y: 0 Level: 2... Hum?!

Other upper tiles seems to load flawlessly, but Cesium behavior prevent child tile loading from these two tiles.

Here is the layer.json file I use for Cesium terrain loading:

{
  "tilejson": "2.1.0",
  "format": "heightmap-1.0",
  "version": "1.0.0",
  "scheme": "tms",
  "tiles": ["{z}/{x}/{y}.terrain"]
}

Indeed, 2/4/3.terrain and 4/18/11.terrain were not generated. If this is the expected behavior, parent tiles must have wrong child tags, if not there is some issue in the generation process.

Other possibility, I use wrong command line for my terrain generation, maybe I missed some default parameter...

Bathymetric data - negative elevations

Hi,

I am trying to visualise some bathy data using your awesome tool. However, it looks like that all elevation data is inverted (I am using a tiff with negative elevation values to generate the terrain files).

Is this by design?

Cheers

The artefact in terrain tiles

My name is Michael Chin. I am working at the EarthByte Group of Sydney University. Recently, we are building a Cesium application with terrain data. We found your Cesium Terrain Builder on GitHub, which is great. Thank you very much for creating such a useful tool. However, when we put the terrain data into Cesium, we noticed something is not very correct along the boundary of terrain tiles. Please see the screenshot below. It seems the overlap pixels are not very right. We are wondering if you could help us with this. Thank you very much.

On one side, there is a rainbow wall.
rainbow_wall
On the other side, there is a colourful line above a transparent wall.
transparent_wall
If you look down from above, there is a black line along the terrain tile boundary.
black_gap

Tile Overlap when exporting geotiff tiles

Hi,

This post is not for an issue, it's more like a feature request but I understand that you guys don't have time to answer all the requests so if you can just give me some tips it would be great too :)

So here is the problem :
In fact I would like to generate tiles from a geotiff File (eu dem file)
In order to use the generated tiles in a game engine as heightmaps (so not for using it in cesium).
It's working quite well using the command ctb-tile -f GTiff but the problem is that the tiles edge doesn't match because there is not any overlapping if we don't export .terrain files.

Second problem is that I have never worked with c++ so it's a bit hard for me to understand the source code of this very cool tool.

So i would like to know if you can tel me which files/functions I should look at to implement this feature.

Thanks !

Information about CTB and heightmap-1.0 terrain format

I don't understand why when I generate terrain with CTB and then load it in Cesium, tile coordinates doesn't match tile naming.
I mean, I use Cesium inspector on a tile with elevation in order to get it's coordinates (level, x and y) then I go in generated terrain directory in order to find corresponding tile but it doesn't exist. I can find terrain/Z/X/ path but Y.terrain doesn't exist.
By the way, visually in Cesium there is obviously no problem with elevation georeferencing.

Could someone explain me?

Creating terrain tiles for a local area

Great work!

I've tested the terrain builder and created a tileset for an area in Norway. I also had to create a layer.json file. I'm then adding the terrain with these lines:

  var terrainProvider = new Cesium.CesiumTerrainProvider({
    url: '/terrain/jotunheimen'
  });

  viewer.scene.terrainProvider = terrainProvider;

I'm getting this error:

Failed to obtain terrain tile X: 0 Y: 0 Level: 0

This tile don't exist as it's not where my data is. I'm getting the same error if I first move to my location:

viewer.scene.camera.flyTo({
  destination: Cesium.Cartesian3.fromDegrees(8.4, 61.5, 10000.0),
  duration: 3,
  complete: switchTerrain
});

Do you now how to load terrain tiles for a local area?

Error in loading terrain files (.terrain)

I can't load the terrain file to the cesium. Now I will describe how I did it step by step. Hope this will help you find out where I went wrong.

STEPS:

  1. Basically, I am following the tutorial in this post. The terrain.tif can be downloaded in the post link.

  2. Built the Cesium-Terrain-Builder into several executable files.

enter image description here

  1. Using command line described on the GitHub page to generate the terrain tiles.
    ctb-tile -o ./data/tilesets/terrain/texel dem.tif

The directory of the terrain files

  1. Follow the steps of how to install Cesium-terrain-server. Using go, and generate a cesium-terrain-server.exe in my GOPATH.

  2. Using cmd to setup the terrain tiles service
    cesium-terrain-server -web-dir ../data/tilesets/terrain/texel -port 8000

  3. In my visual studio code, I write the code shown below

App.js code

  1. And I get the error message in the console, and on the web page an empty canvas with stars in the background.

Error Message

Integer overflow

Hey guys, I'm getting this error when processing some DEM files, any idea what it could be?

0...10...20...30...40...50...60...70...80...90...ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster
ERROR 1: Integer overflow : nSrcXSize=25536, nSrcYSize=25536
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Error: Could not read heights from raster

The code is not compatible with GDAL 2.2, and can compile with GDAL 2.1

When I use the GDAL 2.2.1 to compile the source, it reported an error like GDALCreateOverviewDataset() has the wrong number of arguments, I query the header file, the function of GDAL 2.2.1 has just three arguments instead of four.

And then I download the source code of GDAL 2.1.4, the CTB has built succefully.

Error when parsing terrain tiles

I've created a tileset and added the missing top tile:
#1

Unfortunately, I'm still getting an error:
An error occurred in "CesiumTerrainProvider": Failed to obtain terrain tile X: 1 Y: 0 Level: 0.

This tile is generated by the terrain builder, and the URL is correct, but it seems to fail in the createHeightmapTerrainData method of CesiumTerrainProvider. An error occurs in this line:

var heightBuffer = new Uint16Array(buffer, 0, provider._heightmapWidth * provider._heightmapWidth);

I wonder if there is something wrong in the buffer obtained from the file. buffer.byteLength is 48, while provider._heightmapWidth * provider._heightmapWidth is 4225. Isn't the buffer too short?

This is the tile:
http://thematicmapping.org/data/tiles/terrain/jotunheimen/0/1/0.terrain

Can cesium-terrain-builder used instead of gdal2tiles.py?

I want to build .png tileset from .tif orthophoto can I use cesium-terrain-builder directly instead of gdal2tiles.py?

But seems cesium-terrain-builder produce different results compared to gdal2tiles.py I have checked it using diff -rq ortho_tiles_orig ortho_tiles_ctb

Compile on Ubuntu 14.04?

What proper apt-get install command for gdal library?

List of my installed packages:

apt list --installed | grep gdal

gdal-bin/trusty,now 1.10.1+dfsg-5ubuntu1 amd64 [installed,automatic]
libgdal-dev/trusty,now 1.10.1+dfsg-5ubuntu1 amd64 [installed]
libgdal1h/trusty,now 1.10.1+dfsg-5ubuntu1 amd64 [installed,automatic]
python-gdal/trusty,now 1.10.1+dfsg-5ubuntu1 amd64 [installed]

Howewer:

cmake ..

CMake Error at src/CMakeLists.txt:10 (message):
  The GDAL version must be one that implements RFC 46 (GDAL/OGR unification)
  i.e.  >= 2.0.0

Do we need to build gdal from source?

Building under windows

Hello,
I am having some problems in building the project under windows, did anyone was successful please?
After long struggle building gdal and zlib, I am getting:
"C:\Program Files (x86)\JetBrains\CLion 2016.1.3\bin\cmake\bin\cmake.exe" --build C:\Users\elfai5.CLion2016.1\system\cmake\generated\ceisum-terrian-builder-d62868b7\d62868b7\Release --target all -- -j 4
[ 11%] Built target commander
Scanning dependencies of target ctb
[ 17%] Building CXX object src/CMakeFiles/ctb.dir/GDALTiler.cpp.obj
[ 29%] Building CXX object src/CMakeFiles/ctb.dir/GlobalMercator.cpp.obj
[ 29%] Building CXX object src/CMakeFiles/ctb.dir/GlobalGeodetic.cpp.obj
D:\workspace\ceisum-terrian-builder\src\GDALTiler.cpp: In function 'void* getOverviewDataset(GDALDatasetH, GDALTransformerFunc, void_)':
D:\workspace\ceisum-terrian-builder\src\GDALTiler.cpp:244:87: error: 'GDALCreateOverviewDataset' was not declared in this scope
poSrcOvrDS = GDALCreateOverviewDataset( poSrcDS, iOvr, FALSE, FALSE );
^
D:\workspace\ceisum-terrian-builder\src\GDALTiler.cpp: In member function 'void ctb::GDALTiler::closeDataset()':
D:\workspace\ceisum-terrian-builder\src\GDALTiler.cpp:397:20: error: 'class GDALDataset' has no member named 'GetRefCount'
if (poDataset->GetRefCount() < 1) {
^
mingw32-make.exe[2]: *_* [src/CMakeFiles/ctb.dir/GDALTiler.cpp.obj] Error 1
src\CMakeFiles\ctb.dir\build.make:87: recipe for target 'src/CMakeFiles/ctb.dir/GDALTiler.cpp.obj' failed
CMakeFiles\Makefile2:84: recipe for target 'src/CMakeFiles/ctb.dir/all' failed
makefile:126: recipe for target 'all' failed
mingw32-make.exe[1]: *** [src/CMakeFiles/ctb.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2

Add support for MBTiles output

CTB currently writes individual terrain tiles directly to disk. As zoom levels increase, this leads to millions of individual terrain tile files in thousands of folders, which are hard to copy and move around.

The MBTiles file format is a widely used container for image and terrain tiles. It would be great if CTB supported writing tiles directly into a designated MBTiles container file.

We're planning to tackle regenerating our own imagery and terrain datasets within the next few months. It'd be great if someone happened to implement MBTiles capability before then. If not, I may be able to tackle it myself, although it would help if someone who's more familiar with this codebase could offer advice on the best approach for doing so.

See default max zoom level?

Is there currently a way to see what zoom level ctb-tile will create by default? For example, I have a raster which receives tiles for zoom levels 0-16, and another which gets 0-14, when I don't specify the start and end zoom. I was hoping to find a command that would let me get the "16" and "14" without actually running the tiler and inspecting the files.

This would be useful to allow for automatic overview creation using gdaladdo in order to prevent issues #28 and #37

At the moment, the best solution I know of is to inspect the layers.json produced in @ahuarte47's pull request, but I was wondering if there's anything better.

Create terrain with two isolate DEM

I have two DEMs which are not adjacent to each other. Saying one is the Texa DEM and the other is Florida DEM. First i create terrain one by one and the result in cesium is good. But after i merge the DEM into a single one. I cannot see any terrain in map. I think maybe my mergeing DEM has some problem, but I cannot figure it out. Can you give me some suggestions? Do I have to deal with nodata cell and set its value to zero(some solution i find on internet) ?

elevation is too high by roughly 30m

I'm using the NED 1/3 arc second data set to generate tiles to zoom level 15 for Cape Canaveral in Florida, and finding that the terrain looks accurate in shape, but the elevation is too high by about 30m. The Cesium AGI STK World Terrain set uses NED data as well, and I can see the exact same artifacts and characteristics in the terrain I'm generating as that in the AGI data, except for the elevation difference. Is there a parameter I'm missing when generating terrain tiles?

edit: actually it seems to be exactly 30m.

I try to run cmake 2.8.12.2 with visual studio 2013 ,wrong

the par is :
cmake_configuration_types: Debug;Release;MinSizeRel;RelWithDebInfo
cmake_install_prefix: C:/Program Files (x86)/Cesium Terrain Builder

the out information is :
The C compiler identification is MSVC 18.0.21005.1
The CXX compiler identification is MSVC 18.0.21005.1
Check for working C compiler using: Visual Studio 12
Check for working C compiler using: Visual Studio 12 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 12
Check for working CXX compiler using: Visual Studio 12 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Performing Test COMPILER_SUPPORTS_CXX11
Performing Test COMPILER_SUPPORTS_CXX11 - Failed
Performing Test COMPILER_SUPPORTS_CXX0X
Performing Test COMPILER_SUPPORTS_CXX0X - Failed
CMake Error at CMakeLists.txt:20 (message):
The compiler D:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe has no C++11 support. Please use a different C++,
compiler.
can tou tell me ,Which compiler I have to choose? gcc or something else ,my os is windows
best wishes!

Which GDAL version for compiling

Hi, I have pulled GDAL from SVN (https://svn.osgeo.org/gdal/trunk/gdal) and installed it by ./configure, make, make install (I did not choose any extra configure parameters). The installed version is:

GDAL 2.0.0dev, released 2014/04/16

But the cmake of CTB still throws an error:

The GDAL version must be one that implements RFC 46 (GDAL/OGR unification)
i.e. >= 2.0.0

Which GDAL version should I install?

Missing gdalwraper.h by GDALTile.cpp

I'm trying to build CTB but its being a nightmare.

After geting stuck on

CMake Error at src/CMakeLists.txt:10 (message):
The GDAL version must be one that implements RFC 46 (GDAL/OGR unification)
i.e. >= 2.0.0

and

Could NOT find GDAL (missing:  GDAL_LIBRARY GDAL_INCLUDE_DIR) 
CMake Error at CMakeLists.txt:67 (message):
  The GDAL library cannot be found on the system

and some missing GDALOpenEx problem I'm now on this:


Scanning dependencies of target ctb
[  5%] Building CXX object src/CMakeFiles/ctb.dir/GDALTile.cpp.o
/.../cesium-terrain-builder-0.4.1/src/GDALTile.cpp:22:24: fatal error: gdalwarper.h: No such file or directory
compilation terminated.
src/CMakeFiles/ctb.dir/build.make:62: recipe for target 'src/CMakeFiles/ctb.dir/GDALTile.cpp.o' failed
make[2]: *** [src/CMakeFiles/ctb.dir/GDALTile.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/ctb.dir/all' failed
make[1]: *** [src/CMakeFiles/ctb.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Please put the REAL WORKING Instalation guide on your main page to avoid problems. I sugest you to start your guide from a fresh Ubuntu installation and you will see that just say The dependency is GDAL >= 2.x is not enough. Build the CTB from zero ground SO is a pain!

Getting error on obtaining terrain tiles

Hi,
I had built tiles in the format of .terrain. I had included layer.json file and enabled CORS. But I am getting error on using these lines of codes in sandcastle -
var viewer = new Cesium.Viewer('cesiumContainer');
var terrainProvider = new Cesium.CesiumTerrainProvider({
url : 'http://localhost:8080/cesium/Apps/Sandcastle/terrain/tiles' // I had also checked with relative URL
});
viewer.scene.terrainProvider = terrainProvider;

Errors are -
An error occurred in "CesiumTerrainProvider": Failed to obtain terrain tile X: 1 Y: 0 Level: 0.
An error occurred in "CesiumTerrainProvider": Failed to obtain terrain tile X: 0 Y: 0 Level: 0.

Note: I am having 0/0/0.terrain and 0/1/0.terrain

Blocky terrain

The terrain rendered with Cesium Terrain Builder gets a bit blocky. See the mountain terraces in the hillside.

screen shot 2014-10-12 at 12 36 51

Are the height values rounded?

Tile index shifting

Following #6 issue, I am trying to generate and use terrain in Cesium.

When I try to generate terrain for N24E032.hgt SRTM 3 file:

ctb-tile --output-dir test N24E032.hgt
0...10...20...30...40...50...60...70...80...90...100 - done.

I can find in generated directory tree th

e terrain tile test\0\2\1.terrain which must be test\0\1\0.terrain accordingly to heightmap-1.0 terrain format.

After some investigation it seems that there is a mistake in Grid.hpp file:

inline TilePoint
  pixelsToTile(const PixelPoint &pixel) const {
    i_tile tx = (i_tile) ceil(pixel.x / mTileSize),
      ty = (i_tile) ceil(pixel.y / mTileSize);

    return TilePoint(tx, ty);
  }

should be:

inline TilePoint
  pixelsToTile(const PixelPoint &pixel) const {
    i_tile tx = (i_tile) pixel.x / mTileSize,
      ty = (i_tile) pixel.y / mTileSize;

    return TilePoint(tx, ty);
  }

It seems to solve my issue.

Threading not working well for ctb-tile?

We are getting approx 150 tiles per second processed on a layer 16 run with ctb-tile if we specify 1 thread, rising only to 400 tiles per second at 8 threads (on an 8-core machine).

We have tried this on a 36-core machine and the performance with 36 threads (the default setting being 1 per core) is no improvement whatsoever over 8 threads.

These are both EC2 servers. We have tried using a RAM drive for storage to eliminate the possibly of a disk bottleneck. We tend to see a load average of around the number of threads, and CPU utilization per core of around 70%.

If we ran another job at the same time, we can get utilization to 100%, but overall throughput is actually less.

The most peculiar thing is that on an Intel Core i5 destop machine, we get about 2000 tiles per second - dramatically better performance than the 36-core AWS box. We are not sure why.

Any tips? Here's the command we're running:

ctb-tile --output-dir tiles3 -s 16 -e 16 -m 8000000000 -c n dem_wgs84.vrt

Where n above is of course the various thread counts we have tried. Using more threads than cores also does not help, though I wouldn't expect it to.

Please let me know if any additional information would be helpful.

did it support the water mask now?

appreciate for your work,could you tell me did it support the water mask now? and do you know the "quantized-mesh-1.0 terrain format" support water mask?

why there is a sharp terrain scenery

Hi. I have built CTB by Visual Studio 2015 with GDAL2.0.1, then use CTBtile to tile my DEM data with command -o XXX XXX.tif. The tool worked great while it appears a sharp scenery in CesiumJS which is not that much smooth with it in arcglobe, I am not talking about the sharp boundary but the area with some real data such as a hill will look like a pyramid. The original data is in WGS84 coordinate. I don't know if there are some restraints for input data such as supposed bits or there are something else I have left out?
qq 20151201224249

Error tiling with format ENVI

Hello,

I am getting this error -

Error: The GDAL driver must be write enabled, specifically supporting 'CreateCopy'

When I try to tile using ENVI as the output format. Here is my command:

ctb-tile --output-dir ./tiles --profile mercator --tile-size 256 -f 'ENVI' --resampling-method bilinear input.bin

The input.bin is a 32bit float BSQ interleaved file if that makes a difference. I was able to create this with gdal 2.1.1.

Any help much appreciated. Thanks

The results of tiles is not correct by master branch built by VS 2015

I use visual studio2015 to build CTB tools and then create tiles using ctl-tile.exe,but when I load this tiles in cesium, there is nothing to show.
command:
ctb-tile --output-dir ./tiles ASTGTM2_N27E103_dem.tif --start-zoom 8 --end-zoom 0
this is CTB tools:
image
this is tiles, the right of image is right result, and the left is my test result which failed to load rightfully in cesium.
image

Install fails with custom gdal build

make[2]: *** No rule to make target /Users/mamay/custombuilds/lib/libgdal.so', needed bysrc/libctb.dylib'. Stop.
make[1]: *** [src/CMakeFiles/ctb.dir/all] Error 2
make: *** [all] Error 2

ctb-tile hangs

While tiling large set of DEM .tif tiles ctb-tile hangs at some point and in htop I can't see any CPU utilization. This section https://github.com/geo-data/cesium-terrain-builder#limitations-and-todo have some suspicious cases:

Better coordination between threads in ctb-tile to enable graceful exits if there is a fatal error or other interrupt.

The ctb-tile command currently only outputs files to a directory and as such is subjected to filesystem limits (e.g. inode limits): it should be able to output tiles in a format that overcomes these limits and which is still portable and accessible. SQLite would appear to be a strong contender.

So how to debug ctb-tile? Will build in debug mode help? some other ideas?

Update:
Looks like it's not inode limits.

Big Rift on the globe

I am tiling the dem using ctb while the out come shows that there is a big rift on the surface (figure 1). I debuged the data and find the height data at level 9 is strange, the bound is biger than the real region of the data (figure2). I have noticed that the latest merge of the ctb master is to lock the thread for bound shift while what I have tested is using only one thread. I am wondering if the error is caused by GDAL when building VRT files.

1(figure 1)

2(figure 2)

Build GDAL 2.1.4 from source under Ubuntu 14.04

Seems current master is not compiling with GDAL 2.1.0 and GDAL 2.2.* (btw what version it supports officially?) and I can't find ppa to install GDAL 2.1.4 on Ubuntu 14.04, so I tried to compile it from source.

wget http://download.osgeo.org/gdal/2.1.4/gdal-2.1.4.tar.gz
tar -xvzf gdal-2.1.4.tar.gz
cd gdal-2.1.4/
mkdir deploy
./configure --prefix=/home/user/temp/gdal-2.1.4/deploy
make

It fails with

make[2]: Entering directory `/home/user/temp/gdal-2.1.4/frmts/postgisraster'
/bin/bash /home/user/temp/gdal-2.1.4/libtool --mode=compile --tag=CXX g++ -I/home/user/temp/gdal-2.1.4/port -I/home/user/temp/gdal-2.1.4/gcore -I/home/user/temp/gdal-2.1.4/alg -I/home/user/temp/gdal-2.1.4/ogr -I/home/user/temp/gdal-2.1.4/ogr/ogrsf_frmts -I/home/user/temp/gdal-2.1.4/gnm -I/home/user/temp/gdal-2.1.4/apps -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names  -I ../mem -I ../vrt  -I/home/user/anaconda3/include -I/home/user/anaconda3/include/server  -DPG_HAS_PQESCAPESTRINGCONN  -DOGR_ENABLED -I/home/user/temp/gdal-2.1.4/port -I/usr/include/libqhull -I/usr/include/qhull  -DGDAL_COMPILATION -c -o ../o/postgisrasterdriver.lo postgisrasterdriver.cpp
libtool: compile:  g++ -I/home/user/temp/gdal-2.1.4/port -I/home/user/temp/gdal-2.1.4/gcore -I/home/user/temp/gdal-2.1.4/alg -I/home/user/temp/gdal-2.1.4/ogr -I/home/user/temp/gdal-2.1.4/ogr/ogrsf_frmts -I/home/user/temp/gdal-2.1.4/gnm -I/home/user/temp/gdal-2.1.4/apps -g -O2 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -I ../mem -I ../vrt -I/home/user/anaconda3/include -I/home/user/anaconda3/include/server -DPG_HAS_PQESCAPESTRINGCONN -DOGR_ENABLED -I/home/user/temp/gdal-2.1.4/port -I/usr/include/libqhull -I/usr/include/qhull -DGDAL_COMPILATION -c postgisrasterdriver.cpp  -fPIC -DPIC -o ../o/.libs/postgisrasterdriver.o
In file included from postgisrasterdriver.cpp:31:0:
postgisraster.h:41:22: fatal error: libpq-fe.h: No such file or directory
 #include "libpq-fe.h"

So I have installed sudo apt-get install libpq-dev
and added export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/postgresql/

but get another error:

/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::isKEAImage(std::string)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kmldom::Parse(std::string const&, std::string*)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::setImageMetaData(std::string, std::string)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `MakeMapObject'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `png_get_asm_flags'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `libiconv_open'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `png_set_asm_flags'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::openKeaH5RDOnly(std::string, int, unsigned long long, unsigned long long, double, unsigned long long, unsigned long long)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kmlengine::KmzFile::ReadFile(char const*, std::string*) const'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::createKEAImage(std::string, kealib::KEADataType, unsigned int, unsigned int, unsigned int, std::vector<std::string, std::allocator<std::string> >*, kealib::KEAImageSpatialInfo*, unsigned int, unsigned int, int, unsigned long long, unsigned long long, double, unsigned long long, unsigned long long, unsigned int)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::openKeaH5RW(std::string, int, unsigned long long, unsigned long long, double, unsigned long long, unsigned long long)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::setGCPs(std::vector<kealib::KEAImageGCP*, std::allocator<kealib::KEAImageGCP*> >*, std::string)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kmlengine::KmzFile::ReadKmlAndGetPath(std::string*, std::string*) const'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::getImageMetaData()'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::getGCPProjection()'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `libiconv_close'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kmldom::SerializePretty(boost::intrusive_ptr<kmldom::Element> const&)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `png_get_asm_flagmask'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kmlengine::Href::Parse(std::string const&)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::setImageBandMetaData(unsigned int, std::string, std::string)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::getImageBandDescription(unsigned int)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::setImageBandDescription(unsigned int, std::string)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `FreeMapObject'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kmlengine::KmzFile::OpenFromString(std::string const&)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `PrintGifError'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `kealib::KEAImageIO::getImageBandMetaData(unsigned int)'
/home/user/temp/gdal-2.1.4/.libs/libgdal.so: undefined reference to `libiconv'
collect2: error: ld returned 1 exit status
make[1]: *** [gdalinfo] Error 1
make[1]: Leaving directory `/home/user/temp/gdal-2.1.4/apps'
make: *** [apps-target] Error 2

Working with large files

"Once this tileset is generated it can be turned into a GDAL Virtual Raster dataset for creating the next zoom level down (e.g. level 17). Repeating this process until the lowest zoom level is created means that the resampling is much more efficient (e.g. level 0 would be created from a VRT representation of level 1). Because terrain tiles are not a format supported by VRT datasets you will need to perform this process in order to create tiles in a GDAL DEM format as an intermediate step. VRT representations of these intermediate tilesets can then be used to create the final terrain tile output."

I do not understand what I am supposed to be doing for the intermediate step when processing level by level. After I create the first level of terrain tiles how or what do I point to for the next level?

terrain tiles for southern hemisphere

Dear Homme,
Thanks for sharing this useful tool and great work, I'm experiencing an issue when generating terrain tiles using SRTM data from Australia, the first top level tile misses the 0/0/0.terrain file, adding this tile manually as per your instruction at issue#1 fixes the cesium error message which was looking for the missing tile but it dose not render the terrain! Interestingly when I use a SRTM DEM from France, after adding the missing tile, cesium renders the terrain and shows it without any issue! Would you please advise how to fix this?

Does not compile on Mac OS X Mavericks (clang)

Many errors when trying to build on mavericks:

  • does not like use of ostringstream like ctb-extents.cpp:148, ctb-tile.cpp:184, ctb-tile.cpp:194, ctb-tile.cpp:207, ctb-tile.cpp:216
    error:
    cesium-terrain-builder-master/tools/ctb-extents.cpp:148:66: error: cannot take the address of an rvalue of type 'std::__1::basic_ostringstream<char, std::__1::char_traits, std::__1::allocator >'
    const string filename = dirname + static_cast<ostringstream*>( &(ostringstream() << zoom << ".geojson") )->str();
  • problem in instantiation of function template specialization package_task:
    ctb-tile.cpp:460:48: note: in instantiation of function template specialization
    'std::__1::packaged_task<int (TerrainBuild *, ctb::Grid *)>::packaged_task<int (&)(TerrainBuild *, ctb::Grid *), void>' requested here
    packaged_task<int(TerrainBuild *, Grid *)> task($runTiler); // wrap the function

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.