Skip to main content

Questions tagged [rasterio]

open source Python library for reading and writing geospatial raster data

0 votes
0 answers
17 views

Value changes when merging Landsat bands to a multiband image using Rasterio in Python

I have two separate image bands from Landsat (L2SP) and would like to merge them into one multiband image (.tiff). I use rasterio package in Python in order to perform this task (see code below). The ...
Ilias Machairas's user avatar
0 votes
0 answers
31 views

How to generate an orthomosaic image from multi-spectral drone captured images

I have a set of multi-spectral images captured by a drone stored in folder, using file_name we can derive its band and index, for example: - ('IMG_0298_1.tif', 'Red', 1) - ('IMG_0298_2.tif', 'Green', ...
M. D. P's user avatar
  • 101
0 votes
0 answers
9 views

Reprojecting to rotated orthographic projection in rasterio

I have some DEMs in a lunar polar stereographic projection (from LOLA). I would like to reproject them to a orthographic projection with a custom azimuth rotation using rasterio. I can pretty easily ...
Synchrondyne's user avatar
0 votes
0 answers
35 views

cellSize calculation in Python

To create a raster file of cell size, which is similar to the function of cellSize function in terra library in R. It takes input raster with whatever the input's projection, and calculate cellsize in ...
Sang Truong's user avatar
0 votes
0 answers
19 views

WGS84 elevation from ALOS 30m DSM tif's using rasterio

I am new to GIS processing. I am trying to compute WGS84 elevation for given latitude and longitude using the JAXA ALOS 30m DSM. I use rasterio and code from a minimal example I found that looks like ...
Francesco Callari's user avatar
1 vote
1 answer
44 views

How to plot single land use / land cover classes on a map in python

I want to analyze Corine Land Cover data. It is raster data in a .tif file. Currently, I am using rasterio to handle the raster data. Question: How can I plot only a single land use on a map? My goal ...
tofri's user avatar
  • 13
0 votes
0 answers
30 views

How to deduce zoom level from gsd?

I have the following code: with rasterio.open(image) as dataset: transform = dataset.transform sizeX = transform[0] I need to deduce the maximum zoom level for which it makes sense to tile an ...
tlzg's user avatar
  • 161
0 votes
0 answers
24 views

Sample Raster Value code check

I have written code to loop through prism climate data (rasters) data at certain 2-week intervals then take the mean of that interval then append it to the original shapefile. #%% Processing Sinks for ...
Ekkehardt Rosasee's user avatar
2 votes
1 answer
64 views

Calculating NDVI from Landsat data

I have multiple folders containing landsat data from different years . I have been just testing Landsat 5 before doing them all but I feel as though something is wrong with the code. def ...
Ekkehardt Rosasee's user avatar
1 vote
1 answer
32 views

Opening rasterio datasets in threads

I have an application that requires opening a lot of GeoTIFFs, and I would like to do it concurrently. Basically, I am calling rasterio.open() in each thread and storing the resulting DatasetReader ...
eba's user avatar
  • 13
0 votes
0 answers
28 views

Colouring MapInfo polygons from Python

I'm using rasterio and geopandas to generate MapInfo TAB files. The resulting file contains a lot of polygons (~10 000). Here is the function I use: with rasterio.Env(): with rasterio.open(...
Riuss's user avatar
  • 1
0 votes
0 answers
33 views

Compressing GeoTiff with Rasterio

I am trying to process several GeoTiffs from Landsat satellite. I wrote a function for clipping and then wanted to use compression on the output bands. However I try it, the compression is just not ...
Tereza Pohanková's user avatar
0 votes
0 answers
29 views

Error: Number of pixels in mask does not match predictions size in Python/Rasterio workflow

I have implemented a random forest model using scikit-learn and Rasterio in Python to predict pixel values within a shapefile containing multiple polygons. However, I'm encountering an error:...
user30985's user avatar
  • 357
0 votes
0 answers
41 views

How to clip a raster file using a GeoJSON?

I am trying to clip or crop out the area of interest from a multi-spectral tiff file downloaded from Sentinel-2, using Rasterio and GeoPandas. For reference here are the code snippets - import ...
Anurag-Sharma's user avatar
2 votes
1 answer
56 views

Mapping spatial corrdinates (X,Y) back to pixel space using Rasterio

For the problem I am solving I have lat/lon values in DataFrame and need to check if these values coincide with some of the satellite images I have. This part I managed to solve following this post (...
user144483's user avatar

15 30 50 per page
1
2 3 4 5
56