1

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:

Data one for Canada_Clay enter image description here

Data two for Manitoba Cropping History enter image description here

  • Please add the exact requests you made and details of the data sets. – Ian Turton Apr 20 '17 at 18:26
  • 2
    If you need exact size I would suggest to use scalesize as defined in portal.opengeospatial.org/files/12-039 for example …& SCALESIZE=i(1000),j(1000). You may need to think and try which axis is "i" and which "j". – user30184 Apr 20 '17 at 19:45
  • @user30184 Thanks for your reference! I'm still new to WCS, this seems like a good way to go! – MaxG Apr 20 '17 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.