I'm trying get two sets of data using WCS 2.0.1 request from my GeoServer and do raster calculation using GDAL's gdal_calc.py. Both datasets in GeoServer are converted to the same coordinates and same resolutions, and the subset Long and Lat data are exactly the same in my two WCS requests.
How come I'm getting file with different dimensions?
The interesting thing is they are not off big, only the Y value is a unit bigger. The gdal_calc.py only takes raster layers with same dimensions, that's why I need to use same file dimensions. Can anyone help me?
Below are my WCS requests, value of Long and Lat are posted by my front HTML page using JavaScript, since I was able to download data, the values are fine.
$url1 = 'http://127.0.0.1:8080/geoserver/ows?service=WCS&version=2.0.1&request=GetCoverage&CoverageId=Canada:canada_clay_250_sl1&subset=Long('.$minX.','.$maxX.')&subset=Lat('.$minY.','.$maxY.')';
$url2 = 'http://127.0.0.1:8080/geoserver/ows?service=WCS&version=2.0.1&request=GetCoverage&CoverageId=manitoba:crop_risk&subset=Long('.$minX.','.$maxX.')&subset=Lat('.$minY.','.$maxY.')';
Also, here are two screen captures of my published data info from GeoServer:
…& SCALESIZE=i(1000),j(1000)
. You may need to think and try which axis is "i" and which "j".