You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project builds GDAL, extract native libraries and makes it available as Java library. At the moment it only supports GDAL on Ubuntu x64 (Linux)
5
+
This project builds GDAL, extracts native libraries and makes them available as Java library. At the moment it only supports GDAL on Ubuntu x64 (Linux)
6
6
7
7
### Build
8
8
In order to build the project the following should happen:
9
9
1. Build GDAL docker image, [build_gdal.sh](scripts.build_gdal.sh) is responsible for that
10
10
2. Build [lddtopo-rs](https://github.com/REASY/lddtopo-rs), [build_lddtopo.sh](scripts/build_lddtopo.sh) is responsible for that
11
11
3. Analyze the dependencies of /usr/share/java/libgdalalljni.so by building DAG and running topological sort on it
12
-
4. Copy all required native modules to src/main/resources/native
13
-
5. Generate src/main/resources/native/modules.txt that contains new line separated list of modules to be loaded. The order comes from topological sort!
12
+
4. Copy all required native modules to `src/main/resources/native/%os%-%arch%`
13
+
5. Copy proj DB to [src/main/resources/proj/proj.db](src/main/resources/proj/proj.db)
14
+
7. Generate `src/main/resources/native/%os%-%arch%.txt` that contains new line separated list of modules to be loaded. The order comes from topological sort!
14
15
15
16
All of this is done in a script [generate_native_modules.sh](scripts/generate_native_modules.sh), just run it from root folder of the repo to get the final JAR
16
17
```bash
17
18
./scripts/generate_native_modules.sh
18
19
```
19
-
20
-
### Note on the usage
21
-
Please, make sure that you set an environment variable PROJ_DATA to writable (preferably temporary) folder, for example `/tmp/gdal-jni-with-native/proj/`. That env variable is expected by PROJ, so it cannot be set on runtime by the same process.
thrownewIllegalStateException("There must be an env variable `PROJ_DATA` set to writable (preferably temporary) folder, for example `/tmp/gdal-jni-with-native/proj/`");
0 commit comments