共計(jì) 2892 個(gè)字符,預(yù)計(jì)需要花費(fèi) 8 分鐘才能閱讀完成。
這篇“l(fā)inux proj 軟件怎么用”文章的知識(shí)點(diǎn)大部分人都不太理解,所以丸趣 TV 小編給大家總結(jié)了以下內(nèi)容,內(nèi)容詳細(xì),步驟清晰,具有一定的借鑒價(jià)值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來(lái)看看這篇“l(fā)inux proj 軟件怎么用”文章吧。
在 linux 中,proj 是一款通用坐標(biāo)轉(zhuǎn)換軟件,一個(gè)經(jīng)緯度坐標(biāo)轉(zhuǎn)平面投影坐標(biāo)轉(zhuǎn)換庫(kù),可將地理空間坐標(biāo)從一個(gè)坐標(biāo)參考系轉(zhuǎn)為另一個(gè)參考系。PROJ 支持一百多種不同的地圖投影,并可使用除了最晦澀的大地測(cè)量技術(shù)之外的所有方法來(lái)轉(zhuǎn)換基準(zhǔn)面之間的坐標(biāo)。
本教程操作環(huán)境:CentOS7.6 系統(tǒng)、Proj 7.1.0、Dell G3 電腦。
proj 是什么軟件
PROJ 是一款通用坐標(biāo)轉(zhuǎn)換軟件,一個(gè)經(jīng)緯度坐標(biāo)轉(zhuǎn)平面投影坐標(biāo)轉(zhuǎn)換庫(kù),可將地理空間坐標(biāo)從一個(gè)坐標(biāo)參考系(CRS)轉(zhuǎn)換為另一個(gè)坐標(biāo)參考系(CRS)。這包括制圖投影和大地測(cè)量變換。
在開(kāi)發(fā) GIS 應(yīng)用時(shí),可能需要進(jìn)行 GPS 坐標(biāo)計(jì)算兩點(diǎn)之間的距離,測(cè)算兩點(diǎn)連線(xiàn)的方位角,都可以利用這個(gè)開(kāi)源的 GIS 轉(zhuǎn)換庫(kù),進(jìn)行轉(zhuǎn)換。
PROJ 包括命令行應(yīng)用程序,用于輕松轉(zhuǎn)換來(lái)自文本文件或直接來(lái)自用戶(hù)輸入的坐標(biāo)。除了命令行實(shí)用程序之外,PROJ 還公開(kāi)了一個(gè) 應(yīng)用程序編程接口,簡(jiǎn)稱(chēng) API。API 允許開(kāi)發(fā)人員在他們自己的軟件中使用 PROJ 的功能,而無(wú)需自己實(shí)現(xiàn)類(lèi)似的功能。
PROJ 最初只是作為一個(gè)制圖應(yīng)用程序,讓用戶(hù)可以使用許多不同的制圖投影將大地坐標(biāo)轉(zhuǎn)換為投影坐標(biāo)。多年來(lái),隨著需求變得明顯,對(duì)基準(zhǔn)轉(zhuǎn)換的支持也慢慢進(jìn)入 PROJ。今天,PROJ 支持一百多種不同的地圖投影,并且可以使用除了最晦澀的大地測(cè)量技術(shù)之外的所有方法來(lái)轉(zhuǎn)換基準(zhǔn)面之間的坐標(biāo)。
Proj 的編譯、安裝
版本信息
ServerVersionCentOS7.6sqlite33.33libtiff-devel4.0.3libcurl-devel7.29.0Proj7.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 官網(wǎng):https://proj.org/
# 下載源碼
? wget https://download.osgeo.org/proj/proj-7.1.0.tar.gz
安裝說(shuō)明查看源代碼主目錄下的 INSTALL 文件
# 使用最簡(jiǎn)單的安裝方式
# 解壓
? tar zxf proj-7.1.0.tar.gz
? cd proj-7.1.0
# 編譯 安裝
? ./configure make make install
錯(cuò)誤匯總
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.
錯(cuò)誤解決
? wget https://www.sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
? tar -zxf sqlite-autoconf-3330000.tar.gz
# sqlite3 就使用最簡(jiǎn)單的編譯三部曲安裝。? cd sqlite-autoconf-3330000
? ./configure make make install
# 環(huán)境變量
? find / -name pkgconfig -print
/usr/lib64/pkgconfig
/usr/share/pkgconfig
/usr/local/lib/pkgconfig
/usr/local/lib64/pkgconfig
# 可以設(shè)置 PKG_CONFIG_PATH
# 或者設(shè)置 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.
錯(cuò)誤解決
? 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
錯(cuò)誤解決
? yum install -y libcurl-devel.x86_64
以上就是關(guān)于“l(fā)inux proj 軟件怎么用”這篇文章的內(nèi)容,相信大家都有了一定的了解,希望丸趣 TV 小編分享的內(nèi)容對(duì)大家有幫助,若想了解更多相關(guān)的知識(shí)內(nèi)容,請(qǐng)關(guān)注丸趣 TV 行業(yè)資訊頻道。