Linked Questions

7 votes
3 answers
14k views

Is it possible to open rasters as array in NumPy without using another library?

I know that it is possible to open a raster as an array in NumPy using GDAL, but I want to skip GDAL and use NumPy only, as it is cooler handling rasters with NumPy as matrices. There is a similar ...
10 votes
5 answers
6k views

Raster diff: how to check if images have identical values?

Is there a means to check to see if any 2 given raster layers have identical content? We have a problem on our corporate shared storage volume: it's now so big that it takes over 3 days to conduct a ...
  • 27.9k
14 votes
2 answers
2k views

Understanding min and max values with Mosaic to New Raster?

I have to combine several DEM rasters into one from this source: http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp, so I use Mosaic to New Raster tool. I set up the tool: I input the rasters (all ...
  • 309
5 votes
2 answers
9k views

How to create a TIFF file using GDAL from a numpy array and specifying NoData value

I have some tiff files I obtained from splitting a bigger tiff file using gdal translate. The border tiff files have some nodata values, which I can see in numpy as number 15. I want to manipulate ...
0 votes
2 answers
5k views

How to save numpy array as single band image?

I'm working on MODIS NDVI composite data (single band). I converted the image to a numpy array and performed filtering operations. When i'm saving the new numpy array as an image I get a 3 band image ...
4 votes
2 answers
801 views

Converting QgsRaster object to array

So I'm a newbie, so sorry if this is an idiot question. I'm trying to write a plugin for QGIS3 for my organisation, and I'd like to output a standalone figure (i.e. not in the QGIS window) as the ...
  • 99
1 vote
1 answer
736 views

How to read all raster values in an array?

I want to read the every cell value in a raster file. When I run the script, it should give me the cell location and it's value. I can reach center point of the raster and read it's value with this ...
0 votes
0 answers
643 views

layer stack TIFF using python [duplicate]

i work with EVI MODIS and i need to stack all raster i had using python but i don't know how i'm using this backag and script to read my rasters import os import glob from osgeo import ...
2 votes
1 answer
354 views

Arcpy "MemoryError"; Get Classification Breaks on a TIF Raster; Jenks Breaks; Python

I have a large .tif raster with integer values. I wish to generate Jenks classification breaks using code and then use those breaks to reclassify my .tif file. I came across a block of code that I ...
2 votes
0 answers
223 views

Get coordinates of all pixels in a raster [closed]

I have a georeferenced raster and I need to extract a list with the coordinates of pixel in reference system (EPSG:32631) and the coordinate of pixel in raster reference. I want a list like this (...
  • 131
0 votes
0 answers
103 views

Use in-memory objects to process raster maps using GDAL's Python API

Below are three GDAL supported raster map processing commands, set inside a Bash shell helper function, defined inside a script that'd patch ERA5-Land with ERA5 data (see also: Merge ERA5-Land and ...
1 vote
1 answer
46 views

Reading and storing 1st pixels from multiple rasters

I want the code to read 1st pixel from a bunch of rasters (for eg. 1st pixel from 6 different rasters (having same extent and same number of pixels) and convert it into array followed by reading 2nd ...
  • 51