Tag: gdal

PDAL:无法创build“裁剪”types的筛选器阶段

我想在python中使用pdal。 我开始了一个超级简单的裁剪: json = """{ "pipeline":[ "ARRA-LFTNE_NewYork_2010_000636.las", { "type":"crop", "bounds":"([616766.770,617765.46],[4510733.640,4511649.800])" }, "output.laz" ] }""" pipeline = pdal.Pipeline(unicode(json,encoding="utf-8")) pipeline.validate() # check if our JSON and options were good pipeline.loglevel = 8 #really noisy count = pipeline.execute() arrays = pipeline.arrays metadata = pipeline.metadata log = pipeline.log json来自pdal的hp https://www.pdal.io/pipeline.html#pipeline ,应该简单地裁剪图像。 但是,在validation过程中会失败并显示错误: Traceback (most recent call last): File "/src/test.py", […]

build立docker图像时无法安装包

我使用以下代码将gdal添加到我的泊坞窗图像中: FROM node:7-onbuild RUN apt-get -y update && apt-get -y install software-properties-common python-software-properties RUN add-apt-repository ppa:ubuntugis/ppa RUN apt-get -y update && apt-get -y install gdal-bin 在add-apt-repository之后执行apt-get -y update时,总会返回错误: W: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/jessie/main/binary-amd64/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead. 在执行docker build时,我添加了–no-cache 。 […]

不能连接到与GDAL ogr2ogr远程postgres

我试图通过Gdal ogr2ogr插入一个shapefile到PostgreSQL中,命令如下所示: ogr2ogr -f 'PostgreSQL' PG:dbname='dbname',user='user',host='172.17.2.176',password='password',port='5432' shapefile -nln 'cities' 但是,ogr2ogr似乎无法连接到单独的泊坞窗容器中的PosgreSQL。 所有的连接参数都是正确的,其他的连接都被成功的创build并且使用相同的连接参数执行到同一个PostgreSQL容器。 Laravel迁移,在这些表上执行命令之前检查数据库和表是否存在的命令行sql,以及使用COPY命令导入csv文件,都使用ogr2​​ogr命令中使用的相同连接参数成功运行到单独的PostgreSQL泊坞石器容器。 当我运行: ogrinfo 'PostgreSQL' PG:dbname='dbname',user='user',host='172.17.2.176',password='password',port='5432' 我得到一个错误:“无法打开数据源`PostgreSQL与以下驱动程序…” 列出的驱动程序之一是“ – > PostgreSQL” 这意味着PostgreSQL驱动程序被加载和启用? < – 一个混乱点 正在连接的用户具有超级用户权限,由官方PostgreSQL docker镜像中的.sh脚本创build: https : //github.com/docker-library/postgres/tree/master/9.4 据我可以看到,通过我的研究谷歌和文档,一切都是正确的,应该工作.. 超级用户权限,数据库连接正确的语法,驱动程序加载..我错过了什么? 我一直在努力做这个工作几天,我需要帮助。

在vrt文件(vsizip)中使用zip的相对path?

我正在尝试构build一个带有大量压缩tiff文件的vrt文件。 我发现这个xml命令在一个zip文件中添加一个tiff文件到vrt: <SourceFilename relativeToVRT="1">/vsizip/c:/data/DSM_633_54_TIF_UTM32-ETRS89.zip/DSM_1km_6333_546.tif</SourceFilename> 这工作正常,但问题是,它只适用于绝对path 。 由于我在docker工作,我不能使用绝对path,只有相对。 如果我只是使用相对path,它似乎无法find图像(它是全黑的,并且在QGis中打开它时,其值为1e [巨大数字])。 有没有办法使用相对path添加一个zip文件内的tiff图像到vrt?