Readers¶
rio_tiler_pds.sentinel.aws.sentinel1
AWS Sentinel 1 reader.
S1L1CReader
— AWS Public Dataset Sentinel 1 reader.
get_bounds
(
geom
)
(float, float, float, float) — Get Bounds from GeoJSON geometry and handle multi polygon crossing the antimeridian line.
rio_tiler_pds.sentinel.aws.sentinel1.
get_bounds
(
geom
)
→ (float, float, float, float)
Get Bounds from GeoJSON geometry and handle multi polygon crossing the antimeridian line.
geom
(dict) —
rio_tiler_pds.sentinel.aws.sentinel1.
S1L1CReader
(
input
, tms=<TileMatrixSet title='Google Maps Compatible for the World' id='WebMercatorQuad' crs='http://www.opengis.net/def/crs/EPSG/0/3857>
, minzoom=8
, maxzoom=14
, reader=<class 'rio_tiler.io.rasterio.Reader'>
, reader_options=NOTHING
, bucket='sentinel-s1-l1c'
, prefix_pattern='{product}/{acquisitionYear}/{_month}/{_day}/{beam}/{polarisation}/{scene}'
)
AWS Public Dataset Sentinel 1 reader.
input
(str) — Sentinel-1 sceneid.tms
(TileMatrixSet, optional) —minzoom
(int, optional) —maxzoom
(int, optional) —reader
(type of Reader, optional) —reader_options
(dict, optional) —bucket
(str, optional) —prefix_pattern
(str, optional) —
bands
(tuple) — list of available bands (default is ('vv', 'vh')).bounds
—crs
—datageom
(dict) — sentinel 1 data geometry.geographic_bounds
(float, float, float, float) — Return dataset bounds in geographic_crs.maxzoom
(int) — Dataset's Max Zoom level (default is 14).minzoom
(int) — Dataset's Min Zoom level (default is 8).productInfo
(dict) — sentinel 1 productInfo.json content.scene_params
—
>>> with S1L1CReader('S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B') as scene:
print(scene.bounds)
__attrs_post_init__
(
)
— Fetch productInfo and get bounds.__enter__
(
)
— Support using with Context Managers.__exit__
(
exc_type
,exc_value
,traceback
)
— Support using with Context Managers.feature
(
shape
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts defined by geojson feature from multiple bands.info
(
bands
,*args
,**kwargs
)
(dict) — Return metadata from multiple bands.parse_expression
(
expression
)
(tuple) — Parse rio-tiler band math expression.part
(
bbox
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts from multiple bands.point
(
lon
,lat
,bands
,expression
,**kwargs
)
(PointData) — Read a pixel values from multiple bands.preview
(
bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge previews from multiple bands.statistics
(
bands
,expression
,categorical
,categories
,percentiles
,hist_options
,max_size
,**kwargs
)
(dict) — Return array statistics for multiple assets.tile
(
tile_x
,tile_y
,tile_z
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge Web Map tiles multiple bands.tile_exists
(
tile_x
,tile_y
,tile_z
)
(bool) — Check if a tile intersects the dataset bounds.
tile_exists
(
tile_x
, tile_y
, tile_z
)
Check if a tile intersects the dataset bounds.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.
True if the tile intersects the dataset bounds.
__enter__
(
)
Support using with Context Managers.
__exit__
(
exc_type
, exc_value
, traceback
)
Support using with Context Managers.
exc_type
—exc_value
—traceback
—
parse_expression
(
expression
)
→ tupleParse rio-tiler band math expression.
expression
(str) —
info
(
bands=None
, *args
, **kwargs
)
Return metadata from multiple bands.
bands
(sequence of str or str, optional) — band names to fetch info from. Required keyword argument.*args
—**kwargs
(any) —
Multiple bands info in form of {"band1": rio_tile.models.Info}.
statistics
(
bands=None
, expression=None
, categorical=False
, categories=None
, percentiles=None
, hist_options=None
, max_size=1024
, **kwargs
)
Return array statistics for multiple assets.
bands
(sequence of str or str) — bands to fetch info from. Required keyword argument.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).categorical
(bool) — treat input data as categorical data. Defaults to False.categories
(list of numbers, optional) — list of categories to return value for.percentiles
(list of numbers, optional) — list of percentile values to calculate. Defaults to[2, 98]
.hist_options
(dict, optional) — Options to forward to numpy.histogram function.max_size
(int, optional) — Limit the size of the longest dimension of the dataset read, respecting bounds X/Y aspect ratio. Defaults to 1024.**kwargs
(any) —kwargs
(optional) — Options to forward to theself.preview
method.
Multiple assets statistics in form of {"{band}/{expression}": rio_tiler.models.BandStatistics, ...}.
tile
(
tile_x
, tile_y
, tile_z
, bands=None
, expression=None
, **kwargs
)
Read and merge Web Map tiles multiple bands.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.tile
method.
ImageData instance with data, mask and tile spatial info.
part
(
bbox
, bands=None
, expression=None
, **kwargs
)
Read and merge parts from multiple bands.
bbox
(tuple) — Output bounds (left, bottom, right, top) in target crs.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to the 'self.reader.part' method.
ImageData instance with data, mask and tile spatial info.
preview
(
bands=None
, expression=None
, **kwargs
)
Read and merge previews from multiple bands.
bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.preview
method.
ImageData instance with data, mask and tile spatial info.
point
(
lon
, lat
, bands=None
, expression=None
, **kwargs
)
Read a pixel values from multiple bands.
lon
(float) — Longitude.lat
(float) — Latitude.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.point
method.
PointData
feature
(
shape
, bands=None
, expression=None
, **kwargs
)
Read and merge parts defined by geojson feature from multiple bands.
shape
(dict) — Valid GeoJSON feature.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.feature
method.
ImageData instance with data, mask and tile spatial info.
__attrs_post_init__
(
)
Fetch productInfo and get bounds.
rio_tiler_pds.sentinel.aws.sentinel2
AWS Sentinel 2 readers.
SENTINEL_L2_BANDS
—SENTINEL_L2_PRODUCTS
—default_l1c_bands
—default_l2a_bands
—sentinel_l2a_band_map
—
S2L1CReader
— AWS Public Dataset Sentinel 2 L1C reader.S2L2AReader
— AWS Public Dataset Sentinel 2 L2A reader.S2L2ACOGReader
— AWS Public Dataset Sentinel 2 L2A COGS reader.
S2COGReader
(
sceneid
,**kwargs
)
(S2L2ACOGReader) — Sentinel-2 COG readers.S2JP2Reader
(
sceneid
,**kwargs
)
(S2L2AReader or S2L1CReader) — Sentinel-2 JPEG2000 readers.
rio_tiler_pds.sentinel.aws.sentinel2.
S2L1CReader
(
input
, tms=<TileMatrixSet title='Google Maps Compatible for the World' id='WebMercatorQuad' crs='http://www.opengis.net/def/crs/EPSG/0/3857>
, minzoom=8
, maxzoom=14
, reader=<class 'rio_tiler.io.rasterio.Reader'>
, reader_options={'options': {'nodata': 0}}
, bucket='sentinel-s2-l1c'
, prefix_pattern='tiles/{_utm}/{lat}/{sq}/{acquisitionYear}/{_month}/{_day}/{num}'
)
AWS Public Dataset Sentinel 2 L1C reader.
input
(str) — Sentinel-2 L1C sceneid.tms
(TileMatrixSet, optional) —minzoom
(int, optional) —maxzoom
(int, optional) —reader
(type of Reader, optional) —reader_options
(dict, optional) —bucket
(str, optional) —prefix_pattern
(str, optional) —
bands
(tuple) — list of available bands (default is ('B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B09', 'B11', 'B12', 'B8A')).bounds
—crs
—datageom
(dict) — sentinel 2 data geometry.geographic_bounds
(float, float, float, float) — Return dataset bounds in geographic_crs.maxzoom
(int) — Dataset's Max Zoom level (default is 14).minzoom
(int) — Dataset's Min Zoom level (default is 8).scene_params
(dict) — scene id parameters.tileInfo
(dict) — sentinel 2 tileInfo.json content.
>>> with S2L1CReader('S2A_L1C_20170729_19UDP_0') as scene:
print(scene.bounds)
__attrs_post_init__
(
)
— Fetch productInfo and get bounds.__enter__
(
)
— Support using with Context Managers.__exit__
(
exc_type
,exc_value
,traceback
)
— Support using with Context Managers.feature
(
shape
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts defined by geojson feature from multiple bands.info
(
bands
,*args
,**kwargs
)
(dict) — Return metadata from multiple bands.parse_expression
(
expression
)
(tuple) — Parse rio-tiler band math expression.part
(
bbox
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts from multiple bands.point
(
lon
,lat
,bands
,expression
,**kwargs
)
(PointData) — Read a pixel values from multiple bands.preview
(
bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge previews from multiple bands.statistics
(
bands
,expression
,categorical
,categories
,percentiles
,hist_options
,max_size
,**kwargs
)
(dict) — Return array statistics for multiple assets.tile
(
tile_x
,tile_y
,tile_z
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge Web Map tiles multiple bands.tile_exists
(
tile_x
,tile_y
,tile_z
)
(bool) — Check if a tile intersects the dataset bounds.
tile_exists
(
tile_x
, tile_y
, tile_z
)
Check if a tile intersects the dataset bounds.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.
True if the tile intersects the dataset bounds.
__enter__
(
)
Support using with Context Managers.
__exit__
(
exc_type
, exc_value
, traceback
)
Support using with Context Managers.
exc_type
—exc_value
—traceback
—
parse_expression
(
expression
)
→ tupleParse rio-tiler band math expression.
expression
(str) —
info
(
bands=None
, *args
, **kwargs
)
Return metadata from multiple bands.
bands
(sequence of str or str, optional) — band names to fetch info from. Required keyword argument.*args
—**kwargs
(any) —
Multiple bands info in form of {"band1": rio_tile.models.Info}.
statistics
(
bands=None
, expression=None
, categorical=False
, categories=None
, percentiles=None
, hist_options=None
, max_size=1024
, **kwargs
)
Return array statistics for multiple assets.
bands
(sequence of str or str) — bands to fetch info from. Required keyword argument.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).categorical
(bool) — treat input data as categorical data. Defaults to False.categories
(list of numbers, optional) — list of categories to return value for.percentiles
(list of numbers, optional) — list of percentile values to calculate. Defaults to[2, 98]
.hist_options
(dict, optional) — Options to forward to numpy.histogram function.max_size
(int, optional) — Limit the size of the longest dimension of the dataset read, respecting bounds X/Y aspect ratio. Defaults to 1024.**kwargs
(any) —kwargs
(optional) — Options to forward to theself.preview
method.
Multiple assets statistics in form of {"{band}/{expression}": rio_tiler.models.BandStatistics, ...}.
tile
(
tile_x
, tile_y
, tile_z
, bands=None
, expression=None
, **kwargs
)
Read and merge Web Map tiles multiple bands.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.tile
method.
ImageData instance with data, mask and tile spatial info.
part
(
bbox
, bands=None
, expression=None
, **kwargs
)
Read and merge parts from multiple bands.
bbox
(tuple) — Output bounds (left, bottom, right, top) in target crs.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to the 'self.reader.part' method.
ImageData instance with data, mask and tile spatial info.
preview
(
bands=None
, expression=None
, **kwargs
)
Read and merge previews from multiple bands.
bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.preview
method.
ImageData instance with data, mask and tile spatial info.
point
(
lon
, lat
, bands=None
, expression=None
, **kwargs
)
Read a pixel values from multiple bands.
lon
(float) — Longitude.lat
(float) — Latitude.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.point
method.
PointData
feature
(
shape
, bands=None
, expression=None
, **kwargs
)
Read and merge parts defined by geojson feature from multiple bands.
shape
(dict) — Valid GeoJSON feature.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.feature
method.
ImageData instance with data, mask and tile spatial info.
__attrs_post_init__
(
)
Fetch productInfo and get bounds.
rio_tiler_pds.sentinel.aws.sentinel2.
S2L2AReader
(
input
, tms=<TileMatrixSet title='Google Maps Compatible for the World' id='WebMercatorQuad' crs='http://www.opengis.net/def/crs/EPSG/0/3857>
, minzoom=8
, maxzoom=14
, reader=<class 'rio_tiler.io.rasterio.Reader'>
, reader_options={'options': {'nodata': 0}}
, bucket='sentinel-s2-l2a'
, prefix_pattern='tiles/{_utm}/{lat}/{sq}/{acquisitionYear}/{_month}/{_day}/{num}'
)
AWS Public Dataset Sentinel 2 L2A reader.
input
(str) — Sentinel-2 L2A sceneid.tms
(TileMatrixSet, optional) —minzoom
(int, optional) —maxzoom
(int, optional) —reader
(type of Reader, optional) —reader_options
(dict, optional) —bucket
(str, optional) —prefix_pattern
(str, optional) —
bands
(tuple) — list of available bands (default is ('B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B09', 'B11', 'B12', 'B8A')).geographic_bounds
(float, float, float, float) — Return dataset bounds in geographic_crs.
>>> with S2L1CReader('S2A_L1C_20170729_19UDP_0') as scene:
print(scene.bounds)
__attrs_post_init__
(
)
— Fetch productInfo and get bounds.__enter__
(
)
— Support using with Context Managers.__exit__
(
exc_type
,exc_value
,traceback
)
— Support using with Context Managers.feature
(
shape
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts defined by geojson feature from multiple bands.info
(
bands
,*args
,**kwargs
)
(dict) — Return metadata from multiple bands.parse_expression
(
expression
)
(tuple) — Parse rio-tiler band math expression.part
(
bbox
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts from multiple bands.point
(
lon
,lat
,bands
,expression
,**kwargs
)
(PointData) — Read a pixel values from multiple bands.preview
(
bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge previews from multiple bands.statistics
(
bands
,expression
,categorical
,categories
,percentiles
,hist_options
,max_size
,**kwargs
)
(dict) — Return array statistics for multiple assets.tile
(
tile_x
,tile_y
,tile_z
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge Web Map tiles multiple bands.tile_exists
(
tile_x
,tile_y
,tile_z
)
(bool) — Check if a tile intersects the dataset bounds.
tile_exists
(
tile_x
, tile_y
, tile_z
)
Check if a tile intersects the dataset bounds.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.
True if the tile intersects the dataset bounds.
__enter__
(
)
Support using with Context Managers.
__exit__
(
exc_type
, exc_value
, traceback
)
Support using with Context Managers.
exc_type
—exc_value
—traceback
—
parse_expression
(
expression
)
→ tupleParse rio-tiler band math expression.
expression
(str) —
info
(
bands=None
, *args
, **kwargs
)
Return metadata from multiple bands.
bands
(sequence of str or str, optional) — band names to fetch info from. Required keyword argument.*args
—**kwargs
(any) —
Multiple bands info in form of {"band1": rio_tile.models.Info}.
statistics
(
bands=None
, expression=None
, categorical=False
, categories=None
, percentiles=None
, hist_options=None
, max_size=1024
, **kwargs
)
Return array statistics for multiple assets.
bands
(sequence of str or str) — bands to fetch info from. Required keyword argument.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).categorical
(bool) — treat input data as categorical data. Defaults to False.categories
(list of numbers, optional) — list of categories to return value for.percentiles
(list of numbers, optional) — list of percentile values to calculate. Defaults to[2, 98]
.hist_options
(dict, optional) — Options to forward to numpy.histogram function.max_size
(int, optional) — Limit the size of the longest dimension of the dataset read, respecting bounds X/Y aspect ratio. Defaults to 1024.**kwargs
(any) —kwargs
(optional) — Options to forward to theself.preview
method.
Multiple assets statistics in form of {"{band}/{expression}": rio_tiler.models.BandStatistics, ...}.
tile
(
tile_x
, tile_y
, tile_z
, bands=None
, expression=None
, **kwargs
)
Read and merge Web Map tiles multiple bands.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.tile
method.
ImageData instance with data, mask and tile spatial info.
part
(
bbox
, bands=None
, expression=None
, **kwargs
)
Read and merge parts from multiple bands.
bbox
(tuple) — Output bounds (left, bottom, right, top) in target crs.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to the 'self.reader.part' method.
ImageData instance with data, mask and tile spatial info.
preview
(
bands=None
, expression=None
, **kwargs
)
Read and merge previews from multiple bands.
bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.preview
method.
ImageData instance with data, mask and tile spatial info.
point
(
lon
, lat
, bands=None
, expression=None
, **kwargs
)
Read a pixel values from multiple bands.
lon
(float) — Longitude.lat
(float) — Latitude.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.point
method.
PointData
feature
(
shape
, bands=None
, expression=None
, **kwargs
)
Read and merge parts defined by geojson feature from multiple bands.
shape
(dict) — Valid GeoJSON feature.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.feature
method.
ImageData instance with data, mask and tile spatial info.
__attrs_post_init__
(
)
Fetch productInfo and get bounds.
rio_tiler_pds.sentinel.aws.sentinel2.
S2L2ACOGReader
(
input
, tms=<TileMatrixSet title='Google Maps Compatible for the World' id='WebMercatorQuad' crs='http://www.opengis.net/def/crs/EPSG/0/3857>
, minzoom=8
, maxzoom=14
, reader=<class 'rio_tiler.io.rasterio.Reader'>
, reader_options=NOTHING
, bucket='sentinel-cogs'
, prefix_pattern='sentinel-s2-{_levelLow}-cogs/{_utm}/{lat}/{sq}/{acquisitionYear}/{_month}/S{sensor}{satellite}_{_utm}{lat}{sq}_{acquisitionYear}{acquisitionMonth}{acquisitionDay}_{num}_{processingLevel}'
)
AWS Public Dataset Sentinel 2 L2A COGS reader.
input
(str) — Sentinel-2 sceneid.tms
(TileMatrixSet, optional) —minzoom
(int, optional) —maxzoom
(int, optional) —reader
(type of Reader, optional) —reader_options
(dict, optional) —bucket
(str, optional) —prefix_pattern
(str, optional) —
bands
(tuple) — list of available bands (defined by the STAC item.json).bounds
—crs
—geographic_bounds
(float, float, float, float) — Return dataset bounds in geographic_crs.maxzoom
(int) — Dataset's Max Zoom level (default is 14).minzoom
(int) — Dataset's Min Zoom level (default is 8).scene_params
(dict) — scene id parameters.stac_item
(dict) — sentinel 2 COG STAC item content.
>>> with S2L2ACOGReader('S2A_29RKH_20200219_0_L2A') as scene:
print(scene.bounds)
__attrs_post_init__
(
)
— Fetch item.json and get bounds and bands.__enter__
(
)
— Support using with Context Managers.__exit__
(
exc_type
,exc_value
,traceback
)
— Support using with Context Managers.feature
(
shape
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts defined by geojson feature from multiple bands.info
(
bands
,*args
,**kwargs
)
(dict) — Return metadata from multiple bands.parse_expression
(
expression
)
(tuple) — Parse rio-tiler band math expression.part
(
bbox
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge parts from multiple bands.point
(
lon
,lat
,bands
,expression
,**kwargs
)
(PointData) — Read a pixel values from multiple bands.preview
(
bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge previews from multiple bands.statistics
(
bands
,expression
,categorical
,categories
,percentiles
,hist_options
,max_size
,**kwargs
)
(dict) — Return array statistics for multiple assets.tile
(
tile_x
,tile_y
,tile_z
,bands
,expression
,**kwargs
)
(rio_tiler.models.ImageData) — Read and merge Web Map tiles multiple bands.tile_exists
(
tile_x
,tile_y
,tile_z
)
(bool) — Check if a tile intersects the dataset bounds.
tile_exists
(
tile_x
, tile_y
, tile_z
)
Check if a tile intersects the dataset bounds.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.
True if the tile intersects the dataset bounds.
__enter__
(
)
Support using with Context Managers.
__exit__
(
exc_type
, exc_value
, traceback
)
Support using with Context Managers.
exc_type
—exc_value
—traceback
—
parse_expression
(
expression
)
→ tupleParse rio-tiler band math expression.
expression
(str) —
info
(
bands=None
, *args
, **kwargs
)
Return metadata from multiple bands.
bands
(sequence of str or str, optional) — band names to fetch info from. Required keyword argument.*args
—**kwargs
(any) —
Multiple bands info in form of {"band1": rio_tile.models.Info}.
statistics
(
bands=None
, expression=None
, categorical=False
, categories=None
, percentiles=None
, hist_options=None
, max_size=1024
, **kwargs
)
Return array statistics for multiple assets.
bands
(sequence of str or str) — bands to fetch info from. Required keyword argument.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).categorical
(bool) — treat input data as categorical data. Defaults to False.categories
(list of numbers, optional) — list of categories to return value for.percentiles
(list of numbers, optional) — list of percentile values to calculate. Defaults to[2, 98]
.hist_options
(dict, optional) — Options to forward to numpy.histogram function.max_size
(int, optional) — Limit the size of the longest dimension of the dataset read, respecting bounds X/Y aspect ratio. Defaults to 1024.**kwargs
(any) —kwargs
(optional) — Options to forward to theself.preview
method.
Multiple assets statistics in form of {"{band}/{expression}": rio_tiler.models.BandStatistics, ...}.
tile
(
tile_x
, tile_y
, tile_z
, bands=None
, expression=None
, **kwargs
)
Read and merge Web Map tiles multiple bands.
tile_x
(int) — Tile's horizontal index.tile_y
(int) — Tile's vertical index.tile_z
(int) — Tile's zoom level index.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.tile
method.
ImageData instance with data, mask and tile spatial info.
part
(
bbox
, bands=None
, expression=None
, **kwargs
)
Read and merge parts from multiple bands.
bbox
(tuple) — Output bounds (left, bottom, right, top) in target crs.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to the 'self.reader.part' method.
ImageData instance with data, mask and tile spatial info.
preview
(
bands=None
, expression=None
, **kwargs
)
Read and merge previews from multiple bands.
bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.preview
method.
ImageData instance with data, mask and tile spatial info.
point
(
lon
, lat
, bands=None
, expression=None
, **kwargs
)
Read a pixel values from multiple bands.
lon
(float) — Longitude.lat
(float) — Latitude.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.point
method.
PointData
feature
(
shape
, bands=None
, expression=None
, **kwargs
)
Read and merge parts defined by geojson feature from multiple bands.
shape
(dict) — Valid GeoJSON feature.bands
(sequence of str or str, optional) — bands to fetch info from.expression
(str, optional) — rio-tiler expression for the band list (e.g. b1/b2+b3).**kwargs
(any) —kwargs
(optional) — Options to forward to theself.reader.feature
method.
ImageData instance with data, mask and tile spatial info.
__attrs_post_init__
(
)
Fetch item.json and get bounds and bands.
rio_tiler_pds.sentinel.aws.sentinel2.
S2COGReader
(
sceneid
, **kwargs
)
→ S2L2ACOGReader
Sentinel-2 COG readers.
sceneid
(str) —**kwargs
(any) —
rio_tiler_pds.sentinel.aws.sentinel2.
S2JP2Reader
(
sceneid
, **kwargs
)
→ S2L2AReader or S2L1CReader
Sentinel-2 JPEG2000 readers.
sceneid
(str) —**kwargs
(any) —
Utils¶
rio_tiler_pds.sentinel.utils.
s2_sceneid_parser
(
sceneid
)
Parse Sentinel 2 scene id.
sceneid
(str) — Sentinel-2 sceneid.
dictionary with metadata constructed from the sceneid.
InvalidSentinelSceneId
— Ifsceneid
doesn't match the regex schema.
>>> s2_sceneid_parser('S2A_L1C_20170729_19UDP_0')
>>> s2_sceneid_parser('S2A_L2A_20170729_19UDP_0')
>>> s2_sceneid_parser('S2A_29RKH_20200219_0_L2A')
>>> s2_sceneid_parse('S2B_MSIL2A_20190730T190919_N0212_R056_T10UEU_20201005T200819')
rio_tiler_pds.sentinel.utils.
s1_sceneid_parser
(
sceneid
)
Parse Sentinel 1 scene id.
sceneid
(str) — Sentinel-1 sceneid.
dictionary with metadata constructed from the sceneid.
InvalidSentinelSceneId
— Ifsceneid
doesn't match the regex schema.
>>> s1_sceneid_parser('S1A_IW_GRDH_1SDV_20180716T004042_20180716T004107_022812_02792A_FD5B')