Compile and install GRASS and QGIS with GDAL/OGR Plugin/id: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(New page: {{Trans|Bahasa Indonesia}} Secara umum, coba cari terlebih dahulu paket biner generik (precompiled) (misalnya, RPM untuk hampir kebanyakan jenis Linux, .deb untuk Debian dan paket Install...)
 
Line 9: Line 9:
==Instalasi==
==Instalasi==


The install order should be kept due to inter-dependencies between the packages. Please keep the order or install all in a single step:
Perhatikan baik-baik urutan instalasi karena adanya keterkaitan antar paket. Jangan ubah urutan instalasi atau lakukan instalasi semua dalam satu langkah :


# [http://proj.maptools.org PROJ4] with [ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip Datum grids] (expand in nad/ before compiling)
# [http://proj.maptools.org PROJ4] dengan [ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip Datum grids] (ekstrak ke dalam folder nad/ sebelum melakukan kompilasi)
# Optional: [http://geos.refractions.net GEOS]
# Opsional: [http://geos.refractions.net GEOS]
# Optional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite is needed for QGIS)
# Opsional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite diperlukan untuk QGIS)
# [http://www.gdal.org GDAL/OGR] without GRASS support
# [http://www.gdal.org GDAL/OGR] tanpa dukungan GRASS
# [http://grass.itc.it GRASS 6]
# [http://grass.itc.it GRASS 6]
# [http://www.gdal.org/dl/ GDAL/OGR-GRASS plugin] - file: gdal-grass-1.4.3.tar.gz (or later)
# [http://www.gdal.org/dl/ GDAL/OGR-GRASS plugin] - file: gdal-grass-1.4.3.tar.gz (or later)
## Use the latest plugin '''source code''' version available. The code is fairly stable so the version doesn't need to match the latest GDAL version to keep working. Generally if an update is needed it will be issued, otherwise the existing (well tested) version will be left in place.
## Gunakan '''source code'' plugin versi terakhir yang tersedia. Kode-kode yang ada relatif stabil, sehingga tidak diperlukan versi terakhir untuk mengikuti versi GDAL yang terakhir. Secara umum, jika sebuah update diperlukan, akan diberitahukan sebelumnya, jika tidak versi yang ada saat ini (yang telah teruji) akan dibiarkan disimpan.
## NOTE: the plugin needs to "see" the GRASS libraries. The best way is to add a file 'grass6.conf' into the directory /etc/ld.so.conf.d/ (edit as root) which contains the path to the GRASS libraries; then run 'ldconfig'. A script to configure/install easily can be found [http://mpa.itc.it/markus/useful/conf_install_gdal_ogr_grass_plugin.sh here].
## CATATAN: plugin harus "nyambung" dengan pustaka GRASS. Cara terbaik adalah dengan menambahkan sebuah berkas 'grass6.conf' ke dalam direktori /etc/ld.so.conf.d/ (ubah sebagai root) yang mengandung path ke pustaka GRASS; kemudian jalankan 'ldconfig'. Sebuah skrip untuk melakukan konfigurasi/instalasi dapat ditemukan dengan mudah di [http://mpa.itc.it/markus/useful/conf_install_gdal_ogr_grass_plugin.sh sini].
# [http://www.qgis.org QGIS] with GRASS support
# [http://www.qgis.org QGIS] dengan dukungan GRASS


==Usage of the plugin==
==Usage of the plugin==

Revision as of 08:46, 17 January 2009

This page is in progress of translating to Bahasa Indonesia.


Secara umum, coba cari terlebih dahulu paket biner generik (precompiled) (misalnya, RPM untuk hampir kebanyakan jenis Linux, .deb untuk Debian dan paket Install untuk MS-Windows dsb.). Silakan periksa halaman unduh situs GRASS untuk penyedia software.

Kompilasi

Urutan kompilasi haruslah diperhatikan baik-baik karena adanya saling-ketergantungan antar paket. Perhatikan baik-baik urutan yang diperlihatkan seperti berikut. Kompilasi GRASS diterangkan dalam Compile and Install/id.

Instalasi

Perhatikan baik-baik urutan instalasi karena adanya keterkaitan antar paket. Jangan ubah urutan instalasi atau lakukan instalasi semua dalam satu langkah :

  1. PROJ4 dengan Datum grids (ekstrak ke dalam folder nad/ sebelum melakukan kompilasi)
  2. Opsional: GEOS
  3. Opsional: PostgreSQL, mySQL, unixODBC, SQLite (SQLite diperlukan untuk QGIS)
  4. GDAL/OGR tanpa dukungan GRASS
  5. GRASS 6
  6. GDAL/OGR-GRASS plugin - file: gdal-grass-1.4.3.tar.gz (or later)
    1. Gunakan 'source code plugin versi terakhir yang tersedia. Kode-kode yang ada relatif stabil, sehingga tidak diperlukan versi terakhir untuk mengikuti versi GDAL yang terakhir. Secara umum, jika sebuah update diperlukan, akan diberitahukan sebelumnya, jika tidak versi yang ada saat ini (yang telah teruji) akan dibiarkan disimpan.
    2. CATATAN: plugin harus "nyambung" dengan pustaka GRASS. Cara terbaik adalah dengan menambahkan sebuah berkas 'grass6.conf' ke dalam direktori /etc/ld.so.conf.d/ (ubah sebagai root) yang mengandung path ke pustaka GRASS; kemudian jalankan 'ldconfig'. Sebuah skrip untuk melakukan konfigurasi/instalasi dapat ditemukan dengan mudah di sini.
  7. QGIS dengan dukungan GRASS

Usage of the plugin

  • GDAL: gdalinfo grassdata/spearfish60/PERMANENT/cellhd/aspect
  • OGR: ogrinfo -ro -so grassdata/spearfish60/PERMANENT/vector/roads/head
  • GRASS: only needs it for r.out.gdal
  • Mapserver: should see both raster and vector maps, define connection properly in the .map file
  • QGIS: needs it only for raster data

Troubleshooting

All stuff installed but QGIS doesn't see GRASS or r.out.gdal doesn't work?

  • Check if GDAL finds the plugin:
        gdal_translate --formats | grep -i grass
        GRASS (ro): GRASS Database Rasters (5.7+)
  • Check if the GRASS libs are found by the plugin. All libraries should be found (maybe you forgot to run 'ldconfig' if you didn't install from RPMs?):
        ldd /usr/lib/gdalplugins/gdal_GRASS.so
        ldd /usr/lib/gdalplugins/ogr_GRASS.so
  • Check if the GRASS plugins are in the right directory (check the 'Auto register' directory reported in the output):
        # remember that you have to specify the absolute path:
        export CPL_DEBUG=on
        gdalinfo /home/neteler/grassdata/spearfish60/PERMANENT/cellhd/roads
        ogrinfo -summary $HOME/grassdata/spearfish60/PERMANENT/vector/roads/head

Further Instructions

If you are still having trouble, please also visit "GRASS for Fedora Core 4" for more detailed GRASS and GDAL compilation and installation instructions developed by Isaac Ullah for Fedora Core 4.

There are good instructions on source code compiling here http://casoilresource.lawr.ucdavis.edu/drupal/node/123