gdal

Major issue overlaying GeoTIF in Mapbox GL JS

被刻印的时光 ゝ 提交于 2019-12-08 09:33:12
问题 I have some general questions to understand what has become a very serious issue in my project. I hope that I might come to some sort of understanding on what is happening here, as I am perplexed well over 2 months into this issue. Let me just dive in : I am in the process of making a weather app using Mapbox which displays both radar (rain) and satellite (visible clouds) over the state of Texas. I am using image overlays to accomplish this. The process is simple, but the overlays are not

how to convert geotiff to jpg in python or java?

送分小仙女□ 提交于 2019-12-08 06:24:14
问题 i have a geotiff images that have 3bands. band1,2 is a actual image values and band3 is a instance angle value. band1,2 is float32 data type under code is that i try before. but it doesn't work. i think band data's range is too large, so it doesn't from osgeo import gdal, osr, ogr from PIL import Image import numpy as np ds = gdal.Open('image path', gdal.GA_ReadOnly) rb = ds.GetRasterBand(1) test = rb.ReadAsArray() rb2 = ds.GetRasterBand(2) test2 = rb2.ReadAsArray() rb3 = ds.GetRasterBand(3)

Create shapefile from tif file using GDAL

人走茶凉 提交于 2019-12-08 04:01:58
问题 I am using library gdal to load a tiff file and create a shapefile. When I load my shapefile with QGIS GUI, There are no informations on the elevation. I would like to keep the elevation while the transformation. import os from osgeo import gdal,ogr,osr,gdalnumeric import numpy as np # this allows GDAL to throw Python Exceptions gdal.UseExceptions() print "reading tif file..." try: ds = gdal.Open( "file.tif" ) except RuntimeError, e: print 'Unable to open file' print e sys.exit(1) try:

Properly scale a vector to fit a raster layer

折月煮酒 提交于 2019-12-08 02:12:12
问题 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

Beanstalk Migration Failing for Geodjango

家住魔仙堡 提交于 2019-12-08 01:56:54
问题 I want to deploy geodjango in aws beanstalk. I have already tried this solution. It worked before. commands: 01_yum_update: command: sudo yum -y update 02_epel_repo: command: sudo yum-config-manager -y --enable epel 03_install_gdal_packages: command: yum --enablerepo=epel -y install gdal gdal-devel packages: yum: git: [] postgresql96-devel: [] gettext: [] libjpeg-turbo-devel: [] libffi-devel: [] But right now it's showing this error. AttributeError: /usr/lib64/libgdal.so.1: undefined symbol:

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

…衆ロ難τιáo~ 提交于 2019-12-07 13:00:07
问题 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

Parsing osm.pbf data using GDAL/OGR python module

断了今生、忘了曾经 提交于 2019-12-07 12:59:32
问题 I'm trying to extract data from an OSM.PBF file using the python GDAL/OGR module. Currently my code looks like this: import gdal, ogr osm = ogr.Open('file.osm.pbf') ## Select multipolygon from the layer layer = osm.GetLayer(3) # Create list to store pubs pubs = [] for feat in layer: if feat.GetField('amenity') == 'pub': pubs.append(feat) While this little bit of code works fine with small.pbf files (15mb). However, when parsing files larger than 50mb I get the following error: ERROR 1: Too

no such option: --no-install

蹲街弑〆低调 提交于 2019-12-07 10:58:46
问题 I am trying to setup cartodb in ubuntu 12.04 by following https://github.com/danseely/cartodb-install/blob/master/DEV-INSTALLATION.md and as a part of the installation, there are some python dependencies to be installed.Below is a part which i tried export CPLUS_INCLUDE_PATH=/usr/include/gdal export C_INCLUDE_PATH=/usr/include/gdal sudo pip install --no-install GDAL While giving sudo pip install --no-install GDAL it is giving an error no such option --no-install. FYI i have python 2.7 dev

How can I get the installed GDAL/OGR version from python?

纵然是瞬间 提交于 2019-12-06 18:58:45
问题 How can I get the installed GDAL/OGR version from python? I aware of the gdal-config program and are currently using the following: In [3]: import commands In [4]: commands.getoutput('gdal-config --version') Out[4]: '1.7.2' However, I suspect there is a way to do this using the python API itself. Any dice? 回答1: gdal.VersionInfo() does what I want: >>> osgeo.gdal.VersionInfo() '1604' This works on both my Windows box and Ubuntu install. gdal.__version__ gives an error on my Windows

Ubuntu 16.04 安装 Grass gis 7.6.1

南楼画角 提交于 2019-12-06 15:44:07
在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