-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add libgdal-jp2openjpeg dependency #291
Conversation
To test for existence of libgdal-jp2openjpeg driver.
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
recipe/meta.yaml
Outdated
# Test reading/writing a JP2 file (S90E000.earth_relief_05m_p.jp2) | ||
- gmt grdcut @earth_relief_05m -R-10/-9/3/5 -G/tmp/reliefcut.jp2=gd:JP2OpenJPEG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this doesn't error with a non-zero exit code at https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=978661&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=986b1512-c876-5f92-0d81-ba851554a0a3&l=4457:
+ gmt grdcut @earth_relief_05m -R-10/-9/3/5 -G/tmp/reliefcut.jp2=gd:JP2OpenJPEG
grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org/]
grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 05x05 arc minutes reduced by Gaussian Cartesian filtering (26.2 km fullwidth) [Tozer et al., 2019].
grdblend [NOTICE]: -> Download 180x180 degree grid tile (earth_relief_05m_g): S90W180
ERROR 4: `/home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2' not recognized as being in a supported file format. It could have been recognized by driver JP2OpenJPEG, but plugin gdal_JP2OpenJPEG.so is not available in your installation. You may install it with 'conda install -c conda-forge libgdal-jp2openjpeg'
grdblend [ERROR]: ERROR - Unable to convert SRTM file /home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2 to compressed netCDF format
grdblend [ERROR]: Unable to obtain remote file @S90W180.earth_relief_05m_g.nc
ERROR 4: `/home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2' not recognized as being in a supported file format. It could have been recognized by driver JP2OpenJPEG, but plugin gdal_JP2OpenJPEG.so is not available in your installation. You may install it with 'conda install -c conda-forge libgdal-jp2openjpeg'
grdblend [ERROR]: ERROR - Unable to convert SRTM file /home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2 to compressed netCDF format
grdblend [ERROR]: Cannot find file @S90W180.earth_relief_05m_g.nc
ERROR 4: `/home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2' not recognized as being in a supported file format. It could have been recognized by driver JP2OpenJPEG, but plugin gdal_JP2OpenJPEG.so is not available in your installation. You may install it with 'conda install -c conda-forge libgdal-jp2openjpeg'
grdblend [ERROR]: ERROR - Unable to convert SRTM file /home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2 to compressed netCDF format
grdblend [ERROR]: Cannot find file @S90W180.earth_relief_05m_g.nc
grdblend [ERROR]: File @S90W180.earth_relief_05m_g.nc not found
[Session gmt (0)]: Error returned from GMT API: GMT_FILE_NOT_FOUND (16)
grdcut [ERROR]: ERROR - Unable to produce blended grid from /tmp/=tiled_333_GX_YV6NSp
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
+ exit 0
@seisman, is there a better to do this JP2 driver check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just run gdal-config --formats | grep JP2OpenJPEG
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't error with a non-zero exit code (and JP2OpenJPEG
seems to be listed even though libgdal-jp2openjpeg
isn't installed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gmt grdcut @earth_relief_05m -R-10/-9/3/5 -G/tmp/reliefcut.jp2=gd:JP2OpenJPEG
Maybe check if /tmp/reliefcut.jp2
exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this seems to work:
gmt grdcut @earth_relief_05m -R-10/-9/3/5 -G/tmp/reliefcut.jp2=gd:JP2OpenJPEG
[ -e '/tmp/reliefcut.jp2' ] && exit 0 || exit 1
errors as intended at https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=978819&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=986b1512-c876-5f92-0d81-ba851554a0a3&l=4480:
+ gmt grdcut @earth_relief_05m -R-10/-9/3/5 -G/tmp/reliefcut.jp2=gd:JP2OpenJPEG
grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org/]
grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 05x05 arc minutes reduced by Gaussian Cartesian filtering (26.2 km fullwidth) [Tozer et al., 2019].
grdblend [NOTICE]: -> Download 180x180 degree grid tile (earth_relief_05m_g): S90W180
ERROR 4: `/home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2' not recognized as being in a supported file format. It could have been recognized by driver JP2OpenJPEG, but plugin gdal_JP2OpenJPEG.so is not available in your installation. You may install it with 'conda install -c conda-forge libgdal-jp2openjpeg'
grdblend [ERROR]: ERROR - Unable to convert SRTM file /home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2 to compressed netCDF format
grdblend [ERROR]: Unable to obtain remote file @S90W180.earth_relief_05m_g.nc
ERROR 4: `/home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2' not recognized as being in a supported file format. It could have been recognized by driver JP2OpenJPEG, but plugin gdal_JP2OpenJPEG.so is not available in your installation. You may install it with 'conda install -c conda-forge libgdal-jp2openjpeg'
grdblend [ERROR]: ERROR - Unable to convert SRTM file /home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2 to compressed netCDF format
grdblend [ERROR]: Cannot find file @S90W180.earth_relief_05m_g.nc
ERROR 4: `/home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2' not recognized as being in a supported file format. It could have been recognized by driver JP2OpenJPEG, but plugin gdal_JP2OpenJPEG.so is not available in your installation. You may install it with 'conda install -c conda-forge libgdal-jp2openjpeg'
grdblend [ERROR]: ERROR - Unable to convert SRTM file /home/conda/.gmt/server/earth/earth_relief/earth_relief_05m_g/S90W180.earth_relief_05m_g.jp2 to compressed netCDF format
grdblend [ERROR]: Cannot find file @S90W180.earth_relief_05m_g.nc
grdblend [ERROR]: File @S90W180.earth_relief_05m_g.nc not found
[Session gmt (0)]: Error returned from GMT API: GMT_FILE_NOT_FOUND (16)
grdcut [ERROR]: ERROR - Unable to produce blended grid from /tmp/=tiled_333_GX_TH7dZO
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
+ '[' -e /tmp/reliefcut.jp2 ']'
+ exit 1
Gonna wait to see if this works on Windows though 🙂 Edit: yeah, the test fails on Windows as expected, but on the grdcut
command rather than the [ -e '/tmp/reliefcut.jp2']
command...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test fails on Windows as expected, but on the
grdcut
command rather than the[ -e '/tmp/reliefcut.jp2']
command...
Maybe the /tmp
directory doesn't exist on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, maybe just write to the current directory. Feel free to push to this branch, it's late for me already so won't get to it until tomorrow.
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipe:
|
This reverts commit 3825db4.
Square brackets might be mistaken for selectors.
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
This reverts commit d5e48d1.
@conda-forge-admin, please rerender |
Hi! This is the friendly automated conda-forge-webservice. I tried to rerender for you, but it looks like there was nothing to do. This message was generated by GitHub actions workflow run https://github.com/conda-forge/gmt-feedstock/actions/runs/9936852688. |
Tests pass and the PR is merged. Please also apply the same fix to the dev branch when you have time. |
Cherry-picked from 058b79f/conda-forge#291
Included as part of #292 |
* Bump GMT dev version from 6.6.0.dev0+eec0fc5 to 6.6.0.dev1+708d76b * Fix incorrect edits from yq Need to update bumpdevversion.yml script later. * Add libgdal-jp2openjpeg as runtime dependency Cherry-picked from 058b79f/#291 * Actually add libgdal-jp2openjpeg as a runtime dependency --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Enable reading tiled
.jp2
files from https://docs.generic-mapping-tools.org/latest/datasets/remote-data.html such asearth_relief
,mars_relief
,earth_age
,mercury_relief
,earth_faa
,moon_relief
,earth_geoid
,pluto_relief
,earth_mag
,venus_relief
,earth_mag4km
,earth_wdmam
,earth_synbath
,earth_vgg
.The
gdal
package on conda-forge now depends onlibgdal-core
which is a lightweight version that doesn't include certain drivers. See conda-forge/gdal-feedstock#948 and conda-forge/gdal-feedstock#722.Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)Closes GenericMappingTools/pygmt#3328