MathTransform realToGrid)
throws MismatchedSizeException, MismatchedDimensionException, NoSuchIdentifierException,
MismatchedReferenceSystemException, TransformException, TriangulationException {
super(vectors, dx, dy, envelope, realToGrid);
Envelope gridEnvelope = CRS.transform(worldToGrid, envelope);
double enlarge = gridEnvelope.getSpan(0)*0.01;
DirectPosition p0 = new DirectPosition2D(
gridEnvelope.getLowerCorner().getOrdinate(0)-enlarge,
gridEnvelope.getLowerCorner().getOrdinate(1)-enlarge);
DirectPosition p2 = new DirectPosition2D(
gridEnvelope.getUpperCorner().getOrdinate(0)+enlarge,
gridEnvelope.getUpperCorner().getOrdinate(1)+enlarge);
DirectPosition p1 = new DirectPosition2D(
p0.getOrdinate(0), p2.getOrdinate(1));
DirectPosition p3 = new DirectPosition2D(
p2.getOrdinate(0), p0.getOrdinate(1));