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
0
votes
1 answer

Spatialite in Cygwin

Using the latest setup-x86_64_2.919 to install Cygwin, I just noticed that Spatialite is not there. So, I installed it from the source code (libspatialite-5.0.1.tar.gz) and I re-installed gdal-3.5.1 from the setup file. It seems that gdal has not…
Gery
  • 8,390
  • 3
  • 22
  • 39
0
votes
1 answer

Symbol lookup error when installing QGIS after upgrading to Ubuntu 22.04

I had QGIS working on Ubuntu 21.10 but when I upgraded to 22.04 something happened and it was no longer there, so I proceeded to install it once again (instructions), but when I run qgis i get: /usr/bin/qgis.bin: symbol lookup error:…
0
votes
1 answer

Determine coordinates at highest point of raster

I have a raster from which I want to derive the coordinates of the highest point (elevation) in the raster. Getting the highest elevation is easy, but I don't know how to get its coordinates. What I have so far: # required modules from osgeo import…
Vilerala
  • 41
  • 4
0
votes
0 answers

Implement solution to get stable gdal and fiona library versions on Windows

I am trying to read a shapefile using python's geopandas in vscode. I successfully installed geopandas using conda, but when I use gpd.read_file, I get the following error output: ImportError: the 'read_file' function requires the 'fiona' package,…
prayner
  • 393
  • 1
  • 10
0
votes
0 answers

Error message when trying to run a code with GDAL

i'm trying to solve this problem for a week now and it seems i did all i could. this is the error message i'm getting: Traceback (most recent call last): File "C:\Users\\anaconda3\envs\pygdal38\lib\site-packages\osgeo\__init__.py", line 29, in…
Daniel_
  • 1
  • 1
0
votes
1 answer

Python3.8 GDAL Could not find gdal-config

Error [enter image description here][1] [1]: https://i.stack.imgur.com/c3qQr.png × Getting requirements to build wheel did not run successfully. #8 17.82 │ exit code: 1 #8 17.82 ╰─> [2 lines of output] #8 17.82 INFO:root:GDAL API version…
kraivit
  • 1
  • 1
0
votes
1 answer

Raster misalignment when gridded

I have a shapefile (green point layer below) in which I use gdal_grid to grid it into raster and then gdalwarp to transform from the source reference system (EPSG:27700) to the destination reference system (EPSG:3857). However, as you can see the…
userhelp
  • 13
  • 5
0
votes
0 answers

Using GDAL package in c# .Net core 5 makes Error

I've created a .net core 5 web application with visual studio 2019. I've added GDAL Packages to my project. When I run the web application locally there are no problems but when I publish the application on the IIS it makes an error. The Packages…
hamed
  • 1
  • 2
0
votes
1 answer

Extract rotated rectangle from raster in Python

I'm using GDAL in Python to work with GeoTIFF rasters. I use the following code to extract small rectangular patches from the entire raster: data_file = gdal.Open("path/to/raster.tiff") data = data_file.ReadAsArray(xoffset, yoffset, xsize,…
tobycoleman
  • 1,664
  • 1
  • 18
  • 34
0
votes
1 answer

merging .tif files via gdalbuildvrt not working

I have a piece of code that I have used for a while now to transform .xyz files to .tif and then merge all those .tif files into one big .tif. It has worked well when I last used it 2 years ago, but it seems like the current updates/discontinuation…
0
votes
1 answer

Extract values from online netCDF timeseries without downloading whole files

I'm brand new in python & gdal (stepping outside of my R-world specifically for this), so if you need anything more to make this reproducible or more clear, please let me know! I'm trying to extract time series data from several netCDF files WITHOUT…
Sanne
  • 3
  • 2
0
votes
1 answer

Why gdal.open(path).ReadAsArray() produce different results from tiffile.imread(path)

Since colab won't allow me to use tiffile.imread() by giving error 'ValueError: requires the 'imagecodecs' package', I use gdal.open().ReadAsArray() to read tif file and generate input data for model to inference. This results…
0
votes
0 answers

Geotiff image plotting in Python

I am new geotif image ploting in python. I have two Geotiff images of the same region. However, after plotting these two images they are not matching. The below is the meta information for both the images. Image 1 Files: sli_hh_ML_I_221.tif Size is…
0
votes
1 answer

Convert Uint16 -> Byte Image is darker

I want to convert an image with Uint16 pixels to Byte pixels. I'm actually using GDAL library (and gdal_translate command) to do this but the output image is darker than the original Original image Output image Do you know what can i do to convert…
s1o
  • 1
  • 1
0
votes
0 answers

How can I obtain pixel value from map co-ordinate [longitude, latitude] for image of band count 1?

so I am using Landsat-8 image of band-4. I want to obtain the n-array index for given longitude and latitude values. I have tried below…