Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove reverse option #139

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 1.0.0a3 (2023-11-03)

* remove `reverse` option in `PGSTACBackend` mosaic backend. Reverse item order should be achieved with STAC search sortby.

## 1.0.0a2 (2023-11-02)

* update titiler's dependency to `>=0.15.2,<0.16`
Expand Down
16 changes: 0 additions & 16 deletions titiler/pgstac/mosaic.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ def tile(
tile_x: int,
tile_y: int,
tile_z: int,
reverse: bool = False,
scan_limit: Optional[int] = None,
items_limit: Optional[int] = None,
time_limit: Optional[int] = None,
Expand All @@ -318,9 +317,6 @@ def tile(
f"No assets found for tile {tile_z}-{tile_x}-{tile_y}"
)

if reverse:
mosaic_assets = list(reversed(mosaic_assets))

def _reader(
item: Dict[str, Any], x: int, y: int, z: int, **kwargs: Any
) -> ImageData:
Expand All @@ -334,7 +330,6 @@ def point(
lon: float,
lat: float,
coord_crs: CRS = WGS84_CRS,
reverse: bool = False,
scan_limit: Optional[int] = None,
items_limit: Optional[int] = None,
time_limit: Optional[int] = None,
Expand All @@ -356,9 +351,6 @@ def point(
if not mosaic_assets:
raise NoAssetFoundError(f"No assets found for point ({lon},{lat})")

if reverse:
mosaic_assets = list(reversed(mosaic_assets))

def _reader(
item: Dict[str, Any],
lon: float,
Expand All @@ -379,7 +371,6 @@ def part(
bbox: BBox,
dst_crs: Optional[CRS] = None,
bounds_crs: CRS = WGS84_CRS,
reverse: bool = False,
scan_limit: Optional[int] = None,
items_limit: Optional[int] = None,
time_limit: Optional[int] = None,
Expand All @@ -406,9 +397,6 @@ def part(
if not mosaic_assets:
raise NoAssetFoundError("No assets found for bbox input")

if reverse:
mosaic_assets = list(reversed(mosaic_assets))

def _reader(item: Dict[str, Any], bbox: BBox, **kwargs: Any) -> ImageData:
with self.reader(item, **self.reader_options) as src_dst:
return src_dst.part(bbox, **kwargs)
Expand All @@ -428,7 +416,6 @@ def feature(
dst_crs: Optional[CRS] = None,
shape_crs: CRS = WGS84_CRS,
max_size: int = 1024,
reverse: bool = False,
scan_limit: Optional[int] = None,
items_limit: Optional[int] = None,
time_limit: Optional[int] = None,
Expand Down Expand Up @@ -457,9 +444,6 @@ def feature(
if not mosaic_assets:
raise NoAssetFoundError("No assets found for Geometry")

if reverse:
mosaic_assets = list(reversed(mosaic_assets))

def _reader(item: Dict[str, Any], shape: Dict, **kwargs: Any) -> ImageData:
with self.reader(item, **self.reader_options) as src_dst:
return src_dst.feature(shape, **kwargs)
Expand Down
Loading