Advertisement
Guest User

Compile GEOS, PROJ4 and GDAL from source

a guest
Mar 8th, 2018
1,174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. # Compile/install GEOS. Taken from:
  2. # http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GEOS_2
  3.  
  4. cd /tmp
  5. wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
  6. bunzip2 geos-3.4.2.tar.bz2
  7. tar xvf geos-3.4.2.tar
  8.  
  9. cd geos-3.4.2
  10.  
  11. ./configure && make && sudo make install
  12. sudo ldconfig
  13.  
  14. ##########################################
  15.  
  16. # Compile & install proj.4. Taken from:
  17. # http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#PROJ4
  18.  
  19. sudo apt-get install subversion
  20.  
  21. cd /tmp
  22. svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/
  23.  
  24. cd /tmp/proj/nad
  25. sudo wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip
  26.  
  27. unzip -o -q proj-datumgrid-1.5.zip
  28.  
  29. #make distclean
  30.  
  31. cd /tmp/proj/
  32.  
  33. ./configure && make && sudo make install && sudo ldconfig
  34.  
  35. ##########################################
  36.  
  37. # install gdal 1.10.1 - must happen after proj & geos
  38. # taken from:
  39. # http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GDAL
  40.  
  41. # sudo apt-get install libtiff4
  42.  
  43. cd /tmp
  44. svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable
  45. cd gdal_stable
  46. #make distclean
  47. CFLAGS="-g -Wall" LDFLAGS="-s" ./configure \
  48. --with-png=internal \
  49. --with-libtiff=internal \
  50. --with-geotiff=internal \
  51. --with-jpeg=internal \
  52. --with-gif=internal \
  53. --with-ecw=no \
  54. --with-expat=yes \
  55. --with-sqlite3=yes \
  56. --with-geos=yes \
  57. --with-python \
  58. --with-libz=internal \
  59. --with-netcdf \
  60. --with-threads=yes \
  61. --without-grass \
  62. --without-ogdi \
  63. --with-xerces=yes
  64.  
  65. #with-pg=/usr/bin/pg_config \
  66.  
  67. make -j2 && sudo make install && sudo ldconfig
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement