Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
open source Python library for reading and writing geospatial raster data
2
votes
0
answers
214
views
Calculation of downscale factor for downsampling image using Rasterio
I have used Rasterio documentation (pages 80-81) in order to downscale my image from 30cm to 50 cm. …
0
votes
1
answer
3k
views
Rasterio fails to create new tiff file inside for loop
I'm trying to save rasters with rasterio inside for loop. …
3
votes
1
answer
14k
views
Defining Affine transform with rasterio
bbox.get_transform_vector(10,10)
>>>
(-101.7359960059834, 10.0, 0, 20.8312118894487, 0, -10.0)
The type of this affine vector is tuple:
type(transform)
>>>tuple
I want to define this transform to be affine transform in rasterio … My end goal: to get my tuple as type affine in rasterio …
8
votes
2
answers
1k
views
"Copy" Image coordinates to another image that is nd.array
I have image with three bands. I have script predicts the first band pixels values by using the two other bands and in the end generates an image.The generated image is at the beginning pandas table, …
2
votes
2
answers
227
views
TypeError when saving tif with rasterio using "rasterio.open"
I'm trying to save it using rasterio with the following script:
savedir=pathlib.Path('myfolder/')
savedir.mkdir(parents=True,exist_ok=True)
with rasterio.open(savedir /'myImage.tif', … /_io.pyx:1700, in rasterio. …
1
vote
1
answer
236
views
Increased raster file size after clipping and uploading to GCS
Details about how I preformed the clipping:
read data from GCS - vector data and each time one raster
used rastio.mask.mask to mask the raster
saved the raster locally with rasterio, using the following … I have seen this post but I am not sure if it's the same on rasterio and if my solution will be just to add to "compress='lzw'" parameter, and how will it affect the images. …
1
vote
1
answer
191
views
Raster is being saved with no bands names despite defining them using Rasterio
I have an ndarray which I would like to save as rasterio raster.
I have all the information I needed (image size, transform, band names etc.). …
1
vote
0
answers
196
views
Rasterio doesn't display the differnet bands of image
The problem is that whenever I try todisplay those layers with rasterio it always shows the "extent" of the third layer:
img=rasterio.open("21072019.tif")
show(img,1)
#display other bands:
show(img, …
0
votes
1
answer
1k
views
Apply Canny edge filter on raster failes with scikit-image
This is my raster:
I have opened it with rasterio and covert it into array :
img=srs.open("raster.tif")
array=img.read()
Then i'm trying to apply the Canny filter as following (based on this: https:/ …
3
votes
2
answers
3k
views
Rasterio doesn't show the image in RGB
I have download raw landsat 8 image with Rasterio. The image was download from GEE. . The image has 11 bands. … This is how I open the image and try to dusplay it:
#import required libraries
import rasterio
from rasterio import plot
import matplotlib.pyplot as plt
from rasterio.plot import show
%matplotlib inline …
3
votes
1
answer
2k
views
Control histogram axis and legend with show_hist of rasterio
I have load raster (Sentinel 2) with Rasterio and I would like to create histogram of the pixels.
The problem is that I beleive the graph gives automatically the X label and also the legend labels. …
1
vote
1
answer
1k
views
Weird coordinates after converting numpy array to raster
I have tried to convert it into raster using rasterio, based on this answer, and it did save it as raster, but when I use rasterio.show the coordinates are very wrong. … 20.21904081937658, -100.5717967351885, 20.8312118894487]
#variables for the projection:
minx=bbox_coords_wgs84[0]
maxy=bbox_coords_wgs84[3]
pixel_size= 10
#according to the post on GIS SO:
import rasterio …
1
vote
1
answer
117
views
Transform of image downloaded from GEE is different when reading on QGIS or using Rasterio
When I opened the image using QGIS, I was happy with the image as it seems to be right placed, With the following transform equation :
*False color representation
But when I open the image with rasterio … #flipped image
flipped_img.profile['transform']
>>>Affine(7.2135412378e-05, 0.0, 108.213452126442,
0.0, 7.2135412378e-05, -0.2000110457149081)
#image that is not flipped by rasterio
not_flipped …
1
vote
1
answer
2k
views
Write numpy ndarray as TIFF with rasterio does not work
786bb4d9518d> in <module>
9 nodata=None, # change if data has nodata value
10 transform=img.transform) as dst:
---> 11 dst.write(ff_correction, 1)
rasterio … \_io.pyx in rasterio. …
0
votes
2
answers
860
views
Type error for gdal- GDAL-style transforms have been deprecated
I'm trying to export numpy ndarray that I have to TIFF using rasterio. …