|
Re: Geotiff max/min coordinates question
Couldn't you use the .bounds method on your dataset reader object?
Couldn't you use the .bounds method on your dataset reader object?
|
By
Amine Aboufirass <amine.aboufirass@...>
·
#286
·
|
|
Re: Geotiff max/min coordinates question
I am not entirely sure what you are referring to, but I am assuming you want the bounds of the raster in lat/lon?
If so, then `EPSG:4326` is a pretty standard projection for lat/lon coordinates.
So,
I am not entirely sure what you are referring to, but I am assuming you want the bounds of the raster in lat/lon?
If so, then `EPSG:4326` is a pretty standard projection for lat/lon coordinates.
So,
|
By
Alan Snow
·
#285
·
|
|
Geotiff max/min coordinates question
Hi everyone,
I am very new to rasterio and gis in general. I really like the rasterio library so far but had a question on how it works similar to a gdal function. I am trying to get the max/min
Hi everyone,
I am very new to rasterio and gis in general. I really like the rasterio library so far but had a question on how it works similar to a gdal function. I am trying to get the max/min
|
By
j.carnes2553@...
·
#284
·
|
|
Re: [feature] List tags namespaces
Great, thank you very much Vincent!
Guillaume Lostis
Great, thank you very much Vincent!
Guillaume Lostis
|
By
Guillaume Lostis <g.lostis@...>
·
#283
·
|
|
Re: [feature] List tags namespaces
I started a PR over https://github.com/mapbox/rasterio/pull/1740
I started a PR over https://github.com/mapbox/rasterio/pull/1740
|
By
vincent.sarago@...
·
#282
·
|
|
Re: [feature] List tags namespaces
Hi Guillaume,
I'm + 1 with the idea of adding this feature.
I've had the same challenge while working on rio-cogeo, if there is a GDAL API I think it could be useful to add a method in
Hi Guillaume,
I'm + 1 with the idea of adding this feature.
I've had the same challenge while working on rio-cogeo, if there is a GDAL API I think it could be useful to add a method in
|
By
vincent.sarago@...
·
#281
·
|
|
[feature] List tags namespaces
Hi all,
I would like to be able to list a file's namespaces for tags. I am handling files with several tag "namespaces" (default, IMAGE_STRUCTURE, and RPC for example). I want to create a "copy" of
Hi all,
I would like to be able to list a file's namespaces for tags. I am handling files with several tag "namespaces" (default, IMAGE_STRUCTURE, and RPC for example). I want to create a "copy" of
|
By
Guillaume Lostis <g.lostis@...>
·
#280
·
|
|
Re: MemoryFile workflow - should closing a dataset close the memfile?
You can use[contextlib.ExitStack](https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack) in situations like these to save indentation levels (or enter multiple contexts in a
You can use[contextlib.ExitStack](https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack) in situations like these to save indentation levels (or enter multiple contexts in a
|
By
Dion Häfner <dion.haefner@...>
·
#279
·
|
|
Re: MemoryFile workflow - should closing a dataset close the memfile?
Thanks for the reply Luke!
A context manager would work, but it's ergonomically annoying, no? I have a several functions I would like to pipe, each returning a raster. In that case I will have a lot
Thanks for the reply Luke!
A context manager would work, but it's ergonomically annoying, no? I have a several functions I would like to pipe, each returning a raster. In that case I will have a lot
|
By
ronipay@...
·
#278
·
|
|
Re: MemoryFile workflow - should closing a dataset close the memfile?
You could use a context manager to clean it up automatically:
from contextlib import contextmanager
import rasterio
from rasterio import MemoryFile
@contextmanager
def mem_raster(data,
You could use a context manager to clean it up automatically:
from contextlib import contextmanager
import rasterio
from rasterio import MemoryFile
@contextmanager
def mem_raster(data,
|
By
Luke
·
#277
·
|
|
MemoryFile workflow - should closing a dataset close the memfile?
Hey all,
I have a general workflow which causes a memory leak. I have several functions which receive 1 or more rasters, perform some operations, and return a MemoryFile based raster, on which I
Hey all,
I have a general workflow which causes a memory leak. I have several functions which receive 1 or more rasters, perform some operations, and return a MemoryFile based raster, on which I
|
By
ronipay@...
·
#276
·
|
|
Re: Is it possible to open a binary file with rasterio.open?
Ryan,
It looks like you're trying to pass an opened file object into Python's open() function. That won't work. It only takes strings and paths.
--
Sean Gillies
Ryan,
It looks like you're trying to pass an opened file object into Python's open() function. That won't work. It only takes strings and paths.
--
Sean Gillies
|
By
Sean Gillies
·
#275
·
|
|
Re: Is it possible to open a binary file with rasterio.open?
Thanks for the suggestion Vincent, it looks like I still get the error
TypeError: expected str, bytes or os.PathLike object, not _io.BytesIO\
Because this happens in the python open(image_bytes,
Thanks for the suggestion Vincent, it looks like I still get the error
TypeError: expected str, bytes or os.PathLike object, not _io.BytesIO\
Because this happens in the python open(image_bytes,
|
By
Ryan Avery
·
#274
·
|
|
Re: Is it possible to open a binary file with rasterio.open?
Hi Ryan,
This is just an idea but can you try with
```
with open(image_bytes, 'rb') as f, MemoryFile(f.read()) as memfile:
with memfile.open() as src: arr =
Hi Ryan,
This is just an idea but can you try with
```
with open(image_bytes, 'rb') as f, MemoryFile(f.read()) as memfile:
with memfile.open() as src: arr =
|
By
vincent.sarago@...
·
#273
·
|
|
Re: Is it possible to open a binary file with rasterio.open?
Hey all,
I'm trying something similar, trying to read a bytes object from a POST request, which originally comes from a tif file. Here's my code:
with open(image_bytes, 'rb') as f, MemoryFile(f) as
Hey all,
I'm trying something similar, trying to read a bytes object from a POST request, which originally comes from a tif file. Here's my code:
with open(image_bytes, 'rb') as f, MemoryFile(f) as
|
By
Ryan Avery
·
#272
·
|
|
Re: build_overviews
A belated thanks for this Vincent !
A belated thanks for this Vincent !
|
By
James David Smith
·
#271
·
|
|
Rendering a raster in a Cartopy GeoAxes object
I tried to send this question once but I'm not sure it went through.
I'm trying to render a rasterio raster onto a Cartopy GeoAxes. This used to be possible, as evidenced here:
I tried to send this question once but I'm not sure it went through.
I'm trying to render a rasterio raster onto a Cartopy GeoAxes. This used to be possible, as evidenced here:
|
By
john.o.woods@...
·
#270
·
|
|
Re: Writing raster to GeoPackage layer
Thanks Sean! Here is a full example, using your suggestion, but still getting the same file format error:
import rasterio
import fiona
from shapely.geometry import Polygon, mapping
raster_fn =
Thanks Sean! Here is a full example, using your suggestion, but still getting the same file format error:
import rasterio
import fiona
from shapely.geometry import Polygon, mapping
raster_fn =
|
By
Ryan
·
#269
·
|
|
Re: Writing raster to GeoPackage layer
Ryan,
I don't use geopackage rasters and haven't tested the code I'm about to suggest, but I think this is worth a try:
with rasterio.open("testing.gpkg", "r+", raster_table="new_table",
Ryan,
I don't use geopackage rasters and haven't tested the code I'm about to suggest, but I think this is worth a try:
with rasterio.open("testing.gpkg", "r+", raster_table="new_table",
|
By
Sean Gillies
·
#268
·
|
|
Re: build_overviews
Hi James,
The level of overviews is usually linked to the size of the raster and its internal tiles (block).
here is an example in rio-cogeo:
Hi James,
The level of overviews is usually linked to the size of the raster and its internal tiles (block).
here is an example in rio-cogeo:
|
By
vincent.sarago@...
·
#267
·
|