|
Re: Decimated and windowed read in rasterio
Hi,
the out_shape and window parameters of a Rasterio dataset's read method are very similar to the nBufXSize, nBufYSize, nXOff, nYOff, nXSize, and nYSize parameters of GDAL's RasterIO function. The
Hi,
the out_shape and window parameters of a Rasterio dataset's read method are very similar to the nBufXSize, nBufYSize, nXOff, nYOff, nXSize, and nYSize parameters of GDAL's RasterIO function. The
|
By
Sean Gillies
·
#459
·
|
|
Decimated and windowed read in rasterio
(Posted also on gis.stackexchange.com: https://gis.stackexchange.com/questions/353794/decimated-and-windowed-read-in-rasterio)
In my workflow using rasterio, I'd like to read an overview from a raster
(Posted also on gis.stackexchange.com: https://gis.stackexchange.com/questions/353794/decimated-and-windowed-read-in-rasterio)
In my workflow using rasterio, I'd like to read an overview from a raster
|
By
umbertofilippo@...
·
#458
·
|
|
Rasterio Python Library Merging R, G, B Bands to Create a GeoReferenced GeoTiff
I am attempting to use rasterio to merge 3 bands from Sentinel-2 data, sourced as .JP2 files, into a georeferenced GeoTiff. However, I am running into 2 problems doing this.
First of all, here is my
I am attempting to use rasterio to merge 3 bands from Sentinel-2 data, sourced as .JP2 files, into a georeferenced GeoTiff. However, I am running into 2 problems doing this.
First of all, here is my
|
By
nathan.raley@...
·
#457
·
|
|
Re: Transverse Mercator Complex projection
No. Exactly as I show in my code example. No need to write it out again, as you are just updating the georeferencing with the dataset opened in update mode ("r+"). The dataset is saved automatically
No. Exactly as I show in my code example. No need to write it out again, as you are just updating the georeferencing with the dataset opened in update mode ("r+"). The dataset is saved automatically
|
By
Luke
·
#456
·
|
|
Re: Do I need to warp jp2 satellite images for rasterio to manipulate them?
What is the best way to do this warping?
Should I not actually warp and just set the `.crs` property of the jp2 raster and then re-save it in the same file?
Or should I warp it the crs, and then
What is the best way to do this warping?
Should I not actually warp and just set the `.crs` property of the jp2 raster and then re-save it in the same file?
Or should I warp it the crs, and then
|
By
himat15@...
·
#455
·
|
|
Re: Transverse Mercator Complex projection
@ Luke Pinner,
How should I then save the file with the updated CRS?
Like this? Or is there a better way?
with rasterio.open(in_tif, 'r+') as src:
src.crs = CRS.from_epsg(32629)
with
@ Luke Pinner,
How should I then save the file with the updated CRS?
Like this? Or is there a better way?
with rasterio.open(in_tif, 'r+') as src:
src.crs = CRS.from_epsg(32629)
with
|
By
himat15@...
·
#454
·
|
|
Re: Transverse Mercator Complex projection
To override the projection with rasterio:
import rasterio
from rasterio.crs import CRS
in_tif = 'path/to.tif'
with rasterio.open(in_tif, 'r+') as src:
src.crs = CRS.from_epsg(32629)
To override the projection with rasterio:
import rasterio
from rasterio.crs import CRS
in_tif = 'path/to.tif'
with rasterio.open(in_tif, 'r+') as src:
src.crs = CRS.from_epsg(32629)
|
By
Luke
·
#453
·
|
|
Re: Transverse Mercator Complex projection
rio.read():
My understanding is that Transverse_Mercator_Complex corresponds to PROJ
"etmerc" method, which is the default since PROJ 4.9.3 for UTM. PROJ just
lacks a mapping for the
rio.read():
My understanding is that Transverse_Mercator_Complex corresponds to PROJ
"etmerc" method, which is the default since PROJ 4.9.3 for UTM. PROJ just
lacks a mapping for the
|
By
Even Rouault
·
#452
·
|
|
Transverse Mercator Complex projection
Hi, I have a geotiff with a "Transverse_Mercator_Complex" CRS.
Here is the output of the `.crs` property after reading in the tif with rio.read():
The rest of my files have the crs EPSG:32629, so I
Hi, I have a geotiff with a "Transverse_Mercator_Complex" CRS.
Here is the output of the `.crs` property after reading in the tif with rio.read():
The rest of my files have the crs EPSG:32629, so I
|
By
himat15@...
·
#451
·
|
|
Re: Do I need to warp jp2 satellite images for rasterio to manipulate them?
Hi,
I recommend warping. GCPs are not seamlessly supported throughout rasterio 1.1.3. For example, a dataset's window_bounds and window_transform methods are ignorant of the dataset's GCPs and their
Hi,
I recommend warping. GCPs are not seamlessly supported throughout rasterio 1.1.3. For example, a dataset's window_bounds and window_transform methods are ignorant of the dataset's GCPs and their
|
By
Sean Gillies
·
#450
·
|
|
Do I need to warp jp2 satellite images for rasterio to manipulate them?
I have some .jp2 files that don't have a `.crs` property after I used `rio.open` on those files.
I read https://gis.stackexchange.com/a/233417/143989 and after using the `.gcps` property, I was able
I have some .jp2 files that don't have a `.crs` property after I used `rio.open` on those files.
I read https://gis.stackexchange.com/a/233417/143989 and after using the `.gcps` property, I was able
|
By
himat15@...
·
#449
·
|
|
Re: Same file doesn't work on non-s3 host
Hi Olivier,
The exception message doesn't give you much of a lead, it's true. To debug network issues, the places to look are your server logs and GDAL's curl client logs. You can enable the latter by
Hi Olivier,
The exception message doesn't give you much of a lead, it's true. To debug network issues, the places to look are your server logs and GDAL's curl client logs. You can enable the latter by
|
By
Sean Gillies
·
#448
·
|
|
Re: Interconverting between pyproj and rasterio CRS objects
Got it. Forgot that there wasn’t a class there previously...thanks for the context!--
Sent from my mobile.
Got it. Forgot that there wasn’t a class there previously...thanks for the context!--
Sent from my mobile.
|
By
Nick Weir
·
#447
·
|
|
Re: Interconverting between pyproj and rasterio CRS objects
Hi Nick,
Rasterio has its own CRS class because pyproj 2 didn't exist at the time.
--
Sean Gillies
Hi Nick,
Rasterio has its own CRS class because pyproj 2 didn't exist at the time.
--
Sean Gillies
|
By
Sean Gillies
·
#446
·
|
|
Re: Interconverting between pyproj and rasterio CRS objects
Add some history for reference: https://rasterio.groups.io/g/dev/topic/switch_from_proj_4_format_to/28991934
Add some history for reference: https://rasterio.groups.io/g/dev/topic/switch_from_proj_4_format_to/28991934
|
By
Alan Snow
·
#445
·
|
|
Same file doesn't work on non-s3 host
Dear list,
I'm just starting with rasterio (through the marblecutter project), and am stumbling on a strange issue. Everything works fine when I try to load tifs from s3 (I'm testing out with
Dear list,
I'm just starting with rasterio (through the marblecutter project), and am stumbling on a strange issue. Everything works fine when I try to load tifs from s3 (I'm testing out with
|
By
olivier.dalang@...
·
#444
·
|
|
Re: Interconverting between pyproj and rasterio CRS objects
Yeah, this of course works. I'm more thinking from a philosophical standpoint of "which object works better to pass around?"
It seems like the pyproj objects work a bit better. And that's what's
Yeah, this of course works. I'm more thinking from a philosophical standpoint of "which object works better to pass around?"
It seems like the pyproj objects work a bit better. And that's what's
|
By
Nick Weir
·
#443
·
|
|
Re: Interconverting between pyproj and rasterio CRS objects
FYI: https://github.com/corteva/rioxarray/issues/92 and https://github.com/corteva/rioxarray/issues/92
FYI: https://github.com/corteva/rioxarray/issues/92 and https://github.com/corteva/rioxarray/issues/92
|
By
vincent.sarago@...
·
#442
·
|
|
Re: Interconverting between pyproj and rasterio CRS objects
Here are instructions for rasterio to geopandas: https://gis.stackexchange.com/a/350231/144357
For geopandas to rasterio, you will need something like:
if LooseVersion(rasterio.__gdal_version__) >
Here are instructions for rasterio to geopandas: https://gis.stackexchange.com/a/350231/144357
For geopandas to rasterio, you will need something like:
if LooseVersion(rasterio.__gdal_version__) >
|
By
Alan Snow
·
#441
·
|
|
Interconverting between pyproj and rasterio CRS objects
Hi there!
Now that geopandas is using pyproj CRS objects as the default for tracking CRSs in GeoDataFrames, I'm finding myself needing to figure out a way to frequently check identity and interconvert
Hi there!
Now that geopandas is using pyproj CRS objects as the default for tracking CRSs in GeoDataFrames, I'm finding myself needing to figure out a way to frequently check identity and interconvert
|
By
Nick Weir
·
#440
·
|