0, 0, 1
}), matrix);
/*
* Test dropping a dimension.
*/
final GeneralEnvelope expanded = new GeneralEnvelope(3);
expanded.subEnvelope(0, 2).setEnvelope(srcEnvelope);
expanded.setRange(2, 1000, 2000);
matrix = Matrices.createTransform(expanded, dstEnvelope);
assertEquals("numRow", 3, matrix.getNumRow());
assertEquals("numCol", 4, matrix.getNumCol());
assertEquals(Matrices.create(3, 4, new double[] {
3.0, 0, 0, 50,
0, 2.5, 0, 75,
0, 0, 0, 1
}), matrix);
/*
* Test adding a dimension with ordinate values set to zero.
*/
expanded.subEnvelope(0, 2).setEnvelope(dstEnvelope);
matrix = Matrices.createTransform(srcEnvelope, expanded);
assertEquals("numRow", 4, matrix.getNumRow());
assertEquals("numCol", 3, matrix.getNumCol());
assertEquals(Matrices.create(4, 3, new double[] {
3.0, 0, 50,