GDALのインストール
./configure --with-static-proj4=/usr/local/lib
普通の./configureだけではproj4を認識しなかったのでパラメータをつける。
GDAL is now configured for i686-pc-linux-gnu
Installation directory: /usr/local
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
LIBTOOL support: yes
LIBZ support: external
GRASS support: no
CFITSIO support: no
PCRaster support: internal
NetCDF support: no
LIBPNG support: external
LIBTIFF support: internal (BigTIFF=yes)
LIBGEOTIFF support: internal
LIBJPEG support: external
8/12 bit JPEG TIFF: no
LIBGIF support: internal
OGDI support: no
HDF4 support: no
HDF5 support: no
Kakadu support: no
JasPer support: no
ECW support: no
MrSID support: no
MSG support: no
GRIB support: yes
EPSILON support: no
cURL support (wms/wcs/...):no
PostgreSQL support: yes
MySQL support: no
Ingres support: no
Xerces-C support: no
NAS support: no
Expat support: no
ODBC support: no
PGeo support: no
PCIDSK support: internal
OCI support: no
GEORASTER support: no
SDE support: no
DODS support: no
SQLite support: no
SpatiaLite support: no
DWGdirect support no
INFORMIX DataBlade support:no
GEOS support: yes
VFK support: yes
SWIG Bindings: no
Statically link PROJ.4: yes
enable OGR building: yes
enable pthread support: no
hide internal symbols: no
makeしてmake install
Grassのインストール
./configure GRASS --with-gdal=/usr/local/bin/gdal-config --with-freetype-includes=/usr/local/include/freetype2/freetype
すると、以下のエラーが出る。
configure: error: *** Unable to locate lex.
対応策はここに必要なライブラリー一覧がある。
上記エラーはflexがないようだ。
flexをインストールしようとしたらgnu m4がないとのエラーが出た。
ここからgnu m4を取得して
./configure & make & make install
次に足りないのはbiston
ここから取得で同じく./configure & make & make install
次に足りないのはnucurseだと!
ここから 取得で同じく./configure & make & make install
まだあるのかよ!次はtiff
ここから取得で同じく./configure & make & make install
まだまだだ!次はOpenGL
まず、ビデオカードが対応しているか確認する。
$glxinfo | head
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes (これがあるからOKらしい)
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_ARB_multisample, GLX_NV_float_buffer,
でOpenGLをインストール
sudo apt-get install libgl1-mesa-dev freeglut3-dev libglew1.5-dev libxmu-dev libxi-dev
参考はここでした。
まだあるのかよ!次はTcl/Tkでここから取得。./configure & make & make install
はい次、FFTW ここから取得。./configure & make & make install
よし、最後FreeTypeここから取得。./configure & make & make install
make & make installしたらgrass64で起動する。
GrassをPostgreSQLへ接続するための設定
(1)./etc/odbcinst.iniの設定
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/odbc/libodbcpsql.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
FileUsage = 1
(2).$HOME/.odbc.ini
[mydb]
Description = PostgreSQL
Driver = PostgreSQL
Trace = No
TraceFile =
Database = mydb
Servername = localhost
UserName = kumagon
Password = 1234
Port = 5432
Protocol = 8.0
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =
データのインポート
v.in.ogr -o dsn="PG:host=localhost dbname=mydb user=kumagon password=1234" layer=mesh_250m_osaka output=mesh_250m_osaka type=boundary,centroid
参考サイト