I am trying to use gdal_translate
to convert a WCS source to a tif target. I am trying to achieve this using a WCS XML service description file. The gdal_translate
call looks like this
"C:\OSGeo4W\bin\gdal_translate.exe" -tr 250 250 -projwin -337500 1242500 152500 527500 -of "GTiff" -projwin_srs "ESRI:54052" -co "TILED=YES" -co "COMPRESS=DEFLATE" -co "PREDICTOR=2" -co "BIGTIFF=YES" "./sg.xml" "./test.tif"
The sg.xml file looks like this:
<WCS_GDAL>
<ServiceURL>https://maps.isric.org/mapserv?map=/map/nitrogen.map&SERVICE=WCS&VERSION=2.0.1</ServiceURL>
<CoverageName>nitrogen_5-15cm_Q0.5</CoverageName>
</WCS_GDAL>
Unfortunately, I am getting the following result:
ERROR 1: PROJ: proj_create_from_database: crs not foundInput file size is 159246, 580340...10...20...30...40...50...60...70...80...90...100 - done.
The good news is that I actually get a file. The extents are almost right, because I suspect the coordinates are converted through a few other srs. Regardless, I am bothered by the error, as I cannot trust the result each and every time.
While ESRI:54052
might not be the most common projection, it is in the proj.db
database as pointed out by gdalsrsinfo ESRI:54052 -v
, which returns Validate Succeeds
.
I don't understand why is gdal complaining that it cannot find this projection, when it clearly can in other circumstances.