gdal

Package missing in Alpine Linux even though it's listed on package repo website [closed]

时光怂恿深爱的人放手 提交于 2020-02-03 04:34:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . I am attempting to build out a Docker container that runs Alpine Linux with GDAL and the necessary Python hooks: FROM python:3.6-alpine RUN apk update RUN apk add py-gdal gdal RUN pip install uwsgi RUN mkdir /code WORKDIR /code COPY requirements.txt . RUN pip install -r requirements.txt COPY . . CMD ["uwsgi",

Find pixel coordinates from lat/long point in .geotiff using python and gdal

十年热恋 提交于 2020-01-25 08:59:26
问题 I have (lat,long) coordinate describing the position of a point in a .geotiff image. I wish to find the equivalent pixel coordinates of the lat,long ones inside the image. I succeded using gdaltransform from the command line with the following instruction : gdaltransform -i -t_srs epsg:4326 /path/imagename.tiff -17.4380493164062 14.6951949085676 But i would like to retrieve such type of equivalence from python code. I tried the following : from osgeo import osr source = osr.SpatialReference()

UnsatisfiedLinkError caused by org.gdal.ogr.ogrJNI.GetDriverCount()

不羁的心 提交于 2020-01-15 07:48:11
问题 I am developing in Java on Windows 7 with Eclipse (Luna). I am using gdal for some ogr processes and running the application from eclipse is fine, but running from command line on the same machine is running into problems. and I get the following: Caused by: java.lang.UnsatisfiedLinkError: org.gdal.ogr.ogrJNI.GetDriverCount()I at org.gdal.ogr.ogrJNI.GetDriverCount(Native Method) at org.gdal.ogr.ogr.GetDriverCount(ogr.java:170) I've added all of the directories under gdal that contain dlls and

Pyinstaller - Calling GDAL from os.system (gdal_translate)

随声附和 提交于 2020-01-13 20:20:20
问题 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

Pyinstaller - Calling GDAL from os.system (gdal_translate)

折月煮酒 提交于 2020-01-13 20:18:48
问题 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

unable to load “gcs.csv” file in gdal

我只是一个虾纸丫 提交于 2020-01-13 06:58:10
问题 This question might be repeat but I did not get answer. I have write flowing code in python ide . out_srs = osr.SpatialReference() **self.out_srs.ImportFromEPSG(4326)** It run fine but when i run it from application it cause an error as follows Note - Error in line enclosed in 2 stars ----- "Unable to load EPSG support gcs.csv file check setting GDAL_DATA environment variable which point to gdal library contains EPSG.csv file" I have done it but i still get this error. but this code run

Error while installing GDAL

烂漫一生 提交于 2020-01-12 04:01:09
问题 I'm trying to install GDAL through pip. But I'm getting this error: extensions/gdal_wrap.cpp:3089:27: fatal error: cpl_vsi_error.h: No such file or directory #include "cpl_vsi_error.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 I used these commands: sudo apt-get install libgdal-dev export CPLUS_INCLUDE_PATH=/usr/include/gdal export C_INCLUDE_PATH=/usr/include/gdal pip install GDAL Can anyone tell me how to install it ? 回答1: Check that you

Resize huge images in Python (bigger than available RAM)

安稳与你 提交于 2020-01-10 20:11:33
问题 I would like to resize and split huge (1 TB) images to 256x256 pixel tiles (Zoomify / OSM / Google Maps / XYZ schema). Images would be in BigTIFF or PSB (Large Document Format or Photoshop Big) format. What are the available libraries which can do this? I was having a look at GDAL but it was producing quite blurry output and I couldn't set it to interpolate better. Ideally I'd be looking at a Lanczos interpolator for such task. Are there any native Python libraries, or wrappers for C based

Resize huge images in Python (bigger than available RAM)

痴心易碎 提交于 2020-01-10 20:11:30
问题 I would like to resize and split huge (1 TB) images to 256x256 pixel tiles (Zoomify / OSM / Google Maps / XYZ schema). Images would be in BigTIFF or PSB (Large Document Format or Photoshop Big) format. What are the available libraries which can do this? I was having a look at GDAL but it was producing quite blurry output and I couldn't set it to interpolate better. Ideally I'd be looking at a Lanczos interpolator for such task. Are there any native Python libraries, or wrappers for C based

How do I change a raster's geotransform with GDAL?

你。 提交于 2020-01-05 02:58:27
问题 I'm trying to use GDAL to set the geotransform of a new raster that I've created by following the steps outlined in the GDAL API Tutorial. # create the new dataset driver = gdal.GetDriverByName('GTiff') dataset = driver.Create('test_gt.tif', 60, 60, 1, gdal.GDT_Float32) # check the default geotransform print dataset.GetGeoTransform() # prints (0, 1, 0, 0, 0, 1) # try to alter the geotransform and ensure that it has been set dataset.SetGeoTransform([0,1,0,0,0,-1]) print dataset.GetGeoTransform