Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Important parameters for subsetting are described in the output. Check for srsName and axisLabels. These need to be used in the getCoverage request.  

Summary

correct WCS request for two available formats are given below. You can copy these into your browser to obtain the data. We chose the same bounding boxes as in the OPeNDAP primer that access these same datasets via netCDF libraries in Matlab, python or R. We discussed the pros and cons of WCS vs OPeNDAP in a FOSS4G paper.

...

Code Block
languagepy
requestbbox = (-6.283406057098745, 36.59251369598765, -6.266739197530853, 36.6050139853395)
requestwidth = 4
requestheight = 3
gc = wcs.getCoverage(identifier=sed.id,
                                  bbox=requestbbox,
                                  format='GeoTIFF',
                                  crs=sed.boundingboxes[0]['nativeSrs'],
                                  width=requestwidth,
                                  height=requestheight)
# random unique filename
tmpdir = tempfile.gettempdir()
fn = os.path.join(tmpdir,'test.tif')
f = open(fn,'wb')
f.write(gc.read())
gcf.close()
f.close(print('data save as',fn)