Closed kb173 closed 4 years ago
With d39f694d61c3561f3ffcaa0a6f3400d9cd8e3ecd, the RasterTileExtractor is properly packaged. Doing the same with GDAL might be more complex - should we just have libgdal-dev as a dependency, like in the landscapelab-server?
landscapelab-server just requires libgdal and not libgdal-dev .. what about windows in that case?
On Linux, this is done - libgdal.so and libRasterTileExtractor.so can be shipped with libgeodot.so. Unfortunately, I haven't managed to compile it on Windows yet...
Trying to get this done, my progress so far:
path\to\gdal\lib\gdal_i.lib
in Project >Properties > Linker > Input > Additional Dependencies
path\to\gdal
in Properties > VC++ Directories
- > Reference Directories
- > Include Directories
(add include to the path) - > Library Directories
(add lib to the path)This will result in being able to include the libraries with #include <gdal_priv.h>
.
So I changed the includes accodingly:
#include <gdal_priv.h>
#include <gdalwarper.h>
Make sure to run with C++ 17, settings can be found under: Project >Properties >C/C++ > Language > C++ Language Standard
return (GDALDataset *) GDALOpen(path.c_str(), GA_ReadOnly)
in RasterTileExtractor.cpp line 236 will not compile. Change to return (GDALDataset *) GDALOpen(path.u8string().c_str(), GA_ReadOnly)
.
All changes were added, the plugin is now confirmed to compile on both Windows and Linux. The README was updated with detailed instructions in https://github.com/boku-ilen/geodot-plugin/commit/e0f05b0d52829513ba133351966a1ae029a59203, so I'd consider this done!
Currently the RasterTileExtractor library has to be moved to
/usr/lib
, which isn't very portable and practical. Also, GDAL has to be installed.We need to find a method which is completely portable. Ideally, everything would be in the
bin
folder of the GDNative plugin.