Linked Questions
14 questions linked to/from Writing numpy array to raster file
5
votes
3
answers
971
views
Comparing two rasters, based on a complex set of rules
I am trying to compare two rasters, say A.tif and B.tif. Both correspond to river bed level changes under two different flow conditions. Now I want to produce a comparison raster having values based ...
8
votes
3
answers
8k
views
How to convert 0 values to NoData values with rasterio
I clipped my TIFF image to smaller TIFF via using a shapefile as mask with rasterio Python library. After that my square shaped clip has bigger extent than shapefile and outside the the shapefile area ...
2
votes
1
answer
71
views
Creating raster with same size as DTM raster containing certain percentage of zeros and ones using QGIS
I've got a DTM and would like to add 1m to a percentage of the points, so I thought of creating a new raster containing either zeros or 1m and add the two raster together.
I didn't find any tools that ...
3
votes
1
answer
455
views
Calculate new band for satellite image after predict values with RF
I have satellite image which contains 3 different bands.
I'm using Python (jupyter notebook) in order to calculate new band by applying random forest regression.
My problem is that after I have ...
3
votes
1
answer
1k
views
Open a numpy array as a GDAL raster in memory
I have a numpy array which I would like to open as a raster in GDAL. Currently the only way I can find to do this is to save the raster as an image to the file system and then open it again. I was ...
0
votes
1
answer
457
views
Python surface plot in QGIS
I'm new in QGIS and I’m having some troubles. I have produced a surface plot in python and I would like to import it in QGIS but I don't know how do that, can anyone help me?
P.S. I also have the ...
1
vote
0
answers
97
views
Rotating raster cells with QGIS GDAL
I've written a PyQGIS script based on this answer to the following question:
Writing numpy array to raster file
My data shows up at the correct, expected location but the raster cells, which are ...
4
votes
1
answer
1k
views
numpy array to gdal.Band
I have a numpy array that I want to convert to polygons using the gdal.Polygonize function, as outlined using this Polygonize a Raster Band approach.
Unlike the example listed, however, my data is ...
2
votes
1
answer
930
views
GDAL ReadAsArray slow?
I am currently working with GOES-R on AWS. I've downloaded recent data, which is in the netCDF file format. Specifically I am using band 3 (M3C03).
When loading it into GDAL, it is taking upwards of ...
3
votes
1
answer
3k
views
GDAL, python: How to create a GDAL dataset object from a numpy array
I am working on a program that uses both OpenCV and GDAL to perform different tasks. OpenCV stores its images as numpy arrays. I would like to be able to go directly from this numpy array to a dataset ...
3
votes
0
answers
1k
views
Warping Image having Lat Lon Geolocation array
I'm trying to implement a script to project an image having the two matrices of Lat and Lon points. I've followed the steps proposed in:
Unable to warp HDF5 files
and everything is fine. I create the ...
4
votes
1
answer
2k
views
Writing Numpy array to raster file (tif) returns a trivial black square
I need to turn a 2D numpy array into a raster file that I can later import in ArcGIS (version 10.3.1, licence type: Advanced). The coordinate system that I need to target is the British National Grid ...
4
votes
1
answer
2k
views
error with python gdal
I tried to do this code Array to Raster image but there was the following error
ERROR 4: Unable to open myraster.tif to obtain file list.
ERROR 4: Unable to open EPSG support file gcs.csv.
Try ...
2
votes
1
answer
10k
views
NumPy to GeoTiff for use with Gdal
I have a few NumPy arrays: lat, lon, and 6 data bands. I'd like to convert these to GeoTiff and then apply the gdalwarp function, based on a specific projection, to each band.
Is there a standard way ...