GDAL % ls -la
total 2552
drwxr-xr-x 6 ******** staff 192 9月 29 17:24 .
drwx------@ 179 ******** staff 5728 9月 29 17:24 ..
-rw-r--r-- 1 ******** staff 200 9月 29 15:58 .bashrc
-rw-r--r-- 1 ******** staff 1704 9月 29 15:42 Dockerfile
-rw-r--r-- 1 ******** staff 251 9月 29 11:05 oracle-instantclient23.repo
-rw-r--r--@ 1 ******** staff 1293120 9月 29 14:23 zip_bosai_hinan_zip_hinan02_01.zip
GDAL %
podman build -t gdal .
GDAL % podman build -t gdal .
STEP 1/19: FROM oraclelinux:9
STEP 2/19: RUN dnf -y install epel-release
Oracle Linux 9 BaseOS Latest (aarch64) 8.0 MB/s | 98 MB 00:12
Oracle Linux 9 Application Stream Packages (aar 8.5 MB/s | 39 MB 00:04
Last metadata expiration check: 0:00:06 ago on Mon Sep 29 08:35:28 2025.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
oracle-epel-release-el9 aarch64 1.0-1.el9 ol9_baseos_latest 14 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 14 k
Installed size: 18 k
Downloading Packages:
oracle-epel-release-el9-1.0-1.el9.aarch64.rpm 200 kB/s | 14 kB 00:00
--------------------------------------------------------------------------------
Total 198 kB/s | 14 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracle-epel-release-el9-1.0-1.el9.aarch64 1/1
Verifying : oracle-epel-release-el9-1.0-1.el9.aarch64 1/1
Installed:
oracle-epel-release-el9-1.0-1.el9.aarch64
Complete!
--> c02e08c6f34e
STEP 3/19: RUN dnf -y groupinstall "Development Tools" && dnf -y install cmake gcc-c++ proj-devel sqlite-devel libcurl-devel libxml2-devel zlib-devel
Oracle Linux 9 EPEL Packages for Development (a 6.9 MB/s | 30 MB 00:04
Last metadata expiration check: 0:00:02 ago on Mon Sep 29 08:35:41 2025.
Dependencies resolved.
=============================================================================================================
Package Arch Version Repository Size
=============================================================================================================
Installing group/module packages:
asciidoc noarch 9.1.0-3.el9 ol9_appstream 337 k
autoconf noarch 2.69-39.el9 ol9_appstream 741 k
automake noarch 1.16.2-8.el9 ol9_appstream 794 k
binutils aarch64 2.35.2-63.0.1.el9 ol9_baseos_latest 5.0 M
bison aarch64 3.7.4-5.el9 ol9_appstream 1.0 M
byacc aarch64 2.0.20210109-4.el9 ol9_appstream 94 k
diffstat aarch64 1.64-6.el9 ol9_appstream 47 k
flex aarch64 2.6.4-9.el9 ol9_appstream 333 k
gcc aarch64 11.5.0-5.0.1.el9_5 ol9_appstream 30 M
gcc-c++ aarch64 11.5.0-5.0.1.el9_5 ol9_appstream 12 M
[中略]
-- Installing: /usr/local/share/gdal/GDALLogoGS.svg
-- Installing: /usr/local/share/gdal/gdalicon.png
-- Installing: /usr/local/lib64/cmake/gdal/GDAL-targets.cmake
-- Installing: /usr/local/lib64/cmake/gdal/GDAL-targets-noconfig.cmake
-- Installing: /usr/local/lib64/cmake/gdal/GDALConfigVersion.cmake
-- Installing: /usr/local/lib64/cmake/gdal/GDALConfig.cmake
-- Installing: /usr/local/bin/gdal-config
-- Installing: /usr/local/lib64/pkgconfig/gdal.pc
--> 3d3f4fe68f3e
STEP 17/19: WORKDIR /home/oracle
--> 5d006f3d699f
STEP 18/19: USER oracle
--> 5a71462a1faa
STEP 19/19: CMD ["/bin/bash"]
COMMIT gdal
--> 2b6d39f648fb
Successfully tagged localhost/gdal:latest
2b6d39f648fb14ee750b42967832fed739e6ad6954ee392470751ff1ac15a01b
GDAL %
GDAL % podman image ls gdal
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/gdal latest 2b6d39f648fb 45 seconds ago 3.27 GB
GDAL %
podman run --rm -it -v $PWD:/home/oracle gdal
ls -la
GDAL % podman run --rm -it -v $PWD:/home/oracle gdal
bash-5.1$ ls -la
total 1276
drwxr-xr-x. 6 oracle oinstall 192 9月 29 08:24 .
drwxr-xr-x. 1 root root 20 9月 29 08:37 ..
-rw-r--r--. 1 oracle oinstall 200 9月 29 06:58 .bashrc
-rw-r--r--. 1 oracle oinstall 1704 9月 29 06:42 Dockerfile
-rw-r--r--. 1 oracle oinstall 251 9月 29 02:05 oracle-instantclient23.repo
-rw-r--r--. 1 oracle oinstall 1293120 9月 29 05:23 zip_bosai_hinan_zip_hinan02_01.zip
bash-5.1$
bash-5.1$ env
HOSTNAME=013c3e1a0683
PWD=/home/oracle
container=podman
HOME=/home/oracle
LANG=ja_JP.utf8
ORACLE_HOME=/usr/lib/oracle/23/client64
TERM=xterm
NLS_LANG=American_America.AL32UTF8
SHLVL=1
LD_LIBRARY_PATH=/usr/lib/oracle/23/client64/lib:/usr/local/lib64:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
_=/usr/bin/env
bash-5.1$
unar zip_bosai_hinan_zip_hinan02_01.zip
bash-5.1$ unar zip_bosai_hinan_zip_hinan02_01.zip
zip_bosai_hinan_zip_hinan02_01.zip: Zip
01_第9回避難場所/01_第9回避難場所/第9回避難場所.dbf (13579 B)... OK.
01_第9回避難場所/01_第9回避難場所/第9回避難場所.prj (410 B)... OK.
01_第9回避難場所/01_第9回避難場所/第9回避難場所.shp (749444 B)... OK.
01_第9回避難場所/01_第9回避難場所/第9回避難場所.shx (1868 B)... OK.
01_第9回避難場所/02_第9回地区割当/第9回地区割当.dbf (16019 B)... OK.
01_第9回避難場所/02_第9回地区割当/第9回地区割当.prj (410 B)... OK.
01_第9回避難場所/02_第9回地区割当/第9回地区割当.shp (1111028 B)... OK.
01_第9回避難場所/02_第9回地区割当/第9回地区割当.shx (2188 B)... OK.
Successfully extracted to "./01_第9回避難場所".
bash-5.1$
ogr2ogrコマンドを実行します。Shapefileを表HINAN_PLACEとしてデータベースにロードします。避難場所のポリゴンが保存される列はGEOMです。
ogr2ogr -f OCI -overwrite \
OCI:wksp_apexdev/[パスワード]@host.containers.internal/freepdb1 \
"01_第9回避難場所/01_第9回避難場所/第9回避難場所.shp" \
-oo ENCODING=CP932 \
-nln HINAN_PLACE -lco GEOMETRY_NAME=GEOM -lco SRID=4326 -lco DIM=2 \
-nlt PROMOTE_TO_MULTI \
-s_srs EPSG:2451 \
-t_srs EPSG:4326 \
-skipfailures
bash-5.1$ ogr2ogr -f OCI -overwrite \
OCI:wksp_apexdev/oracle@host.containers.internal/freepdb1 \
"01_第9回避難場所/01_第9回避難場所/第9回避難場所.shp" \
-oo ENCODING=CP932 \
-nln HINAN_PLACE -lco GEOMETRY_NAME=GEOM -lco SRID=4326 -lco DIM=2 \
-nlt PROMOTE_TO_MULTI \
-s_srs EPSG:2451 \
-t_srs EPSG:4326 \
-skipfailures
bash-5.1$