Using the Imagery Tiler On-Premises
Looking for on-premises 3D Tiling? Contact sales for an evaluation. Contact Sales.
Setup
Extract the contents of Cesium-ion-3D-Tiling-Pipeline.zip
.
The main executable is imagery-tiler
and can be found under bin
.
If you wish to run the examples download and extract SampleData.zip into a new SampleData
directory.
Windows
Windows binaries require Visual C++ Redistributable for Visual Studio 2017. Download and run the installer.
Using the tiler
A typical tiler command follows the following format:
imagery-tiler -f <layer-type> -i <input1.tif> <input2.tif> -o <output-directory>
<layer-type>
can be TMS or WMTS.
For example, a small drone-collected courtyard image is included at SampleData/Courtyard.tif
. Tile it into a TMS layer by running:
imagery-tiler -f TMS -i SampleData/Courtyard.tif -o Courtyard
This will produce a TMS tileset in the Courtyard
directory.
When providing multiple, overlapping images, files earlier in the list will be given preference. For best results, make sure all input files have the same meters-per-pixel resolution. Otherwise, the final resolution of the tileset might be too low for the highest resolution input or too high for the lowest resolution input.
The imagery tiler automatically reprojects the input to EPSG:3857
Web Mercator if it isn't already.
Available options
Below is a full list of command line options to configure the tiler.
Option | Description | Required | Default |
---|---|---|---|
--help , -h | Display help message. | ||
--version , -v | Display version number. | ||
--input , -i | One or more imagery files to be tiled into a single layer. For overlapping imagery, files earlier in the list will be given preference. Imagery files can have 1 to 4 bands with the 4th band treated as alpha, but all input files must have the same number of bands. Most raster formats are supported. Required if --input-list is not supplied. Cannot be used with --input-list . | ||
--input-list | A list of imagery files to be tiled into a single layer. Required if --input is not supplied. Cannot be used with --input . | ||
--output , -o | A directory to output the imagery tileset. This will overwrite existing content or create a new directory if it does not exist. | ||
--output-format , -f | Specify which tileset format to produce. Options are TMS or WMTS . | ||
--title , -t | Sets the Title field in the metadata for the produced tileset. | Imagery | |
--quiet | Suppress output during tiling. | false | |
--verbose | Show verbose output. | false |
Next steps
Now that we've tiled our imagery, the next step is to stream it into CesiumJS. All we need is a web server to host the tiles and then we can specify a URL to the imagery.
The example below adds TMS imagery to CesiumJS.
const viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider: await Cesium.TileMapServiceImageryProvider.fromUrl('<URL-To-Your-Imagery>'),
baseLayerPicker : false
});
The Hosting 3D Content tutorial walks you through setting up the Cesium ion Asset Server and streaming your imagery with CesiumJS.
License
Third-party licenses used by the tilers can be found in ThirdParty.pdf.