Comments (7)
😭 there are 2 issues here:
- We create the
bounds
in https://github.com/cogeotiff/rio-tiler-pds/blob/main/rio_tiler_pds/sentinel/aws/sentinel1.py#L76 but checking the min/max of the Geometry. In your case, the dataset is crossing the dateline so the geometry is a MultiPolygon (one polygon on each side).
To fix this we can do something like:
def get_bounds(geom: Dict) -> Tuple[float, float, float, float]:
"""Get Bounds from GeoJSON geometry and handle multi polygon crossing the antimeridian line.
ref: https://github.com/cogeotiff/rio-tiler-pds/issues/77
"""
if geom["type"] == "MultiPolygon":
bounds = [
featureBounds({"type": "Polygon", "coordinates": poly})
for poly in geom["coordinates"]
]
minx, miny, maxx, maxy = zip(*bounds)
return [max(minx), min(miny), min(maxx), max(maxy)]
return featureBounds(geom)
Which will return [175.38292995222957, 61.06949078480844, -179.34123633603335, 62.88226850489882]
for the S1A_IW_GRDH_1SDV_20230726T183302_20230726T183327_049598_05F6CA_31E7
dataset (instead of [-180.0, 61.06949078480844, 180.0, 62.88226850489882]
)
- There is another issue within rasterio/gdal for the Sentinel-1 dataset. The COG are not directly georeferenced but uses internal GCPS. In rio-tiler we use those GCPS to virtually warp the data to geographic projection and then
read tile
. Sadly for GCPS dataset crossing the dateline there is an issue (see: rasterio/rasterio#2892).
from rio-tiler-pds.
Seems like no one has taken any action on your rasterio bug?
Are there any workarounds that can be implemented in rio-tiler-pds while waiting for that to be resolved, or have you already implemented something?
from rio-tiler-pds.
Sadly even if we fix the bounds
in rio-tiler-crs (as mentioned in the previous comment) there will still be the issue in rasterio/gdal
from rio-tiler-pds.
@jonaraphael I just publish a new version with a fix for #78 and the multi-polygon bug BUT this won't fix the underlying issue in rasterio: rasterio/rasterio#2892)
from rio-tiler-pds.
Thank you for the progress!
from rio-tiler-pds.
is there anyway you can provide the file in rasterio 2892 without it being on user-pays S3? I'd like to explore this.
from rio-tiler-pds.
Hi @mdsumner!
Sorry, I was on vacation the past two weeks.
You can download the TIFF here.
from rio-tiler-pds.
Related Issues (20)
- Move reader base classes to rio-tiler
- add missing `0` in band name when needed
- B10 Band unavailable. HOT 3
- azimuth line and pixelcount of extracted tile/point HOT 7
- Add GCP sentinel2/landsat
- add Landsat Collection 2 HOT 1
- [Resolved] deprecate AWS Landsat8 Collection 1 HOT 5
- Add top-level __init__.py
- Unable to run "Sentinel 2 - AWS COG" example HOT 4
- Add reader for the Sentinel 2 DigitalTwin reader HOT 1
- ASTER - publicly available dataset HOT 2
- add copernicus-dem reader ?
- Landsat sceneid_parser fails for albers data HOT 1
- [Landsat] allow Albers collection 2 dataset HOT 1
- Inconsistent Sentinel 2 COG band naming between scenes HOT 3
- rename `master` -> `main`
- Accessing additional Sentinel 2 products? HOT 1
- update to rio-tiler 5.0
- Scene B3DA causing error with no /bounds HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rio-tiler-pds.