基盤地図情報 標高DEMデータ変換ツール Version1.7.0ã®ã³ã³ãã¤ã«æ¹æ³ã§ãã
ï¼QGIS3.10以éã ã¨ã以åã®ãã¼ã¸ã§ã³ã§å¤æããdemã®CRSãä¸æã¨ãªã£ã¦ãã¾ã£ãã®ã§ãgdalã¨projãæ´æ°ãã¦å¯¾å¿ãã¾ãããã¤ãã§ã«32bit OS ã§ã®åä½ã¯é対å¿ã«ãã¾ããããã®éã®èªåç¨ã¡ã¢ã§ãã
1. Visual Studio Community 2017ãã¤ã³ã¹ãã¼ã«
https://visualstudio.microsoft.com/ja/vs/older-downloads/
ãããããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¦ãx64 Native Tools ã³ãã³ãããã³ãããèµ·åãã¾ãã
2. projãã³ã³ãã¤ã«
projã®ver6.3.2ããã¦ã³ãã¼ããã¾ãã
https://proj.org/download.html
sqlite3ããã¦ã³ãã¼ããã¾ãã
https://www.sqlite.org/2020/sqlite-amalgamation-3320300.zip
以ä¸ãåèã«ãã«ããã¾ãã
https://gist.github.com/pebbie/f5f0b1db7fc4039af89054c1b3fb532fbuilding proj6 on visual studio 2017 (windows) · GitHub
3.gdalãã³ã³ãã¤ã«
gdalã®3.0.4ããã¦ã³ãã¼ããã¾ãã
https://github.com/OSGeo/gdal/releases/download/v3.0.4/gdal-3.0.4.tar.gz
nmake.optãå¤æ´ãã¾ãã
ã»nmake.optã®SETARGVãå¤æ´ã
SETARGV = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64\setargv.obj"
ã»nmake.optã®PROJãå¤æ´
PROJ_INCLUDE = -IC:\Users\mizutani\Desktop\proj-6.3.2\build\distro\include
PROJ_LIBRARY = "C:\Users\mizutani\Desktop\proj-6.3.2\build\distro\lib\proj.lib"
ã»nmake.optã®ssqlite3ãå¤æ´
SQLITE_INC=-IC:\Users\mizutani\Desktop\proj-6.3.2\build\sqlite3
SQLITE_LIB=C:\Users\mizutani\Desktop\proj-6.3.2\build\sqlite3\sqlite3.lib
gdalã以ä¸ã®ã³ãã³ãã§ãã«ããã¾ãã
nmake -f makefile.vc MSVC_VER=1910 WIN64=yes
nmake -f makefile.vc devinstall MSVC_VER=1910 WIN64=yes
c:\warmerda 以ä¸ã«gdalä¸å¼ãã¤ã³ã¹ãã¼ã«ããã¾ãã
4. dem.cppãã³ã³ãã¤ã«
åºç¤å°å³æ
å ± æ¨é«DEMãã¼ã¿å¤æãã¼ã«ã®ä¸ã«ç§»åãã¦ä»¥ä¸ãå®è¡ãã¾ãã
cl -Ic:\warmerda\bld\include c:\warmerda\bld\lib\gdal_i.lib dem.cpp
5. gdalã®exeãdllãdataãã³ãã¼
C:\warmerda\bld\binããåºç¤å°å³æ
å ± æ¨é«DEMãã¼ã¿å¤æãã¼ã«ã®ä¸ã«ã³ãã¼ãã¾ãã
ã»gdal300.dll
ã»gdalbuildvrt.exe
ã»gdalwarp.exe
ã»gdaldem.exe
C:\warmerda\bld\dataãã©ã«ããåºç¤å°å³æ å ± æ¨é«DEMãã¼ã¿å¤æãã¼ã«ã®ä¸ã«ã³ãã¼ãã¾ãã
6. projãã³ãã¼
C:\Users\mizutani\Desktop\proj-6.3.2\build\distro\share\projãã©ã«ããåºç¤å°å³æ å ± æ¨é«DEMãã¼ã¿å¤æãã¼ã«ã®ä¸ã«ã³ãã¼ãã¾ãã
以ä¸ã§ãã
è£è¶³
å¤æçµå.vbsã®ä¸ã§gdalã使ç¨ããããã®ãç°å¢å¤æ°ãè¨å®ãã¦ããã¾ãã
tempEnv.Item("GDAL_DATA") = "data"
tempEnv.Item("GDAL_FILENAME_IS_UTF8") = "YES"
tempEnv.Item("PROJ_LIB") = "proj"ããã