Questions tagged [gdal]

GDAL (Geospatial Data Abstraction Library) is a library for reading and writing raster geospatial data formats.

GDAL (Geospatial Data Abstraction Library) is a library for reading and writing raster geospatial data formats.

2184 questions
7
votes
2 answers

pip uninstall GDAL gives AttributeError: 'PathMetadata' object has no attribute 'isdir'

I'm trying to pip install geopandas as a fresh installation, so I want to remove existing packages like GDAL and fiona. I've already managed to pip uninstall fiona, but when I try to uninstall or reinstall GDAL it gives the following error…
lizard
  • 123
  • 2
  • 7
7
votes
2 answers

GDAL Raster Output

I'm trying to create a .tif file using GDAL in python. It's creating a file, but saying "no preview available" whenever I browse to it. Right now, I'm just trying to get it to make a copy of the input file. Here's my…
Pat
  • 199
  • 1
  • 2
  • 7
7
votes
3 answers

Speeding up iterating over Numpy Arrays

I am working on performing image processing using Numpy, specifically a running standard deviation stretch. This reads in X number of columns, finds the Std. and performs a percentage linear stretch. It then iterates to the next "group" of columns…
Jzl5325
  • 3,898
  • 8
  • 42
  • 62
7
votes
1 answer

how to set the USE_PATH_FOR_GDAL_PYTHON=YES environment variable to feed the PATH into os.add_dll_directory()

I've been running GDAL through python on anaconda for years with no problem. Today when I tried to import gdal I got this error code: On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH. If gdalXXX.dll is in the PATH, then set…
B-C B.
  • 183
  • 1
  • 5
7
votes
1 answer

creating elevation/height field gdal numpy python

I would like to create some elevation/heightfield rasters using python, gdal and numpy. I'm stuck on numpy (and probably python and gdal.) In numpy, I've been attempting the following: >>> a= numpy.linspace(4,1,4, endpoint=True) >>> b=…
Chris
  • 1,647
  • 1
  • 18
  • 25
7
votes
2 answers

Error building GDAL: PROJ_INCLUDE should be defined. PROJ >= 6 is a required dependency

I am trying to get GDAL 3.0.1 to work. Generating the Visual Studio 2017 project was a piece of cake, all I needed was to run generate_vcxproj.bat. But now I'm getting an error on this line of makefile.vc: !IF !DEFINED(PROJ_INCLUDE) !ERROR…
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
7
votes
2 answers

Possible bug in GDAL?

Given this file: http://mtarchive.geol.iastate.edu/2019/02/18/mrms/ncep/GaugeCorr_QPE_01H/GaugeCorr_QPE_01H_00.00_20190218-150000.grib2.gz … I get different output depending on the software I use. wgrib2 2019021815.grib2 -csv wgrib2.csv and cdo…
Rick Hitchcock
  • 35,202
  • 5
  • 48
  • 79
7
votes
3 answers

How to georeference an unreferenced aerial image using ground control points in python

I have a series of unreferenced aerial images that I would like to georeference using python. The images are identical spatially (they are actually frames extracted from a video), and I obtained ground control points for them by manually…
Kat
  • 311
  • 1
  • 3
  • 11
7
votes
1 answer

Building GDAL with all libraries static

I want to develop a small program that checks which polygons from a shapefile intersect a given rectangle. This program is to be used in a website (with PHP's exec() command). The problem is, my webserver cannot install GDAL, for reasons unknown to…
Rodrigo
  • 4,706
  • 6
  • 51
  • 94
7
votes
2 answers

pixel/array position to lat long gdal Python

I am trying to convert positions in a raster representing a .tif to the corresponding global coordinates. Converting the whole array to a tif and load it to QGIS everything is referenced fine, but using the below calculation method for single points…
niaR
  • 107
  • 1
  • 9
7
votes
1 answer

GDAL Virtualenv Python 3.6 Installation

I am having a brutal time getting gdal installed. I have a fresh install of Ubuntu Mint with a virtualenv Python 3.6 environment that I am trying to get GDAL installed on. After working through all the dependency requirements I now get the following…
Zexelon
  • 495
  • 5
  • 18
7
votes
3 answers

Django, GDAL and CircleCI 2

I have a Django app configured with GeoDjango that is failing on CircleCI 2.0 builds with the following error: django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library. Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH…
Anconia
  • 3,888
  • 6
  • 36
  • 65
7
votes
1 answer

Python 3.4 ImportError: No module named '_gdal_array'No module named '_gdal_array'

Despite learning python (2.7) several years ago, I am just starting to use it again. I am using python 3.4.4 and attempting to use the GDAL package to read a raster as an array. I followed the steps outlined here: …
7
votes
2 answers

Issue when imoporting GDAL : ImportError, Library not loaded, Image not found

Since yesterday I struggle to import some libraries such as GDAL (or iris) and I allways get the same type of outputs. >>> import gdal Traceback (most recent call last): File "", line 1, in File "gdal.py", line 28, in
Zoran
  • 309
  • 4
  • 9
7
votes
1 answer

How to integrate JNI shared library in Spring Boot application

I tried searching on the web but I could not find any relevant tutorial or how-to for integrating JNI shared libraries into Spring Boot project. I would like to integrate GDAL library with a small Spring Boot REST application. Is it even possible to…
mmesnjak
  • 169
  • 4
  • 14