Required changed resolved

This commit is contained in:
doinachiroiu 2020-09-24 09:40:30 +00:00
parent 2b8a1be547
commit a84fbbac62
2 changed files with 16 additions and 12 deletions

View File

@ -22,7 +22,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
find_package(PNG REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(libpcre REQUIRED IMPORTED_TARGET libpcre)
#pkg_check_modules(libproj REQUIRED IMPORTED_TARGET libproj)
pkg_check_modules(proj REQUIRED IMPORTED_TARGET proj)
set(SAPI_ROOT "${PROJECT_SOURCE_DIR}/../.." CACHE PATH "Path to the Sandboxed API source tree")
# cmake .. -G Ninja -DSAPI_ROOT=$HOME/sapi_root
@ -40,17 +40,15 @@ set_property(TARGET libgdal PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_D
target_link_libraries(libgdal INTERFACE
crypto expat jpeg
PkgConfig::libpcre
/usr/lib/libproj.so
PkgConfig::proj
sqlite3 tiff z pthread m rt dl curl
PNG::PNG)
add_sapi_library(gdal_sapi
FUNCTIONS GDALOpen GDALAllRegister GDALGetDatasetDriver
GDALGetDriverShortName GDALGetDriverLongName GDALGetRasterXSize
GDALGetRasterYSize GDALGetRasterCount GDALGetProjectionRef
GDALOpenEx GDALGetGeoTransform GDALGetRasterBand GDALGetBlockSize
GDALGetRasterMinimum GDALGetRasterMaximum GDALGetRasterBandXSize
GDALGetRasterBandYSize GDALRasterIO
GDALGetDriverShortName GDALGetDriverLongName
GDALGetGeoTransform GDALGetRasterBand GDALGetBlockSize
GDALGetRasterBandXSize GDALGetRasterBandYSize GDALRasterIO
INPUTS "/usr/include/gdal/gdal.h"
LIBRARY libgdal

View File

@ -20,6 +20,12 @@ PNG: `sudo apt-get install libpng-dev`
PCRE: `sudo apt-get install libpcre3 libpcre3-dev`
PROJ: `sudo apt-get install libproj-dev`
OBS! You may need to set `export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib`.
It is required for libproj.so to be found into
/usr/local/lib/. You can also fix this by typing `locate libproj.so`
which will give you <the_absolute_path_of_libproj.so> and then
`cp <the_absolute_path_of_libproj.so> /usr/local/lib/`.
### Initializing GDAL submodule:
`git submodule add https://github.com/OSGeo/gdal/tree/master/gdal`
@ -33,7 +39,7 @@ GNUmakefile from gdal/gdal can handle building the static library.
`cp gdal/gdal/libgdal.a lib/`
OBS: The file is huge! It may take a while.
OBS! The file is huge! It may take a while.
### For testing:
`mkdir build && cd build`
@ -54,7 +60,7 @@ using GDAL functionalities and sandboxed methods.
*Sandboxing...*
The purpose of sandboxing is to limit the permissions
The purpose of sandboxing is to limit the permissions
and capabilities of librarys methods, in order to
secure the usage of them. After obtaining the sandbox,
the functions will be called through an Sandbox API
@ -64,10 +70,10 @@ using GDAL functionalities and sandboxed methods.
*Raster process...*
From gdal.h header useful methods are added to sapi
From gdal.h header useful methods are added to sapi
library builded with CMake.
One .tiff file is manipulated with GDALOpen
One .tiff file is manipulated with GDALOpen
functionality, which extracts a pointer to the data set
containg a list of raster bands, all pertaining to the
same area.
@ -75,7 +81,7 @@ using GDAL functionalities and sandboxed methods.
transform, size of raster and various other information
are kept into the data set that corresponds to the image.
To create an array containing the image information, the
To create an array containing the image information, the
dimentions needed are extracted using some specific
GDAL(X/Y)Size functions applied to the block.
GDALRasterBand function takes care of data type conversion, one more step following: placing the