首頁  >  文章  >  運維  >  linux proj是什麼軟體

linux proj是什麼軟體

青灯夜游
青灯夜游原創
2022-05-11 17:56:443219瀏覽

在linux中,proj是一款通用座標轉換軟體,一個經緯度座標轉平面投影座標轉換庫,可將地理空間座標從一個座標參考系轉為另一個參考系。 PROJ支援一百多種不同的地圖投影,並可使用除了最晦澀的大地測量技術之外的所有方法來轉換基準面之間的座標。

linux proj是什麼軟體

本教學操作環境:CentOS7.6系統、Proj 7.1.0、Dell G3電腦。

proj是什麼軟體

PROJ是一款通用座標轉換軟體,一個經緯度座標轉平面投影座標轉換庫,可將地理空間座標從一個座標參考系(CRS) 轉換為另一個座標參考系(CRS)。這包括製圖投影和大地測量變換。

在開發GIS應用程式時,可能需要進行GPS座標計算兩點之間的距離,計算兩點連線的方位角,都可以利用這個開源的GIS轉換函式庫,進行轉換。

PROJ 包括命令列應用程序,用於輕鬆轉換來自文字檔案或直接來自使用者輸入的座標。除了命令列實用程式之外,PROJ 還公開了一個 應用程式介面,簡稱 API。 API 允許開發人員在自己的軟體中使用 PROJ 的功能,而無需自行實現類似的功能。

PROJ 最初只是作為一個製圖應用程序,讓使用者可以使用許多不同的製圖投影將大地座標轉換為投影座標。多年來,隨著需求變得明顯,對基準轉換的支援也慢慢進入 PROJ。今天,PROJ 支援一百多種不同的地圖投影,並且可以使用除了最晦澀的大地測量技術之外的所有方法來轉換基準面之間的座標。

Proj的編譯、安裝

版本資訊

##ServerVersionCentOS7.6##libcurl-devel7.29.0Proj
##sqlite3 3.33
libtiff-devel 4.0.3

7.1.0

前置安裝

Proj 需要安裝sqlite3、libtiff、libcurl-devel等

安装 sqlite3 >= 3.11
➜  yum install -y libtiff libtiff-devel.x86_64
➜  yum install -y libcurl-devel.x86_64

Proj 下載&& 安裝

Proj官網:https://proj.org /

# 下载源码
➜  wget https://download.osgeo.org/proj/proj-7.1.0.tar.gz
安裝說明查看原始程式碼主目錄下的INSTALL檔案

# 使用最简单的安装方式
# 解压
➜  tar zxf proj-7.1.0.tar.gz
➜  cd proj-7.1.0

# 编译 && 安装
➜  ./configure && make && make install

錯誤匯總

1、sqlite3 未安裝

➜  ./configure
checking for SQLITE3... configure: error: Package requirements (sqlite3 >= 3.11) were not met:

No package 'sqlite3' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SQLITE3_CFLAGS
and SQLITE3_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

錯誤解決

➜  wget https://www.sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
➜  tar -zxf sqlite-autoconf-3330000.tar.gz

# sqlite3 就使用最简单的编译三部曲安装。
➜  cd sqlite-autoconf-3330000
➜  ./configure && make && make install

# 环境变量
➜  find / -name "pkgconfig" -print
/usr/lib64/pkgconfig
/usr/share/pkgconfig
/usr/local/lib/pkgconfig
/usr/local/lib64/pkgconfig

# 可以设置PKG_CONFIG_PATH
# 或者设置 SQLITE3_CFLAGS SQLITE3_LIBS
➜  export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH

2、libtiff-4 未安裝

➜  ./configure
checking for TIFF... configure: error: Package requirements (libtiff-4) were not met:

No package 'libtiff-4' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables TIFF_CFLAGS
and TIFF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

錯誤解決

➜  yum install -y libtiff libtiff-devel.x86_64
3、curl-config 未安裝
checking for curl-config... not-found
configure: error: curl not found. If wanting to do a build without curl support (and thus without built-in networking capability), explictly disable it with --without-curl

錯誤解決###
➜  yum install -y libcurl-devel.x86_64
###相關推薦:《###Linux影片教學###》###

以上是linux proj是什麼軟體的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn