Skip to content

Commit

Permalink
FIX: Update some code to match sertit==1.29.1
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Sep 26, 2023
1 parent b1dbea3 commit c51dc38
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- FIX: Don't collocate a raster on itself
- FIX: Better management of default pixel size for multi-resolution products (such as PAN band in Landsat)
- FIX: Fixing the PAN GSD for Landsat-OLI products
- FIX: Update some code to match `sertit==1.29.0`
- FIX: Update some code to match `sertit==1.29.1`

## 0.20.3 (2023-07-31)

Expand Down
3 changes: 1 addition & 2 deletions eoreader/products/optical/dimap_v1_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def crs(self) -> riocrs.CRS:
lat = float(np.mean([float(v.findtext("FRAME_LAT")) for v in vertices]))

# Compute UTM crs from center long/lat
utm = vectors.corresponding_utm_projection(lon, lat)
utm = riocrs.CRS.from_string(utm)
utm = vectors.to_utm_crs(lon, lat)

return utm

Expand Down
3 changes: 1 addition & 2 deletions eoreader/products/optical/dimap_v2_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ def crs(self) -> riocrs.CRS:
lat = float(np.mean([float(v.findtext("LAT")) for v in vertices]))

# Compute UTM crs from center long/lat
utm = vectors.corresponding_utm_projection(lon, lat)
utm = riocrs.CRS.from_string(utm)
utm = vectors.to_utm_crs(lon, lat)

return utm

Expand Down
3 changes: 1 addition & 2 deletions eoreader/products/optical/maxar_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,7 @@ def crs(self) -> riocrs.CRS:
lat = float(root.findtext(".//ORIGINY"))

# Compute UTM crs from center long/lat
utm = vectors.corresponding_utm_projection(lon, lat)
utm = riocrs.CRS.from_string(utm)
utm = vectors.to_utm_crs(lon, lat)
else:
utm = raw_crs

Expand Down
4 changes: 2 additions & 2 deletions eoreader/products/optical/s3_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ def crs(self) -> riocrs.CRS:
mid_lon = lon[0, mid_y, mid_x].data

# Deduce UTM proj from the central lon/lat
utm = vectors.corresponding_utm_projection(mid_lon, mid_lat)
utm = vectors.to_utm_crs(mid_lon, mid_lat)

return riocrs.CRS.from_string(utm)
return utm

def _replace(
self,
Expand Down
3 changes: 1 addition & 2 deletions eoreader/products/optical/sv1_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ def crs(self) -> riocrs.CRS:
lat = float(root.findtext(".//CenterLatitude"))

# Compute UTM crs from center long/lat
utm = vectors.corresponding_utm_projection(lon, lat)
utm = riocrs.CRS.from_string(utm)
utm = vectors.to_utm_crs(lon, lat)

return utm

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spyndex>=0.3.0
pystac[validation]

# SERTIT libs
sertit[full]>=1.29.0
sertit[full]>=1.29.1

# Optimizations
dask[complete]>=2021.10.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"xarray>=0.18.0",
"rioxarray>=0.10.0",
"geopandas>=0.11.0",
"sertit[full]>=1.27.3",
"sertit[full]>=1.29.1",
"spyndex>=0.3.0",
"pyresample",
"zarr",
Expand Down

0 comments on commit c51dc38

Please sign in to comment.