/** * Constructs a new two-dimensional grid geometry. A math transform will be computed * automatically with an inverted <var>y</var> axis (i.e. {@code gridRange} and {@code * userRange} are assumed to have <var>y</var> axis in opposite direction). * * @param gridRange The valid coordinate range of a grid coverage. Increasing <var>x</var> * values goes right and increasing <var>y</var> values goes <strong>down</strong>. * @param userRange The corresponding coordinate range in user coordinate. Increasing * <var>x</var> values goes right and increasing <var>y</var> values goes * <strong>up</strong>. This rectangle must contains entirely all pixels, i.e. the * rectangle's upper left corner must coincide with the upper left corner of the first pixel * and the rectangle's lower right corner must coincide with the lower right corner of the * last pixel. */ public GridGeometry2D(final Rectangle gridRange, final Rectangle2D userRange) { this( new GridEnvelope2D(gridRange), getMathTransform(gridRange, userRange), (CoordinateReferenceSystem) null); }
/** * Constructs a new two-dimensional grid geometry. A math transform will be computed * automatically with an inverted <var>y</var> axis (i.e. {@code gridRange} and * {@code userRange} are assumed to have <var>y</var> axis in opposite direction). * * @param gridRange The valid coordinate range of a grid coverage. * Increasing <var>x</var> values goes right and * increasing <var>y</var> values goes <strong>down</strong>. * @param userRange The corresponding coordinate range in user coordinate. * Increasing <var>x</var> values goes right and * increasing <var>y</var> values goes <strong>up</strong>. * This rectangle must contains entirely all pixels, i.e. * the rectangle's upper left corner must coincide with * the upper left corner of the first pixel and the rectangle's * lower right corner must coincide with the lower right corner * of the last pixel. */ public GridGeometry2D(final Rectangle gridRange, final Rectangle2D userRange) { this(new GridEnvelope2D(gridRange), getMathTransform(gridRange, userRange), (CoordinateReferenceSystem) null); }
/** * Constructs a new two-dimensional grid geometry. A math transform will be computed * automatically with an inverted <var>y</var> axis (i.e. {@code gridRange} and * {@code userRange} are assumed to have <var>y</var> axis in opposite direction). * * @param gridRange The valid coordinate range of a grid coverage. * Increasing <var>x</var> values goes right and * increasing <var>y</var> values goes <strong>down</strong>. * @param userRange The corresponding coordinate range in user coordinate. * Increasing <var>x</var> values goes right and * increasing <var>y</var> values goes <strong>up</strong>. * This rectangle must contains entirely all pixels, i.e. * the rectangle's upper left corner must coincide with * the upper left corner of the first pixel and the rectangle's * lower right corner must coincide with the lower right corner * of the last pixel. */ public GridGeometry2D(final Rectangle gridRange, final Rectangle2D userRange) { this(new GeneralGridRange(gridRange), getMathTransform(gridRange, userRange), (CoordinateReferenceSystem) null); }