@@ -873,12 +873,11 @@ def tile(
873873 ):
874874 """Create map tile from a dataset."""
875875 tms = self .supported_tms .get (tileMatrixSetId )
876- logger .info ("opening dataset" )
877876 with rasterio .Env (** env ):
877+ logger .info (f"opening data with reader: { self .reader } " )
878878 with self .reader (
879879 src_path , tms = tms , ** reader_params .as_dict ()
880880 ) as src_dst :
881- logger .info ("reading data" )
882881 image = src_dst .tile (
883882 x ,
884883 y ,
@@ -888,10 +887,10 @@ def tile(
888887 ** layer_params .as_dict (),
889888 ** dataset_params .as_dict (),
890889 )
891- logger .info ("reading data complete" )
892890 dst_colormap = getattr (src_dst , "colormap" , None )
893891
894892 if post_process :
893+ logger .info ("post-processing image" )
895894 image = post_process (image )
896895
897896 content , media_type = self .render_func (
@@ -980,6 +979,7 @@ def tilejson(
980979
981980 tms = self .supported_tms .get (tileMatrixSetId )
982981 with rasterio .Env (** env ):
982+ logger .info (f"opening data with reader: { self .reader } " )
983983 with self .reader (
984984 src_path , tms = tms , ** reader_params .as_dict ()
985985 ) as src_dst :
@@ -1140,6 +1140,7 @@ def wmts(
11401140
11411141 tms = self .supported_tms .get (tileMatrixSetId )
11421142 with rasterio .Env (** env ):
1143+ logger .info (f"opening data with reader: { self .reader } " )
11431144 with self .reader (
11441145 src_path , tms = tms , ** reader_params .as_dict ()
11451146 ) as src_dst :
@@ -1227,6 +1228,7 @@ def point(
12271228 ):
12281229 """Get Point value for a dataset."""
12291230 with rasterio .Env (** env ):
1231+ logger .info (f"opening data with reader: { self .reader } " )
12301232 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
12311233 pts = src_dst .point (
12321234 lon ,
@@ -1283,6 +1285,7 @@ def preview(
12831285 ):
12841286 """Create preview of a dataset."""
12851287 with rasterio .Env (** env ):
1288+ logger .info (f"opening data with reader: { self .reader } " )
12861289 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
12871290 image = src_dst .preview (
12881291 ** layer_params .as_dict (),
@@ -1346,6 +1349,7 @@ def bbox_image(
13461349 ):
13471350 """Create image from a bbox."""
13481351 with rasterio .Env (** env ):
1352+ logger .info (f"opening data with reader: { self .reader } " )
13491353 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
13501354 image = src_dst .part (
13511355 [minx , miny , maxx , maxy ],
@@ -1407,6 +1411,7 @@ def feature_image(
14071411 ):
14081412 """Create image from a geojson feature."""
14091413 with rasterio .Env (** env ):
1414+ logger .info (f"opening data with reader: { self .reader } " )
14101415 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
14111416 image = src_dst .feature (
14121417 geojson .model_dump (exclude_none = True ),
@@ -1478,6 +1483,7 @@ def info(
14781483 ):
14791484 """Return dataset's basic info or the list of available assets."""
14801485 with rasterio .Env (** env ):
1486+ logger .info (f"opening data with reader: { self .reader } " )
14811487 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
14821488 return src_dst .info (** asset_params .as_dict ())
14831489
@@ -1503,6 +1509,7 @@ def info_geojson(
15031509 ):
15041510 """Return dataset's basic info as a GeoJSON feature."""
15051511 with rasterio .Env (** env ):
1512+ logger .info (f"opening data with reader: { self .reader } " )
15061513 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
15071514 bounds = src_dst .get_geographic_bounds (crs or WGS84_CRS )
15081515 geometry = bounds_to_geometry (bounds )
@@ -1527,6 +1534,7 @@ def available_assets(
15271534 ):
15281535 """Return a list of supported assets."""
15291536 with rasterio .Env (** env ):
1537+ logger .info (f"opening data with reader: { self .reader } " )
15301538 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
15311539 return src_dst .assets
15321540
@@ -1560,6 +1568,7 @@ def asset_statistics(
15601568 ):
15611569 """Per Asset statistics"""
15621570 with rasterio .Env (** env ):
1571+ logger .info (f"opening data with reader: { self .reader } " )
15631572 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
15641573 return src_dst .statistics (
15651574 ** asset_params .as_dict (),
@@ -1597,6 +1606,7 @@ def statistics(
15971606 ):
15981607 """Merged assets statistics."""
15991608 with rasterio .Env (** env ):
1609+ logger .info (f"opening data with reader: { self .reader } " )
16001610 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
16011611 # Default to all available assets
16021612 if not layer_params .assets and not layer_params .expression :
@@ -1653,6 +1663,7 @@ def geojson_statistics(
16531663 fc = FeatureCollection (type = "FeatureCollection" , features = [geojson ])
16541664
16551665 with rasterio .Env (** env ):
1666+ logger .info (f"opening data with reader: { self .reader } " )
16561667 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
16571668 # Default to all available assets
16581669 if not layer_params .assets and not layer_params .expression :
@@ -1729,6 +1740,7 @@ def info(
17291740 ):
17301741 """Return dataset's basic info."""
17311742 with rasterio .Env (** env ):
1743+ logger .info (f"opening data with reader: { self .reader } " )
17321744 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
17331745 return src_dst .info (** bands_params .as_dict ())
17341746
@@ -1754,6 +1766,7 @@ def info_geojson(
17541766 ):
17551767 """Return dataset's basic info as a GeoJSON feature."""
17561768 with rasterio .Env (** env ):
1769+ logger .info (f"opening data with reader: { self .reader } " )
17571770 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
17581771 bounds = src_dst .get_geographic_bounds (crs or WGS84_CRS )
17591772 geometry = bounds_to_geometry (bounds )
@@ -1778,6 +1791,7 @@ def available_bands(
17781791 ):
17791792 """Return a list of supported bands."""
17801793 with rasterio .Env (** env ):
1794+ logger .info (f"opening data with reader: { self .reader } " )
17811795 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
17821796 return src_dst .bands
17831797
@@ -1811,6 +1825,7 @@ def statistics(
18111825 ):
18121826 """Get Dataset statistics."""
18131827 with rasterio .Env (** env ):
1828+ logger .info (f"opening data with reader: { self .reader } " )
18141829 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
18151830 # Default to all available bands
18161831 if not bands_params .bands and not bands_params .expression :
@@ -1867,6 +1882,7 @@ def geojson_statistics(
18671882 fc = FeatureCollection (type = "FeatureCollection" , features = [geojson ])
18681883
18691884 with rasterio .Env (** env ):
1885+ logger .info (f"opening data with reader: { self .reader } " )
18701886 with self .reader (src_path , ** reader_params .as_dict ()) as src_dst :
18711887 # Default to all available bands
18721888 if not bands_params .bands and not bands_params .expression :
0 commit comments