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
718 stars 342 forks source link

Error tiling with format ENVI #38

Open millionpoundhat opened 8 years ago

millionpoundhat commented 8 years ago

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

homme commented 8 years ago

Hi there. The error is thrown by ctb-tile whenever the output driver fails to directly implement the CreateCopy method (which ctb-tile uses to generate the output tiles). Unfortunately this is the case with the ENVI driver.

Looking at the GDAL documentation I see that the generic version of CreateCopy will be used if there is no driver specific override. I'm not sure if this is a change in GDAL since I wrote the code, but it means that I might need to extend the failing test to just check if the driver is write enabled in any way.

How are you using ctb-tile? From within Docker or are you compiling it yourself? If you're willing and able to compile ctb-tile yourself you can check whether the default CreateCopy works for your use case simply by commenting out the test (the three lines starting here). If you do and it works, let me know, otherwise I'll look into it further and get a test version you can work with.