Difference between revisions of "Γεωχωρικές Εφαρμογές Ανοιχτού Κώδικα υπό το Ubuntu-Linux (8.04)"

From OSGeo
Jump to navigation Jump to search
Line 1: Line 1:
'''  ~ - ~  Υπό κατασκευή...  ~ - ~  Under construction...  ~ - ~  '''
+
=== '''  ~ - ~  Υπό κατασκευή...  ~ - ~  Under construction...  ~ - ~  ''' ===
 
----
 
----
 
Αυτή η σελίδα (θα) περιγράφει βήμα προς βήμα την εγκατάσταση ανοιχτού κώδικα εφαρμογών διαχείρισης γεωχωρικών δεδομένων. Οι οδηγίες αφορούν στην εγκατάσταση των εφαρμογών χρησιμοποιώντας τον πηγαίο κώδικα.
 
Αυτή η σελίδα (θα) περιγράφει βήμα προς βήμα την εγκατάσταση ανοιχτού κώδικα εφαρμογών διαχείρισης γεωχωρικών δεδομένων. Οι οδηγίες αφορούν στην εγκατάσταση των εφαρμογών χρησιμοποιώντας τον πηγαίο κώδικα.
 
----
 
----
 +
== Γενικά ==
 +
* Για πρακτικούς λόγους είναι "σωστό" να δημιουργηθεί ένας κεντρικός κατάλογος στον οποίο θα συγκεντρωθούν οι πηγαίοι κώδικες των εφαρμογών/προγραμμάτων που πρόκειταιτα να μεταγγλωτισθούν.
 +
* ...
 +
* ...
 +
* Αναφορά του καταλόγου '''/usr/local/lib''' στο αρχείο '''/etc/ld.so.conf'''
  
 
== Βασικά πακέτα υποστήριξης των εφαρμογών διαχείρισης γεωχωρικών δεδομένων (;)==
 
== Βασικά πακέτα υποστήριξης των εφαρμογών διαχείρισης γεωχωρικών δεδομένων (;)==
Line 9: Line 14:
  
 
Χαρτογραφικές προβολές
 
Χαρτογραφικές προβολές
 +
 +
* Λήψη των συμπιεσμένων αρχείων που περιέχουν τις χαρτογραφικές προβολές '''proj-4.6.1.tar.gz'''  και '''proj-datumgrid-1.4.tar.gz''' από http://trac.osgeo.org/proj
 +
 +
* Μετακίνηση στον κατάλογο /usr/local/src και αποσυμπίεση ## Ο πηγαίος κώδικας μπορεί να τοποθετηθεί και σε αλλο κατάλογο αρκεί να του δοθούν τα απαραίτητα δικαιώματα εγγραφής-ανάγνωσης-εκτέλεσης.
 +
tar xzvf proj-4.6.1.tar.gz
 +
 +
* Μετακίνηση του αρχείου proj-datumgrid-1.3.tar.gz στον κατάλογο proj/nad και αποσυμπίεση
 +
cd /usr/local/src/proj/nad
 +
tar xzvf proj-datumgrid-1.3.tar.gz
 +
 +
* Προετοιμασία ( Ρύθμιση;)
 +
./configure
 +
 +
* Μεταγλώττιση
 +
make
 +
 +
* Εγκατάσταση
 +
sudo make install
 +
  
  
 
'''• GEOS'''
 
'''• GEOS'''
  
[...]
+
* Λήψη του πηγαίου κώδικα (αρχείο '''geos-3.0.0.tar.bz2''')
 +
* Μετακίνηση στον "κεντρικό κατάλογο" και αποσυμπίεση
 +
bunzip geos-3.0.0.tar.bz2
 +
tar xvf  geos-3.0.0.tar
 +
 
 +
* Προετοιμασία
 +
./configure
 +
 
 +
* Μεταγλώττιση
 +
make
 +
 
 +
* Εγκατάσταση
 +
sudo make install
 +
 
 +
