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的编译、安装

版本信息

Server Version
CentOS 7.6
sqlite3 3.33
libtiff-devel 4.0.3
libcurl-devel 7.29.0
Proj 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视频教程》

商匡云商
Logo
注册新帐户
对比商品
  • 合计 (0)
对比
0
购物车