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

I try to run cmake 3.14.0 with visual studio 2017 and GDAL224 ,wrong #82

Open laobel opened 5 years ago

laobel commented 5 years ago

严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK1120 1 个无法解析的外部命令 ctb D:\cesium-terrain-builder-master-quantized-mesh\build\src\Debug\ctb.dll 1

严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2019 无法解析的外部符号 "class GDALDataset __cdecl GDALCreateOverviewDataset(class GDALDataset ,int,int)" (?GDALCreateOverviewDataset@@YAPAVGDALDataset@@PAV1@HH@Z),该符号在函数 "void __cdecl getOverviewDataset(void ,int (__cdecl)(void ,int,int,double ,double ,double ,int ),void *)" (?getOverviewDataset@@YAPAXPAXP6AH0HHPAN11PAH@Z0@Z) 中被引用 ctb D:\cesium-terrain-builder-master-quantized-mesh\build\src\GDALTiler.obj 1

ahuarte47 commented 5 years ago

Related https://github.com/geo-data/cesium-terrain-builder/issues/15#issuecomment-375121426 ?

laobel commented 5 years ago

Hi @ahuarte47 I“m try #15 (comment) ?,but the problem still exists.

laobel commented 5 years ago

Hi @ahuarte47 ,What GDAL version do you use? x64 or x86?

ahuarte47 commented 5 years ago

I build CTB with GDAL 2.3.x x64 in Windows

laobel commented 5 years ago

Oh,,Please send me the compiled GDAL 2.3.x. Thanks!

ahuarte47 commented 5 years ago

You can download it from http://www.gisinternals.com

laobel commented 5 years ago

I download GDAL 2.3.3 from http://www.gisinternals.com,but errors still exists.

Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "class GDALDataset __cdecl GDALCreateOverviewDataset(class GDALDataset ,int,int)" (?GDALCreateOverviewDataset@@YAPEAVGDALDataset@@PEAV1@HH@Z) referenced in function "protected: virtual class ctb::GDALTile __cdecl ctb::GDALTiler::createRasterTile(class GDALDataset ,double (&)[6])const " (?createRasterTile@GDALTiler@ctb@@MEBAPEAVGDALTile@2@PEAVGDALDataset@@AEAY05N@Z) ctb D:\cesium-terrain-builder-master-quantized-mesh\build\src\GDALTiler.obj 1

ahuarte47 commented 5 years ago

Did you try to add to your project the gdaloverviewdataset.cpp file? It was my workaround.

laobel commented 5 years ago

Okay, thank you for your help.After I added to my project the gdaloverviewdataset.cpp file.Fortunately, the build succeeded.

Thanks!

laobel commented 5 years ago

Hi @ahuarte47, I use ctb to create terrain tiles, the format is quantized-mesh. There is an error when loaded with Cesium. Why? loadterrainerror

ahuarte47 commented 5 years ago

Do you have defined the Content-Encoding: gzip content negotiation header?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding

laobel commented 5 years ago

YES。 qq 20190214095552

laobel commented 5 years ago

The terrain file is too small,the biggest is 2kb.. Is it normal? qq 20190214095919

laobel commented 5 years ago

Request directly in the chrome browser and report the following error. qq 20190214100531

ahuarte47 commented 5 years ago

Yes, my tiles are very small too. I attach a fragment of my tile set, from 0 to 6th level - qm.zip . It is located in N42°49'0.73" - O1°38'35.63"

I do not know any idea about your error, I'm sorry.

laobel commented 5 years ago

Thank you all the same.I try other ideas。

laobel commented 5 years ago

Hi @ahuarte47 How do I create quantized-mesh terrain with multiple tif files?Must merge multiple tif files into a single file?

ahuarte47 commented 5 years ago

You could use gdalbuildvrt for creating a virtual raster file without really to save a new big tif.

laobel commented 5 years ago

@ahuarte47 How do I create quantized-mesh terrain with water mask by master-quantized-mesh branch。thanks!

ahuarte47 commented 5 years ago

Sorry, CTB tool does not support the water mask creation for any output format. You can read it in the limitations-TODO section in Readme page.