<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi, <br>
</p>
<p>I'm trying to read a projection in proj4 string from a NetCDF and
gdal / proj fails to recognize the <font size="-2"><i><b>conversion
method: Polar_Stereographic</b></i></font>.</p>
<p>The issue appears with any files in:
<a class="moz-txt-link-freetext"
href="https://dd.weather.gc.ca/model_riops/netcdf/forecast/polar_stereographic/2d/06/003/">https://dd.weather.gc.ca/model_riops/netcdf/forecast/polar_stereographic/2d/06/003/</a></p>
<p>example gdalinfo request:</p>
<p><font size="-2"><i>$ gdalinfo -proj4 input.nc</i><i><br>
</i><i>Driver: netCDF/Network Common Data Format</i><i><br>
</i><i>...</i><i><br>
</i><i><b>ERROR 1: PROJ: proj_as_proj_string: Unsupported
conversion method: Polar_Stereographic</b></i><i><b><br>
</b></i><i><b>PROJ.4 string is:</b></i><i><b><br>
</b></i><i><b>''</b></i><i><br>
</i><i>Origin = (-2500.000000000000000,8047500.000000000000000)</i><i><br>
</i><i>Pixel Size = (5000.000000000000000,-5000.000000000000000)</i><i><br>
</i><i>...</i><i><br>
</i><i> 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"]]</i><i><br>
</i><i> X_BAND=1</i><i><br>
</i><i> X_DATASET=NETCDF:"dd_riops.nc":longitude</i><i><br>
</i><i> Y_BAND=1</i><i><br>
</i><i> Y_DATASET=NETCDF:"dd_riops.nc":latitude</i><i><br>
</i><i>Corner Coordinates:</i><i><br>
</i><i>Upper Left ( -2500.000, 8047500.000)</i><i><br>
</i><i>Lower Left ( -2500.000, -2500.000)</i><i><br>
</i><i>Upper Right ( 8847500.000, 8047500.000)</i><i><br>
</i><i>Lower Right ( 8847500.000, -2500.000)</i><i><br>
</i><i>Center ( 4422500.000, 4022500.000)</i><i><br>
</i><i>...</i></font></p>
<p>The gdal version I'm getting the error with: GDAL 3.1.3, and PROJ
version: Rel. 7.2.0.</p>
<p>I know this command previsously worked fine, using gdal GDAL
2.4.4 and proj Rel. 4.8.0 and I was able to get the 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 '</p>
<p>Also, if I try to reproject the file in EPSG:4326 with a gdalwarp
(GDAL 3.1.3) command, it fails, because it does not read the
source srs, but if I specify it using the -s_srs flag it works
fine, example:</p>
<p><font face="monospace"><code>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</code></font></p>
<p>Is this a bug in gdal / proj, or a parameter in the projection
definition that is not supported anymore ?</p>
<p>Thanks</p>
LP
</body>
</html>