Package org.geotools.metadata.iso.extent

Examples of org.geotools.metadata.iso.extent.GeographicBoundingBoxImpl


        assertEquals(46.948, envelope.getMinimum(0), 1E-3);
        assertEquals(56.781, envelope.getMaximum(0), 1E-3);
        assertEquals(-8.375, envelope.getMinimum(1), 1E-3);
        assertEquals( 6.548, envelope.getMaximum(1), 1E-3);
        assertNull(CRS.getEnvelope(null));
        final GeographicBoundingBox rep = new GeographicBoundingBoxImpl(envelope);
        assertEquals(42.25, rep.getSouthBoundLatitude(), 1E-3);
        assertEquals(51.10, rep.getNorthBoundLatitude(), 1E-3);
        assertEquals(-5.20, rep.getWestBoundLongitude(), 1E-3);
        assertEquals( 8.23, rep.getEastBoundLongitude(), 1E-3);
    }
View Full Code Here


                            if (!result.wasNull()) {
                                if (extent == null) {
                                    extent = new ExtentImpl();
                                }
                                extent.setGeographicElements(Collections.singleton(
                                        new GeographicBoundingBoxImpl(xmin, xmax, ymin, ymax)));
                            }
                        }
                    }
                }
                if (extent != null) {
View Full Code Here

     * @throws TransformException
     */
    private void prepareCoverageSpatialElements() throws FactoryException,
            TransformException {
      //basic initialization
      coverageGeographicBBox =GridCoverageUtilities.getReferencedEnvelopeFromGeographicBoundingBox(new GeographicBoundingBoxImpl(coverageEnvelope));
        coverageRequestedRasterArea = new Rectangle();
       
        // //
        //
        // Get the original envelope 2d and its spatial reference system
View Full Code Here

        // If this does not work, we go back to reproject in the wgs84
        // requested envelope
        //             
        // //
      //convert to WGS84
      final GeographicBoundingBoxImpl geographicRequestedBBox = new GeographicBoundingBoxImpl(requestedBBox);
        ReferencedEnvelope approximateWGS84requestedBBox =GridCoverageUtilities.getReferencedEnvelopeFromGeographicBoundingBox(geographicRequestedBBox);

        // checking the intersection in wgs84 with the geographicbbox for this coverage
        if (!approximateWGS84requestedBBox.intersects((BoundingBox)coverageGeographicBBox))
        {
View Full Code Here

        assertEquals(46.944, envelope.getMinimum(0), 1E-3);
        assertEquals(56.777, envelope.getMaximum(0), 1E-3);
        assertEquals(-8.375, envelope.getMinimum(1), 1E-3);
        assertEquals( 6.548, envelope.getMaximum(1), 1E-3);
        assertNull(CRS.getEnvelope(null));
        final GeographicBoundingBox rep = new GeographicBoundingBoxImpl(envelope);
        assertEquals(42.25, rep.getSouthBoundLatitude(), 1E-3);
        assertEquals(51.10, rep.getNorthBoundLatitude(), 1E-3);
        assertEquals(-5.20, rep.getWestBoundLongitude(), 1E-3);
        assertEquals( 8.23, rep.getEastBoundLongitude(), 1E-3);
    }
View Full Code Here

                            if (!result.wasNull()) {
                                if (extent == null) {
                                    extent = new ExtentImpl();
                                }
                                extent.setGeographicElements(Collections.singleton(
                                        new GeographicBoundingBoxImpl(xmin, xmax, ymin, ymax)));
                            }
                        }
                    }
                }
                if (extent != null) {
View Full Code Here

     */
    private void prepareCoverageSpatialElements() throws TransformException, FactoryException {
      //
      // basic initialization
      //
      coverageGeographicBBox =ImageUtilities.getReferencedEnvelopeFromGeographicBoundingBox(new GeographicBoundingBoxImpl(coverageEnvelope));
      coverageGeographicCRS2D=coverageGeographicBBox.getCoordinateReferenceSystem();
       
        //
        // Get the original envelope 2d and its spatial reference system
        //
View Full Code Here

     * @throws TransformException
     */
    private void prepareCoverageSpatialElements() throws FactoryException,
            TransformException {
      //basic initialization
      coverageGeographicBBox =GridCoverageUtilities.getReferencedEnvelopeFromGeographicBoundingBox(new GeographicBoundingBoxImpl(coverageEnvelope));
        coverageRequestedRasterArea = new Rectangle();
       
        // //
        //
        // Get the original envelope 2d and its spatial reference system
View Full Code Here

        // If this does not work, we go back to reproject in the wgs84
        // requested envelope
        //             
        // //
      //convert to WGS84
      final GeographicBoundingBoxImpl geographicRequestedBBox = new GeographicBoundingBoxImpl(requestedBBox);
        ReferencedEnvelope approximateWGS84requestedBBox =GridCoverageUtilities.getReferencedEnvelopeFromGeographicBoundingBox(geographicRequestedBBox);

        // checking the intersection in wgs84 with the geographicbbox for this coverage
        if (!approximateWGS84requestedBBox.intersects((BoundingBox)coverageGeographicBBox))
        {
View Full Code Here

     *
     * @since 2.3
     */
    public static GeographicBoundingBox getGeographicBoundingBox(final CoordinateReferenceSystem crs) {
        GeographicBoundingBox     bounds = null;
        GeographicBoundingBoxImpl merged = null;
        if (crs != null) {
            final Extent domainOfValidity = crs.getDomainOfValidity();
            if (domainOfValidity != null) {
                for (final GeographicExtent extent : domainOfValidity.getGeographicElements()) {
                    if (extent instanceof GeographicBoundingBox) {
                        final GeographicBoundingBox candidate = (GeographicBoundingBox) extent;
                        if (bounds == null) {
                            bounds = candidate;
                        } else {
                            if (merged == null) {
                                bounds = merged = new GeographicBoundingBoxImpl(bounds);
                            }
                            merged.add(candidate);
                        }
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.geotools.metadata.iso.extent.GeographicBoundingBoxImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.