1. A concise explanation of the problem you're experiencing.
Unable to load geotiff image in cesium.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
code:
var provider = new Cesium.WebMapServiceImageryProvider({
url : ‘http://localhost:8080/Apps/geotiff.tif’,
layers : ‘0’,
proxy: new Cesium.DefaultProxy(’/proxy/’)
});
viewer.imageryLayers.addImageryProvider(provider);
below error found while processing:
An error occurred in "m": Failed to obtain image tile X: 0 Y: 0 Level: 0.
Cesium.js:477 An error occurred in "m": Failed to obtain image tile X: 1 Y: 0 Level: 0.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to load geotiff file on cesium map
4. The Cesium version you're using, your operating system and browser.
cesium 1.43
You can’t load GeoTIFFs or other common image/terrain file formats directly into Cesium. Cesium requires that images be converted into common map tile formats like TMS, and for terrain, it only understands its own “heightmap” and “quantized-mesh” terrain tile formats.
Thanks for your support . I am not sure how to convert geotiff format to common map tile format if you have any idea or findings can you please share those links so that it is helpful for me.
The AGI/Cesium team has a large paid tool called STK Terrain Server. I think the upcoming Cesium Ion website will have terrain conversion capabilities.
However, if you’d like to do it for free, the https://github.com/geo-data/cesium-terrain-builder can convert file formats like GeoTIFF to Cesium’s “heightmap” format. (There’s also an open PR to allow conversion to the “quantized-mesh” format). I’m currently working on doing a very large terrain dataset conversion/generation myself, and I’ll be trying to write up a blog post eventually after it’s done - probably will be at least a couple months before I have time to write that, though.
Thanks for your suggestion.It seems the link which you have shared is working Linux os right.
. currently I am using windows operating system ,Is it possible in windows os could you please suggest me.
The cesium-terrain-builder tool is cross-platform, and can be compiled on Windows. It uses the CMake build system, which can generate build files for many different compile toolchains (Makefiles on Linux/Mac, Visual Studio solutions, etc).
1 Like
Hi,
I want to load rasters( jpg,IMG) files on cesium map. is it possible
If you have just one image and need to position it on the globe, use a SingleTileImageryProvider.