/** * Creates a null envelope with the specified coordinate reference system. * * @param crs The coordinate reference system. * @throws MismatchedDimensionException if the CRS dimension is not valid. */ public ReferencedEnvelope3D(CoordinateReferenceSystem crs) throws MismatchedDimensionException { this.crs = crs; checkCoordinateReferenceSystemDimension(); }
/** * Creates a new envelope from an existing JTS envelope. * * @param envelope The envelope to initialize from. * @param crs The coordinate reference system. * @throws MismatchedDimensionExceptionif the CRS dimension is not valid. */ public ReferencedEnvelope3D( final ReferencedEnvelope3D envelope, final CoordinateReferenceSystem crs) throws MismatchedDimensionException { init(envelope); this.crs = crs; checkCoordinateReferenceSystemDimension(); }
/** * Creates an envelope for a region defined by maximum and minimum values. * * @param x1 The first x-value. * @param x2 The second x-value. * @param y1 The first y-value. * @param y2 The second y-value. * @param z1 The first y-value. * @param z2 The second y-value. * @param crs The coordinate reference system. * @throws MismatchedDimensionException if the CRS dimension is not valid. */ public ReferencedEnvelope3D( final double x1, final double x2, final double y1, final double y2, final double z1, final double z2, final CoordinateReferenceSystem crs) throws MismatchedDimensionException { init(x1, x2, y1, y2, z1, z2); this.crs = crs; checkCoordinateReferenceSystemDimension(); }
/** * Creates a new envelope from an existing envelope. * * @param envelope The envelope to initialize from * @throws MismatchedDimensionException if the CRS dimension is not valid. */ public ReferencedEnvelope3D(final ReferencedEnvelope3D envelope) throws MismatchedDimensionException { init(envelope); crs = envelope.getCoordinateReferenceSystem(); checkCoordinateReferenceSystemDimension(); }
/** * Creates a new envelope from an existing OGC envelope. * * <p>NOTE: if the envelope is empty, the resulting ReferencedEnvelope will not be. In case this * is needed use {@link #create(org.opengis.geometry.Envelope, CoordinateReferenceSystem) * ReferencedEnvelope.create(envelope, envelope.getCoordinateReferenceSystem())} * * @param envelope The envelope to initialize from. * @throws MismatchedDimensionException if the CRS dimension is not valid. */ public ReferencedEnvelope3D(final org.opengis.geometry.Envelope envelope) throws MismatchedDimensionException { init( envelope.getMinimum(0), envelope.getMaximum(0), envelope.getMinimum(1), envelope.getMaximum(1), envelope.getMinimum(2), envelope.getMaximum(2)); this.crs = envelope.getCoordinateReferenceSystem(); checkCoordinateReferenceSystemDimension(); }