![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
GDAL
文章平均质量分 52
齐鲁明月
get busy dying or get busy living
展开
-
VSCode远程调试Ubuntu部署的Go应用
参考[1] VSCode远程Linux的Golang开发环境搭建原创 2021-03-10 20:17:42 · 206 阅读 · 0 评论 -
GoLand远程调试在Multipass上部署Ubuntu应用
1. GoLandGoLand,安装在Windows上,作为客户端。2. Multipass安装Multipass虚机,部署Ubuntu,作为服务端。3. Ubuntu SSH设置SSH。3.1 检查SSH状态ps -e | grep sshroot@test:~# ps -e | grep ssh 2511 ? 00:00:00 sshd 2628 ? 00:00:00 sshd 3466 ? 00:00:00 sshd原创 2021-03-04 15:37:15 · 1499 阅读 · 1 评论 -
Multipass的Ubuntu20.04中libgdal-dev的安装
更新apt-get的源为国内源自带的apt-get源,下载速度慢。最好更新为国内源。要更新为国内源,需要编辑配置文件/etc/apt/sources.list。$ sudo vim /etc/apt/sources.list安装的Ubuntu的版本为20.04,需要找到与版本相匹配的国内源。# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main res原创 2021-03-07 09:27:10 · 1168 阅读 · 0 评论 -
GDAL/OGR空间过滤之SetSpatialFilter()
SetSpatialFilter函数SetSpatialFitler函数在osgeo.ogr模块下的Layer类中。SetSpatialFilter(Geometry filter)输入中的Geometry作为过滤的参数。示例Pythonfrom osgeo imiport ogrimport osshp_file = 'sates.shp'drv = ogr.GetDriverByName('ESRI Shapefile')ds = drv.Open(shp_file)lyr = d原创 2021-02-03 16:16:40 · 1733 阅读 · 0 评论 -
ogr2ogr转坐标
转坐标的方式有多种。可以用GDAL的Python绑定库。当然最方便的还是用ogr2ogr命令行的方式,效率又高。import subprocesscmd = 'ogr2ogr -f "ESRI Shapefile" out.shp in.shp -s_srs EPSG:4326 -t_srs EPSG:3857'subprocess.call(cmd) 如果要查看转换的进度,可以在加上参数-progress,即如下:import subprocesscmd = 'ogr2ogr -progre原创 2021-01-30 11:50:15 · 669 阅读 · 0 评论 -
GDAL/OGR空间过滤之SetSpatialFilterRect()
g = ogr.Open('world.shp')lyr = g.GetLyaer(0)lyr.SetSpatialFilterRect(-14, 37, 38, 72)for feat in lyr: print(feat.GetFieldAsString('NAME') + '------'+feat.GetFieldAsString('CAPITAL'))ALGERIA ---- ALGIERSBELGIUM ---- BRUSSELSLUXEMBOURG ---- LUXEMBOU原创 2021-01-27 15:26:30 · 1061 阅读 · 0 评论 -
Fiona写shapefile的效率
Fiona关于性能的描述之一Fiona翻译Fiona’s performance is relatively more slow if you only need access to a single record field – and of course if you just want to reproject or filter data files, nothing beats the ogr2ogr program - but Fiona’s performance is原创 2021-01-22 18:19:30 · 163 阅读 · 0 评论 -
GDAL/OGR 创建空间索引
GDAL/OGR 创建控件索引命令行的方式$ ogrinfo -sql "CREATE SPATIAL INDEX ON property_view" "property_view.shp"Python的方式from osgeo import ogrdrv = ogr.GetDriverByName('ESRI Shapefile')ds = drv.Open(shp_file, 1)lyr = ds.GetLayer()lyr_name = lyr.GetName()sql = 'CR原创 2021-01-19 11:32:31 · 640 阅读 · 0 评论 -
GDAL集成FileGDB
GDAL集成FileGDBGDAL对GDB的支持以插件的方式测试参考GDAL对GDB的支持FileGDB,即ESRI File Geodatabase,是ESRI的一种存储空间数据的格式,GDAL对FileGDB的支持主要通过两种驱动实现,一种是OpenFileGDB,另一种是FileGDB。两种驱动的区别在于,驱动OpenFileGDB只支持对FileGDB文件的读操作,不支持写操作,而驱动FileGDB是由ESRI公司提供,既可以读文件,也支持写。以插件的方式可以以插件(plugin)的方式将原创 2021-01-12 09:41:22 · 2728 阅读 · 1 评论 -
GDAL Python读取.pbf文件
GDAL原创 2020-08-09 08:21:52 · 1977 阅读 · 0 评论 -
CentOS 7下编译GDAL链接PDF之使用Poppler
一、前言在Linux(CentOS)平台上进行软件的编译工作,不仅是一项技术活,更是一项体力活。没有充沛的体力与精力,没有不达目标誓不罢休的精神,当然具备良好的技术能力是最基本的,是决然无法完成编译工作的。尽管从开始编译,已经过去了两周时间。尽管为了编译最后的库,首先需要编译它的依赖库,结果为编译依赖库,还要编译另外的若干个依赖库。经历了重重的依赖库泥潭,在周末的深夜,坐在计算机面前,心底...原创 2019-06-16 20:47:17 · 1261 阅读 · 0 评论 -
GDAL集成MrSID编译及fatal error C1189问题
参考:MrSID Decode SDK (DSDK): https://www.lizardtech.com/developer/portal-sdk原创 2018-05-30 17:29:52 · 556 阅读 · 0 评论 -
GDAL编译,链接cUrl库(libCurl)
一、环境Windows 10, VS 2017GDAL 2.40.0,cUrl 7.63.0二、编译过程1. 准备下载cUrl 下载GDAL2. 编译cUrl命令行方式进入winbuild目录,运行: nmake /f makefile.vc mode=dll machine=x643. 编译GDAL修改nmake.opt文件# Uncomment t...原创 2013-08-09 14:57:06 · 1957 阅读 · 0 评论