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

GDAL fails to read projection with: Unsupported conversion method: Polar_Stereographic #4144

Closed
RousseauLambertLP opened this issue Jul 28, 2021 · 0 comments
Assignees
Milestone

Comments

@RousseauLambertLP
Copy link

Expected behavior and actual behavior.

While trying to read a projection in proj4 string from a NetCDF file, gdal / proj fails to recognize the conversion method: Polar_Stereographic.

The issue happens with any files in: https://dd.weather.gc.ca/model_riops/netcdf/forecast/polar_stereographic/2d/06/003/

Error I get with a gdalinfo -proj4 input.nc :

$ gdalinfo -proj4 input.nc
Driver: netCDF/Network Common Data Format
...
ERROR 1: PROJ: proj_as_proj_string: Unsupported conversion method: Polar_Stereographic
PROJ.4 string is:
''
Origin = (-2500.000000000000000,8047500.000000000000000)
Pixel Size = (5000.000000000000000,-5000.000000000000000)
...
  SRS=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
  X_BAND=1
  X_DATASET=NETCDF:"dd_riops.nc":longitude
  Y_BAND=1
  Y_DATASET=NETCDF:"dd_riops.nc":latitude
Corner Coordinates:
Upper Left  (   -2500.000, 8047500.000)
Lower Left  (   -2500.000,   -2500.000)
Upper Right ( 8847500.000, 8047500.000)
Lower Right ( 8847500.000,   -2500.000)
Center      ( 4422500.000, 4022500.000)
...

I would expect the gdalinfo command to return the following PROJ4 string: +proj=stere +lat_0=90 +lat_ts=59.99993768695209 +lon_0=-100 +k=0.93301243 +x_0=4245000 +y_0=5295000 +a=6371229 +b=6371229 +units=m +no_defs

Steps to reproduce the problem.

Fails:

  • gdalinfo -proj4 input.nc
  • gdalwarp -of NetCDF -t_srs EPSG:4326 input.nc output.nc

Works with setting the source srs:

  • gdalwarp -of NetCDF -s_srs "+proj=stere +lat_0=90 +lat_ts=59.99993768695209 +lon_0=-100 +x_0=4245000 +y_0=5295000 +R=6371229 +units=m +no_defs" -t_srs EPSG:4326 input.nc output.nc

Operating system

Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

GDAL version and provenance

Fails:

  • GDAL 3.1.3
  • PROJ version: Rel. 7.2.0

Previously worked with:

  • GDAL 2.4.4
  • PROJ Rel. 4.8.0
@rouault rouault self-assigned this Aug 16, 2021
rouault added a commit that referenced this issue Aug 16, 2021
netCDF: properly deal with Polar Stereographic in reading and writing (fixes #4144)
@rouault rouault added this to the 3.3.2 milestone Aug 16, 2021
rouault added a commit that referenced this issue Aug 16, 2021
[Backport 3.3] netCDF: properly deal with Polar Stereographic in reading and writing (fixes #4144)
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

No branches or pull requests

2 participants