if (! getEnvelopeInternal().equals(g.getEnvelopeInternal())) return false; return relate(g).isEquals(getDimension(), g.getDimension());
if (tryShellEnv.equals(testEnv)) continue;
/** * Set the value of boundingBox * * @param bBox new value of boundingBox */ @Override public void setBoundingBox(Envelope bBox) { if ((bBox == null && boundingBox != null) || (bBox != null && !bBox.equals(this.boundingBox))) { Envelope oldBoundingBox = this.boundingBox; this.boundingBox = bBox; propertyChangeSupport.firePropertyChange(PROP_BOUNDINGBOX, oldBoundingBox, bBox); } }
/** * Compares the specified object with this envelope for equality. */ public boolean equals(final Object object) { if (super.equals(object)) { final CoordinateReferenceSystem otherCRS = (object instanceof ReferencedEnvelope) ? ((ReferencedEnvelope) object).crs : null; return Utilities.equals(crs, otherCRS); } return false; }
/** * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { Entry e = (Entry) obj; return this.bounds.equals(e.getBounds()) && this.data.equals(e.getData()); }
protected boolean checkAspect() { boolean changed = false; Rectangle newRect = comp.getBounds(); if (!newRect.equals(oldRect) || !mapArea.equals(oldMapArea)) { changed = true; oldRect = newRect; oldMapArea = mapArea; } return changed; }
/** * Convert the crop envelope into a polygon and the use the * world-to-grid transform to get a ROI for the source coverage. */ public static Polygon getPolygon(final GeneralEnvelope env, final GeometryFactory gf) throws IllegalStateException, MismatchedDimensionException { final Rectangle2D rect = env.toRectangle2D(); final Coordinate[] coord = new Coordinate[]{ new Coordinate(rect.getMinX(), rect.getMinY()), new Coordinate(rect.getMinX(), rect.getMaxY()), new Coordinate(rect.getMaxX(), rect.getMaxY()), new Coordinate(rect.getMaxX(), rect.getMinY()), new Coordinate(rect.getMinX(), rect.getMinY())}; final LinearRing ring = gf.createLinearRing(coord); final Polygon modelSpaceROI = new Polygon(ring, null, gf); // check that we have the same thing here assert modelSpaceROI.getEnvelopeInternal().equals(new ReferencedEnvelope(rect, env.getCoordinateReferenceSystem())); return modelSpaceROI; }
@Override public boolean evaluateInternal(Geometry left, Geometry right) { Envelope envLeft = left.getEnvelopeInternal(); Envelope envRight = right.getEnvelopeInternal(); if (envRight.equals(envLeft)) return left.equalsExact(right); else return false; }
public boolean evaluate(Object feature) { if (feature instanceof Feature && !validate((Feature)feature)) return false; Geometry left = getLeftGeometry(feature); Geometry right = getRightGeometry(feature); Envelope envLeft = left.getEnvelopeInternal(); Envelope envRight = right.getEnvelopeInternal(); if (envRight.equals(envLeft)) return left.equals(right); else return false; }
/** * Sets the extent of the transformation. This extent is not used directly * to calculate the transformation but is adjusted to obtain an extent with * the same ratio than the image * * @param newExtent The new base extent. */ public void setExtent(Envelope newExtent) { if ((newExtent != null) && ((newExtent.getWidth() == 0) || (newExtent.getHeight() == 0))) { newExtent.expandBy(10); } Envelope oldExtent = this.extent; boolean modified = true; /* Set extent when Envelope is modified */ if (extent != null) { if (extent.equals(newExtent)) { modified = false; } } if (modified) { this.extent = newExtent; calculateAffineTransform(); for (TransformListener listener : listeners) { listener.extentChanged(oldExtent, this); } } }
if (!mapArea.equals(oldMapArea)) { /* did the map extent change? */ changed = true; oldMapArea = mapArea;
boolean foundMatch = false; for (Envelope envelope : envelopes) { if (envelope.equals(expectedIter.next())) { foundMatch = true; expectedIter.remove();
if (! getEnvelopeInternal().equals(g.getEnvelopeInternal())) return false; return relate(g).isEquals(getDimension(), g.getDimension());
if (tryShellEnv.equals(testEnv)) continue;
} else if ((this.envelope == null) || (request.getEnvelope() == null)) { isEqual = false; } else if (request.getEnvelope().equals(envelope)) { isEqual = isEqual && true; } else {
if (entry.getBounds().equals(envelope)) { ret = node;
e = node.getEntry(i); if (e.getBounds().equals(env)) { this.doDelete(lock, node, e);
assert modelSpaceROI.getEnvelopeInternal().equals( new ReferencedEnvelope(rect, cropEnvelope .getCoordinateReferenceSystem()));