gdal

Ubuntu 16.04 安装 Grass gis 7.6.1

妖精的绣舞 提交于 2019-12-06 15:15:57
在Ubuntu上安装grassgis,最简单的方法是使用预编译好的包直接进行安装,当然也可以选择下载源码后自己编译再安装,在这里使用的是预编译包安装的方法,除了安装GRASSGIS之外,还需要安装依赖PROJ,GEOS,GDAL GRASS GIS安装 日更新的 GRASS GIS 7.x 安装包 sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable sudo add-apt-repository ppa:grass/grass-devel 2. 最新的 GRASS GIS 7.x 稳定版安装包 sudo add-apt-repository ppa:ubuntugis/ppa sudo add-apt-repository ppa:grass/grass-stable 3. 添加了ppa源之后,需要运行: sudo apt-get update 然后执行安装: sudo apt-get install grass PROJ 安装 # be sure to have an updated system sudo apt-get update && sudo apt-get upgrade -y # install PROJ sudo apt-get install libproj-dev proj-data proj

Extract Point From Raster in GDAL

左心房为你撑大大i 提交于 2019-12-06 14:00:42
问题 I have a raster file and a WGS84 lat/lon point. I would like to know what value in the raster corresponds with the point. My feeling is that I should use GetSpatialRef() on the raster object or one of its bands and then apply a ogr.osr.CoordinateTransformation() to the point to map it to the raster's space. My hope would then be that I could simply ask the rasters' bands what is at that point. However, the raster object doesn't seem to have a GetSpatialRef() or a way to access a geo-located

Properly scale a vector to fit a raster layer

岁酱吖の 提交于 2019-12-06 11:48:15
So I've created a clipped and reprojected raster image from a Natural Earth 2 data set. It is simple enough to set that as a base layer and project a vector layer on top of it. The problem I'm having is properly scaling the images so they align perfectly. Please refer to this block for the example: http://bl.ocks.org/mkessy/8545864 Here is what I've done so far: Use gdalwarp to reproject the raster to Albers Equal Area and clip to the bounding box of North Dakota, output the image to my desired resolution (960 x 500) In D3 I use the exact same projection and overlay the vector onto the raster

VS2015命令行工具X86和X64版本

假如想象 提交于 2019-12-06 10:41:38
今天使用vs命令行编译GDAL时,发现一坑,特此记下。注意VS2015命令行工具有x86,x64以及其他多个兼容版本,具体详见下图。我们一般使用VS命令行工具时,通过VS2015界面--->工具--->Visual studio 命令提示打开命令行(其实打开的是x86版本的),如下图所示:VS2015命令行x64版正确的打开方式如下:开始--->Visual Studio 2015--->Visual Studio Tools--->Windows Desktop Command Prompts--->VS2015 x64 本机工具命令提示符正确打开vs2015 x64版的命令行工具如下图所示:每天学习一点点,每天成长一点点。 --------------------- 作者:ye0915715 来源:CSDN 原文:https://blog.csdn.net/ye0915715/article/details/80919930 版权声明:本文为博主原创文章,转载请附上博文链接! 来源: oschina 链接: https://my.oschina.net/u/4000302/blog/3009993

gdal ReadAsarray for vrt extremely slow

巧了我就是萌 提交于 2019-12-06 08:49:02
问题 I am trying to simply subtract two rasters and save the result in another raster. One of the input images is a tif-file, the other is a vrt-file. (Output is tif) The files are very big, so I open them, divide them into tiles and run through each of them and then subtracting. The problem is that it is extremely slow! import gdal import numpy as np rA = gdal.Open(raFileName) rB = gdal.Open(rbFileName) nodataA = rA.GetRasterBand(1).GetNoDataValue() nodataB = rB.GetRasterBand(1).GetNoDataValue()

create gdal static library for xcode 9 (libgdal.a)

白昼怎懂夜的黑 提交于 2019-12-06 07:26:54
I need to create a gdal static library (libgdal.a) to use it in iOS. I tried this script Incorporating GDAL/OGR into an iOS project - A quick guide but it just work for iOS 6. And I also tried https://gist.github.com/lachlanhurst/745e1e1d196c3e697450 but I got a lot of warnings and errors and this script didn't generate the libgdal.a. Any suggestions? 来源: https://stackoverflow.com/questions/52124407/create-gdal-static-library-for-xcode-9-libgdal-a

Unable to install GDAL in python 3 using pip (clang failed with exit status 1)

*爱你&永不变心* 提交于 2019-12-06 07:20:13
问题 After running sudo pip3.4 install gdal from terminal (Mac OS X Mavericks) I obtain an error message saying that the 'col_port.h' file was not found and displaying the following error: command '/user/bin/clang/ failed with exit status 1 (the full message is below). I have gdal 1.11 (the complete framework version downloaded from kingchaos.com) and the most recent version of the Xcode command line tools -Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Here is the error that I get

Pyinstaller - Calling GDAL from os.system (gdal_translate)

两盒软妹~` 提交于 2019-12-06 04:28:36
Greetings learned fellows. Running 32bit Python2.7 on Windows 7. I'm have a question regarding including GDAL executables in a pyinstaller build. I am making a system call to run two GDAL functions from the FWTools release. These functions are in the PATH variable on windows C:\Program Files (x86)\FWTools2.4.7\bin and so it runs fine from the Python27 environment. However, this path is not carried over to the pyinstaller build. The code in question is calling a GDAL function to re-translate an image onto different geospatial co-ordinates. os.system("gdal_translate -of GTiff -a_ullr 694440.7939

Python 3: How to change image data in GDAL?

不想你离开。 提交于 2019-12-06 00:34:57
I have a GeoTIFF image that contains a color table and a single raster band with 8-bit table keys, and that uses LZW compression, that I load with gdal.Open . I also have a numpy array containing 24-bit RGB-values (for a blurred version of the image), corresponding to three 8-bit raster bands. I need to substitute these three raster bands for the raster band that is currently in the image, and then save the image (preferably as a new file if possible). How do I do that? I would like to keep the data in the numpy array in RGB form, so I would like to end up with three raster band instead of one

error while loading shared libraries: libgdal.so.1 in archlinux

最后都变了- 提交于 2019-12-06 00:28:57
I (myself a programm novice) get the following error message when starting a script in archlinux, which has been written by a friend: /usr/bin/psxy: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory /usr/bin/psbasemap: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory /usr/bin/ps2raster: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory /usr/bin/psxy: error while loading shared libraries: libgdal.so.1: cannot open