Skip to main content

Questions tagged [rasterio]

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

-1 votes
0 answers
19 views

How to Generate an Orthomosaic Map 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
  • 740
0 votes
1 answer
49 views

Impossible to change drag and dropped (with tkinterdnd2) raster when plotting

When running the following Python code, I'm able to change the raster (by drag and dropping a new raster file) and display its name in anew window as many times as I want (without closing the ...
bchate's user avatar
  • 145
2 votes
0 answers
56 views

Calculate total population within a boundary GDB and population density map GeoTiff

I have a High Resolution Population Density Map GeoTiff which I can load through rioxarray, and a list of boundaries in GDB format which I can load through GeoPandas. I would like to calculate the ...
utra's user avatar
  • 63
1 vote
1 answer
53 views

Exclude entire blocks from computation in Dask/Xarray

I am processing a large dataset of non-rectangular satellite imagery with xarray/dask. I know in advance from the footprint of the imagery, that large parts of the xarray are no-data (since the image ...
Felix's user avatar
  • 53
0 votes
0 answers
23 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
  • 643
0 votes
0 answers
25 views

My code keeps throwing up a CPLE_AppDefinedError when using rasterio

Here is the issue. When I try to delete a temp.tiff file I no longer need, I get an error with this section of code. It is part of a for loop, and there's something in this for loop that is causing ...
Sonny Bailey's user avatar
0 votes
0 answers
49 views

Using Python, can one convert a .tiff file to a .gpkg file, such that all raster cells are indiscriminatorily kept?

I would like to convert a .tiff file into a .gpkg file, such that every raster cell is accounted for. When I convert my .tiff to an image array with numpy, I get a value of 350403 returned for the ...
tds's user avatar
  • 21
0 votes
0 answers
38 views

QGIS and rasterio differences in processing/loading

I am working with large geotiff files and I am struggling to find a workflow that can actually handle them. Right now my biggest issue is that I can easily read all of these files in QGIS, indicating ...
pedro's user avatar
  • 1
0 votes
0 answers
18 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 (...
imantha's user avatar
  • 3,676
1 vote
0 answers
32 views

Rasterio mask result is 1 pixel larger in each dimension than the masking input

I have 2 rasters of different sizes and I want to clip the larger raster so it matches the smaller raster's dimensions (not just lat/long, but x/y shape too). The code almost works, i.e., the larger ...
Darren C.'s user avatar
  • 131
-1 votes
1 answer
94 views

*Quickly* extract line of pixel values from rastio rasterize() ndarray

Problem: given a bunch of buildings from a geopandas file and a list of lines, calculate the # of lines that don't intersect any buildings / total # of lines. I'm currently investigating using ...
Don Mclachlan's user avatar
0 votes
0 answers
38 views

Making RGB tiff files from red,green,and blue bands

i have three geotiff orthomosaic images which i have processed from pix4d mapper. one is red band, one is blue band, one is green band. I have to combine these three images to form an rgb geotiff ...
Midhun Bose's user avatar
0 votes
0 answers
37 views

Convert GIS Raster to CSV and plot as points on the grid using Python

I'm trying to convert raster to CSV file with coordinates and plot them and encounter a problem. I have a raster .tif file with some buildings in Denmark projected in EPSG:7416 CRS. I read .tif file ...
errenmike1806's user avatar
0 votes
0 answers
19 views

Slice a geotiff file by latitude

I have a geotiff file. I use python to read it and plot it import rasterio from rasterio.plot import show src = rasterio.read('myfile.tif') data = src.read(1) f,ax=plt.subplots() show(data, ...
emax's user avatar
  • 7,175
2 votes
1 answer
103 views

rasterio rasterize shapely ploygons and save plot to file

Ultimately I will create a bunch of rasters from a bunch of building polygons in a geopandas dataframe. But this is preliminary testing. >>> import shapely >>> import shapely....
Don Mclachlan's user avatar

15 30 50 per page
1
2 3 4 5
30