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

GDAL3 support in ls_public_bucket.py script #23

Closed
Kirill888 opened this issue Apr 22, 2020 · 1 comment · Fixed by #24
Closed

GDAL3 support in ls_public_bucket.py script #23

Kirill888 opened this issue Apr 22, 2020 · 1 comment · Fixed by #24

Comments

@Kirill888
Copy link
Member

GDAL3 swaps order of Lon/Lat and generated extents are not correct when running this script in the environment with GDAL3 installed.

def get_coords(geo_ref_points, spatial_ref):
t = osr.CoordinateTransformation(spatial_ref, spatial_ref.CloneGeogCS())
def transform(p):
lon, lat, z = t.TransformPoint(p['x'], p['y'])
return {'lon': lon, 'lat': lat}

In GDAL3 output of TransformPoint is lat,lon,z instead. But that code is wrong in other ways, since we need bounding box of the geometry in EPSG:4326 and not a mere transform or the 4 corners to ESPG:4326. This also doesn't work when dataset's footprint spans lon=180 line.
opendatacube/datacube-core#886

Also shouldn't that script be in datacube-dataset-config repo?
opendatacube/datacube-dataset-config#10

@alexgleith
Copy link
Contributor

Yes, the script should be in datacube-dataset-config and it should be a git submodule. There's a fair bit of consolidation that should be undertaken in the indexing process in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants