private void assertSquaresMetersIdentical(SimpleFeatureCollection result) {
SimpleFeatureIterator fi = result.features();
// check the first polygon
SimpleFeature f = fi.next();
MultiPolygon mp = (MultiPolygon) f.getDefaultGeometry();
assertEquals(1, mp.getNumGeometries());
Polygon p = (Polygon) mp.getGeometryN(0);
assertEquals(0, p.getNumInteriorRing());
LineString shell = p.getExteriorRing();
CoordinateSequence cs = shell.getCoordinateSequence();
assertEquals(5, cs.size());
assertOrdinates(0, 0, 0, cs, 0);
assertOrdinates(0, 10000, 2, cs, 1);
assertOrdinates(10000, 10000, 2, cs, 2);
assertOrdinates(10000, 0, 0, cs, 3);
assertOrdinates(0, 0, 0, cs, 4);
// check the second
f = fi.next();
mp = (MultiPolygon) f.getDefaultGeometry();
assertEquals(1, mp.getNumGeometries());
p = (Polygon) mp.getGeometryN(0);
assertEquals(0, p.getNumInteriorRing());
shell = p.getExteriorRing();
cs = shell.getCoordinateSequence();
assertEquals(5, cs.size());
assertOrdinates(0, 0, Double.NaN, cs, 0);