2016-11-01 116 views
0

我真的很新,使用地理空間庫,我能夠安裝GDAL和PostGIS。我只是想檢查一下我是否真的能夠包含對於PostGIS需求的包GEOS和PROJ4。檢查版本/如果安裝PROJ4

我應該輸入哪些命令行來檢查它們的版本或者它們是否已安裝?謝謝!

編輯(我需要的只是proj4檢查):

PostgreSQL的版本:$ psql --version

的PostGIS版本:連接到數據庫,=# SELECT PostGIS_full_version();

GDAL版本:$ gdal-info --version

GEOS版本:$ geos-config --version

回答

2

我建議使用pkg-config如果可以的話,因爲它可以讓你查詢

  • 如果庫安裝
  • 安裝
  • 什麼版本的版本是否通過最低版本要求比較

而且實際上只是在sf repo的評論中詳細描述了所有這些,這也是在地理空間s步伐。

報價:

[email protected]:~$ pkg-config --atleast-version=2.1.0 gdal && echo "Yes we are good" 
[email protected]:~$ pkg-config --atleast-version=2.1.0 gdal || echo "Insufficient" 
Insufficient 
[email protected]:~$ 

我沒有proj4安裝,所以我不能說明這一點。

編輯:我太早說話 - 我確實有它:

[email protected]:~$ pkg-config --modversion proj 
4.9.2 
[email protected]:~$ pkg-config --atleast-version=4.9.0 proj && echo "Yes" 
Yes 
[email protected]:~$ 
+0

喜@Dirk感謝您對本! :)) – Reiion

相關問題