Skip to content

Commit 6820c3c

Browse files
authored
https://github.com/gjoseph92/stackstac/issues/181#issuecomment-1374026051
1 parent 3857190 commit 6820c3c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stackstac/rio_reader.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import numpy as np
99
import rasterio as rio
10+
from rasterio.transform import from_gcps
1011
from rasterio.vrt import WarpedVRT
1112

1213
from .rio_env import LayeredEnv
@@ -343,10 +344,10 @@ def _open(self) -> ThreadsafeRioDataset:
343344

344345
# Only make a VRT if the dataset doesn't match the spatial spec we want
345346
if self.spec.vrt_params != {
346-
"crs": ds.crs.to_epsg(),
347-
"transform": ds.transform,
348-
"height": ds.height,
349-
"width": ds.width,
347+
"crs": ds.gcps[1],
348+
"transform": from_gcps(ds.gcps[0]),
349+
# "height": ds.height,
350+
# "width": ds.width,
350351
}:
351352
with self.gdal_env.open_vrt:
352353
vrt = WarpedVRT(

0 commit comments

Comments
 (0)