Questions tagged [rasterio]

Clean and fast and geospatial raster I/O for Python programmers who use Numpy

440 questions
0
votes
1 answer

Installing Rasterio

I tried installing Rasterio library using command- pip install rasterio and also used conda commands in anaconda cmd, both are didn't worked and it's taking too long to install so I aborted the process. Let me know in detail how to install raserio…
Thej
  • 1
  • 3
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

Calculate NDRE index from sentinel-2 images

I before computed the Normalized Difference Vegetation Index (NDVI) using two images from Sentine-2 (band 4 and band 8) this both images has a 10m resolution, however now I would like computed the Normalized Difference Red Edge Index (NDRE) but the…
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…
0
votes
0 answers

How to sum together raster images using Rasterio?

I have 100+ raster images with the exact same extent. They consist of values which are either 0 or 1. I would like to have 1 single image with all values for that pixel summed together. I have done it in a certain way, but it creates…
Niek
  • 51
  • 8
0
votes
1 answer

Creating polygons using rasterio and shapely based on a lon, lat and an array of 0's and 1's

I have an numpy array with 0 and 1's. I am trying to convert the 1's into polygons. I have managed to do so using rasterio and shapely as seen in the code below: im = np.array([[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 0, 1, 0, 0], [0, 1, 1, 1,…
Judith
  • 147
  • 8
0
votes
0 answers

"ImportError: DLL load failed while importing _base: The specified module could not be found." error when trying to import package rasterio [python]

I am trying to import the package rasterio into python and jupyter notebook, link to package: https://rasterio.readthedocs.io/en/latest/installation.html Just to start off clean, I created a virtual environment, I will call projectenv I access…
0
votes
1 answer

Masking using Xarray.where throws an error "dimension 'y' are not equal"

I am trying to mask a raster using another raster. Both rasters have same dimensions, but when i apply the mask the xarraydata.where throws error f[0].where(mask,other=np.nan) ValueError: indexes along dimension 'y' are not equal
0
votes
1 answer

How to change numpy array to geotiff array without saving on computer?

I am using gdal.translate() to make the image but its saving the formed image on local machine, I don't want to save it anywhere in my local machine and use it on run time only without saving it.
0
votes
0 answers

How to merging multiple TIF files with Rioxarray python without killing kernel

I am working with high res NOAA aerial imagery data from Hurrican Ida, RGB. Data is available here under download - any of the date times will download a large amount of tifs https://storms.ngs.noaa.gov/storms/ida/index.html#18/29.46140/-90.30946 I…
Grace
  • 67
  • 1
  • 8
0
votes
1 answer

Can't import modules in python even if they are "successfully" installed

I'm new to this and I've had trouble starting to practice my code because of the libraries and python versions, first I must explain that I had python 3 installed and was trying to install the libraries to process Landsat satellite images with pip…
0
votes
1 answer

Raster calculations python

I am using Gtif files for raster calculations in python. I want to apply the formula: Aridity index = precipitation/(Temperature + 10). When I use this for Gtiff I get the following error: "TypeError: unsupported operand type(s) for /:…
Nishita
  • 37
  • 1
  • 3
0
votes
1 answer

Mask raster by extent in Python using rasterio

I want to clip one raster based on the extent of another (smaller) raster. First I determine the coordinates of the corners of the smaller raster using import rasterio as rio import gdal from shapely.geometry import Polygon src =…
0
votes
1 answer

Not using band as dimension while reading raster using xarray

I am reading in a single band raster using xarray. Is there a way to not have band be a dimension and just have the x and y coordinates as dimensions?
user308827
  • 21,227
  • 87
  • 254
  • 417
0
votes
1 answer

Creating georeference geotiff image

I have tried to create a geotiff image after extracting texture feature of a grayscale geotiff image using the below codes. #Creating texture images Texture_Contrast = Image.fromarray(Contrast) #image coordinates…