* Εκτέλεση του προγράμματος '''/sbin/ldconfig''' με δικαώματα υπερχρήστη
 +
sudo ldconfig
 +
 
  
 +
'''== BELOW ALL TO BE TRANSLATED/FORMATTED =='''
  
 
'''• GDAL'''
 
'''• GDAL'''
  
[...]
+
*** Must compile without GRASS support ***
 +
 
 +
#enter gdal_stable
 +
cd /usr/local/src/gdal_stable
 +
 
 +
#Download with svn ## or update with "svn up"
 +
 
 +
#Configure:
 +
CFLAGS="-g -Wall" LDFLAGS="-s" ./configure  --with-png=internal  --with-libtiff=internal  --with-geotiff=internal  --with-jpeg=internal  --with-gif=internal  --with-ecw=yes  --with-expat=yes  --with-expat-inc=/usr/include/  --with-expat-lib=/usr/lib  --with-sqlite3=yes  --with-geos=yes  --with-python  --with-libz=internal  --with-netcdf  --with-sqlite  --with-threads=yes  --without-grass  --without-ogdi  --with-pg=/usr/bin/pg_config  --with-xerces=yes
 +
 
 +
#compilation
 +
make
 +
 
 +
#installation
 +
sudo make install
 +
 
 +
 
 +
# Do not forget...
 +
sudo ldconfig
 +
 
 +
