Skip to content

Cope with proposed change in gdal.Open (gdal/pull/14763)#192

Open
neilflood wants to merge 2 commits into
ubarsc:masterfrom
neilflood:new-gdalopen-flags
Open

Cope with proposed change in gdal.Open (gdal/pull/14763)#192
neilflood wants to merge 2 commits into
ubarsc:masterfrom
neilflood:new-gdalopen-flags

Conversation

@neilflood

Copy link
Copy Markdown
Member

Upcoming GDAL pull request OSGeo/gdal#14763 will cause a change in behaviour of gdal.Open. We rely on the old behaviour in rios.applier.readAllImgInfo, where we expect that the rios.fileinfo.ImageInfo class will raise an exception if called on a vector file. Under the new behaviour, this would no longer be true.

This PR changes the ImageInfo constructor to explicitly use gdal.OpenEx with suitable flags to reproduce the expected behaviour. This appears to work fine under current versions of GDAL.

I think this is the only place that should be affected by the change, most uses of gdal.Open should be fine.

@neilflood

Copy link
Copy Markdown
Member Author

I will leave this PR tentative, until:

  • I figure out why the ubuntu-no-conda test is failing (something about a version conflict between numpy and gdal, I think
  • the GDAL PR gets merged, or otherwise becomes more solid

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 this pull request may close these issues.

1 participant