protected void handleGridCRS(CoverageInfo ci) throws Exception {
start("wcs:GridCRS");
element("wcs:GridBaseCRS", urnIdentifier(ci.getCRS()));
element("wcs:GridType", GridType.GT2dGridIn2dCrs.getXmlConstant());
// TODO: go back to using the metadata once they can be trusted
final LinearTransform tx = (LinearTransform) ci.getGrid().getGridToCRS();
final Matrix matrix = tx.getMatrix();
// origin
StringBuffer origins = new StringBuffer();
for (int i = 0; i < matrix.getNumRow() - 1; i++) {
origins.append(matrix.getElement(i, matrix.getNumCol() - 1));
if (i < matrix.getNumRow() - 2)