'''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
  
 
== Εφαρμογές διαχείρισης γεωχωρικών δεδομένων ==
 
== Εφαρμογές διαχείρισης γεωχωρικών δεδομένων ==
Line 24: Line 98:
 
'''• GRASS'''
 
'''• GRASS'''
  
[...]
+
#Download with svn
 +
 
 +
#Configure:
 +
CFLAGS="-g -Wall" LDFLAGS="-s" ./configure \
 +
    --enable-64bit \
 +
    --with-libs=/usr/lib64 \
 +
    --with-cxx \
 +
    --with-freetype=yes \
 +
    --with-freetype-includes="/usr/include/freetype2/" \
 +
    --with-postgres=no \
 +
    --with-sqlite=yes \
 +
    --enable-largefile=yes \
 +
    --with-tcltk-includes="/usr/include/tcl8.4/" \
 +
    --with-freetype-includes=/usr/include/freetype2 \
 +
    --with-opengl-libs=/usr/include/GL \
 +
    --with-readline \
 +
    --with-python=yes \
 +
    --with-proj-share=/usr/share/proj/ \
 +
    --with-wxwidgets \
 +
    --with-cairo
  
  
 
'''• GDAL-GRASS-plugin'''
 
'''• GDAL-GRASS-plugin'''
  
[...]
+
# create grass6.conf or add in ld.so.conf the "GRASS library path"
 +
 
 +
 
 +
# configure ## point to grass installation as needed
 +
./configure --prefix=/usr/local --with-gdal=/usr/local/bin/gdal-config --with-grass=/usr/local/grass-6.4.svn/ --with-autoload="/usr/local/lib/gdalplugins/" --with-ld-shared="g++ -shared" 
 +
 
 +
#compilation
 +
make
 +
 
 +
#installation
 +
sudo make install
  
  
 
'''• QGIS'''
 
'''• QGIS'''
  
[...]
+
# Compile qgis source code following steps described in the wiki
 +
 
 +
# Get qgis from svn under the desired folder (I use /usr/local/src)
 +
sudo apt-get install svn
 +
 
 +
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis
 +
 
 +
# Install some dependencies
 +
sudo apt-get install libqt4-core libqt4-debug libqt4-debug-dev libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
 +
 
 +
### This step is required if two versions of qt are there!
 +
#/usr/bin/qmake -> /etc/alternatives/qmake
 +
sudo update-alternatives --config qmake
 +
sudo update-alternatives --config uic
 +
sudo update-alternatives --config designer
 +
sudo update-alternatives --config assistant
 +
sudo update-alternatives --config qtconfig
 +
sudo update-alternatives --config moc
 +
sudo update-alternatives --config lupdate
 +
sudo update-alternatives --config lrelease
 +
sudo update-alternatives --config linguist
 +
 
 +
# more dependencies or making sure that compile tools are there!
 +
sudo apt-get install libhdf4g-dev libhdf4g-run python-dev libgsl0-dev g++ libjasper-dev libtiff4-dev subversion libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
 +
 
 +
# some tip to speed-up compilation as suggested in qgis wiki
 +
cd /usr/local/bin
 +
sudo ln -s /usr/bin/ccache gcc
 +
sudo ln -s /usr/bin/ccache g++
 +
 
 +
# configure - compile - install
 +
cd /usr/local/src/qgis/
 +
 
 +
mkdir build
 +
 
 +
cd build
 +
 
 +
ccmake ..
 +
 
 +
make
 +
 
 +
sudo make install
 +
 
 +
# launch qgis
 +
qgis
 +
 
 +
# install r, rpy, numpy
 +
sudo apt-get install r-base
 +
sudo apt-get install python-rpy
 +
sudo apt-get install python-numpy
  
  
 
'''• Starspan'''
 
'''• Starspan'''
  
[...]
+
#download and prepare
 +
tar zxf starspan-XXXX.tar.gz
 +
cd starspan-XXXX
 +
 
 +
#configure
 +
./configure --with-grass=/usr/local/grass-6.4.svn
 +
 
 +
#compile
 +
make
 +
 
 +
#install
 +
make install

Revision as of 14:21, 22 October 2008

~ - ~ Υπό κατασκευή... ~ - ~ Under construction... ~ - ~


Αυτή η σελίδα (θα) περιγράφει βήμα προς βήμα την εγκατάσταση ανοιχτού κώδικα εφαρμογών διαχείρισης γεωχωρικών δεδομένων. Οι οδηγίες αφορούν στην εγκατάσταση των εφαρμογών χρησιμοποιώντας τον πηγαίο κώδικα.


Γενικά

  • Για πρακτικούς λόγους είναι "σωστό" να δημιουργηθεί ένας κεντρικός κατάλογος στον οποίο θα συγκεντρωθούν οι πηγαίοι κώδικες των εφαρμογών/προγραμμάτων που πρόκειταιτα να μεταγγλωτισθούν.
  • ...
  • ...
  • Αναφορά του καταλόγου /usr/local/lib στο αρχείο /etc/ld.so.conf

Βασικά πακέτα υποστήριξης των εφαρμογών διαχείρισης γεωχωρικών δεδομένων (;)

• PROJ4

Χαρτογραφικές προβολές

  • Λήψη των συμπιεσμένων αρχείων που περιέχουν τις χαρτογραφικές προβολές proj-4.6.1.tar.gz και proj-datumgrid-1.4.tar.gz από http://trac.osgeo.org/proj
  • Μετακίνηση στον κατάλογο /usr/local/src και αποσυμπίεση ## Ο πηγαίος κώδικας μπορεί να τοποθετηθεί και σε αλλο κατάλογο αρκεί να του δοθούν τα απαραίτητα δικαιώματα εγγραφής-ανάγνωσης-εκτέλεσης.
tar xzvf proj-4.6.1.tar.gz
  • Μετακίνηση του αρχείου proj-datumgrid-1.3.tar.gz στον κατάλογο proj/nad και αποσυμπίεση
cd /usr/local/src/proj/nad
tar xzvf proj-datumgrid-1.3.tar.gz
  • Προετοιμασία ( Ρύθμιση;)
./configure
  • Μεταγλώττιση
make
  • Εγκατάσταση
sudo make install


• GEOS

  • Λήψη του πηγαίου κώδικα (αρχείο geos-3.0.0.tar.bz2)
  • Μετακίνηση στον "κεντρικό κατάλογο" και αποσυμπίεση
bunzip geos-3.0.0.tar.bz2
tar xvf  geos-3.0.0.tar
  • Προετοιμασία
./configure
  • Μεταγλώττιση
make
  • Εγκατάσταση
sudo make install
  • Εκτέλεση του προγράμματος /sbin/ldconfig με δικαώματα υπερχρήστη
sudo ldconfig


== BELOW ALL TO BE TRANSLATED/FORMATTED ==

• GDAL

      • Must compile without GRASS support ***
#enter gdal_stable
cd /usr/local/src/gdal_stable
#Download with svn ## or update with "svn up"
#Configure:
CFLAGS="-g -Wall" LDFLAGS="-s" ./configure  --with-png=internal  --with-libtiff=internal  --with-geotiff=internal  --with-jpeg=internal  --with-gif=internal  --with-ecw=yes  --with-expat=yes  --with-expat-inc=/usr/include/  --with-expat-lib=/usr/lib  --with-sqlite3=yes  --with-geos=yes  --with-python  --with-libz=internal  --with-netcdf  --with-sqlite  --with-threads=yes  --without-grass   --without-ogdi  --with-pg=/usr/bin/pg_config  --with-xerces=yes
#compilation
make
#installation
sudo make install


# Do not forget...
sudo ldconfig

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

Εφαρμογές διαχείρισης γεωχωρικών δεδομένων

• GRASS

#Download with svn
#Configure:
CFLAGS="-g -Wall" LDFLAGS="-s" ./configure \
   --enable-64bit \
   --with-libs=/usr/lib64 \
   --with-cxx \
   --with-freetype=yes \
   --with-freetype-includes="/usr/include/freetype2/" \
   --with-postgres=no \
   --with-sqlite=yes \
   --enable-largefile=yes \
   --with-tcltk-includes="/usr/include/tcl8.4/" \
   --with-freetype-includes=/usr/include/freetype2 \
   --with-opengl-libs=/usr/include/GL \
   --with-readline \
   --with-python=yes \
   --with-proj-share=/usr/share/proj/ \
   --with-wxwidgets \
   --with-cairo


• GDAL-GRASS-plugin

# create grass6.conf or add in ld.so.conf the "GRASS library path"


# configure ## point to grass installation as needed
./configure --prefix=/usr/local --with-gdal=/usr/local/bin/gdal-config --with-grass=/usr/local/grass-6.4.svn/ --with-autoload="/usr/local/lib/gdalplugins/" --with-ld-shared="g++ -shared"  
#compilation
make
#installation
sudo make install


• QGIS

# Compile qgis source code following steps described in the wiki
# Get qgis from svn under the desired folder (I use /usr/local/src)
sudo apt-get install svn
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis
# Install some dependencies
sudo apt-get install libqt4-core libqt4-debug libqt4-debug-dev libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
### This step is required if two versions of qt are there!
#/usr/bin/qmake -> /etc/alternatives/qmake
sudo update-alternatives --config qmake
sudo update-alternatives --config uic
sudo update-alternatives --config designer
sudo update-alternatives --config assistant
sudo update-alternatives --config qtconfig
sudo update-alternatives --config moc
sudo update-alternatives --config lupdate
sudo update-alternatives --config lrelease
sudo update-alternatives --config linguist
# more dependencies or making sure that compile tools are there!
sudo apt-get install libhdf4g-dev libhdf4g-run python-dev libgsl0-dev g++ libjasper-dev libtiff4-dev subversion libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
# some tip to speed-up compilation as suggested in qgis wiki
cd /usr/local/bin
sudo ln -s /usr/bin/ccache gcc
sudo ln -s /usr/bin/ccache g++
# configure - compile - install
cd /usr/local/src/qgis/
mkdir build
cd build
ccmake ..
make
sudo make install
# launch qgis
qgis
# install r, rpy, numpy
sudo apt-get install r-base
sudo apt-get install python-rpy
sudo apt-get install python-numpy


• Starspan

#download and prepare
tar zxf starspan-XXXX.tar.gz
cd starspan-XXXX
#configure
./configure --with-grass=/usr/local/grass-6.4.svn
#compile
make
#install
make install