Package org.opengis.metadata.extent

Examples of org.opengis.metadata.extent.Extent


    private static ReferencedEnvelope getCRSBounds(CoordinateReferenceSystem crs) {
        if (crs == null)
            return new ReferencedEnvelope();
        try {
            Extent extent = crs.getDomainOfValidity();
            Collection<? extends GeographicExtent> elem = extent.getGeographicElements();
            double xmin = Double.MAX_VALUE, ymin = Double.MAX_VALUE;
            double xmax = Double.MIN_VALUE, ymax = Double.MIN_VALUE;
            for (GeographicExtent ext : elem) {
                if (ext instanceof BoundingPolygon) {
                    BoundingPolygon bp = (BoundingPolygon) ext;
View Full Code Here


    }

    private ReferencedEnvelope getDefaultBounds() {
        if (getViewportModel().getCRS().getDomainOfValidity() != null) {
            Extent extent = getViewportModel().getCRS().getDomainOfValidity();
            ReferencedEnvelope env = toReferencedEnvelope(extent, getViewportModel().getCRS());
            if (env != null) {
                ProjectPlugin
                        .log("MapImpl#getDefaultBounds(): Returning valid area of " + env.getCoordinateReferenceSystem().getName().toString()); //$NON-NLS-1$
                return env;
View Full Code Here

            scope = crs.getScope();
            remarks = crs.getRemarks();

            wkt = crs.toString();
            Extent domainOfValidity = crs.getDomainOfValidity();
            if (domainOfValidity != null) {
                areaOfValidity = domainOfValidity.getDescription() == null ? "" : domainOfValidity
                        .getDescription().toString(locale);
                Collection<? extends GeographicExtent> geographicElements = domainOfValidity
                        .getGeographicElements();
                for (GeographicExtent ex : geographicElements) {
                    aovCoords += " " + ex;
                }
                // Envelope envelope = CRS.getEnvelope(crs);
View Full Code Here

            final String   topic    = decoder.stringValue(TOPIC_CATEGORY);
            final String   type     = decoder.stringValue(DATA_TYPE);
            final String   credits  = decoder.stringValue(ACKNOWLEDGMENT);
            final String   license  = decoder.stringValue(LICENSE);
            final String   access   = decoder.stringValue(ACCESS_CONSTRAINT);
            final Extent   extent   = hasExtent ? null : createExtent();
            if (standard!=null || keywords!=null || topic != null || type!=null || credits!=null || license!=null || access!= null || extent!=null) {
                if (identification == null) {
                    identification = new DefaultDataIdentification();
                }
                if (topic    != null) addIfAbsent(identification.getTopicCategories(), Types.forCodeName(TopicCategory.class, topic, true));
View Full Code Here

         *   <gmd:EX_GeographicBoundingBox>
         *     …
         *   </gmd:EX_GeographicBoundingBox>
         * </gmd:geographicElement>
         */
        final Extent extent = getSingleton(identification.getExtents());
        final GeographicBoundingBox bbox = (GeographicBoundingBox) getSingleton(extent.getGeographicElements());
        assertEquals("extentTypeCode", Boolean.TRUE, bbox.getInclusion());
        assertEquals("westBoundLongitude"4.55, bbox.getWestBoundLongitude(), STRICT);
        assertEquals("eastBoundLongitude"4.55, bbox.getEastBoundLongitude(), STRICT);
        assertEquals("southBoundLatitude", 44.22, bbox.getSouthBoundLatitude(), STRICT);
        assertEquals("northBoundLatitude", 44.22, bbox.getNorthBoundLatitude(), STRICT);
        /*
         * <gmd:verticalElement>
         *   <gmd:EX_VerticalExtent>
         *     …
         *   </gmd:EX_VerticalExtent>
         * </gmd:verticalElement>
         */
        final VerticalExtent ve = getSingleton(extent.getVerticalElements());
        assertEquals("minimumValue",   0.1, ve.getMinimumValue(), STRICT);
        assertEquals("maximumValue", 10000, ve.getMaximumValue(), STRICT);
        final VerticalCRS crs = ve.getVerticalCRS();
        verifyIdentifiers("test1", crs);
        assertEquals("scope", "World", crs.getScope().toString());
View Full Code Here

     * Appends the anchor, scope and domain of validity of the given object. Those information are available
     * only for {@link ReferenceSystem}, {@link Datum} and {@link CoordinateOperation} objects.
     */
    private void appendForSubtypes(final IdentifiedObject object) {
        final InternationalString anchor, scope;
        final Extent area;
        if (object instanceof ReferenceSystem) {
            anchor = null;
            scope  = ((ReferenceSystem) object).getScope();
            area   = ((ReferenceSystem) object).getDomainOfValidity();
        } else if (object instanceof Datum) {
            anchor = ((Datum) object).getAnchorPoint();
            scope  = ((Datum) object).getScope();
            area   = ((Datum) object).getDomainOfValidity();
        } else if (object instanceof CoordinateOperation) {
            anchor = null;
            scope  = ((CoordinateOperation) object).getScope();
            area   = ((CoordinateOperation) object).getDomainOfValidity();
        } else {
            return;
        }
        appendOnNewLine("Anchor", anchor, null);
        appendOnNewLine("Scope", scope, ElementKind.SCOPE);
        if (area != null) {
            appendOnNewLine("Area", area.getDescription(), ElementKind.EXTENT);
            append(Extents.getGeographicBoundingBox(area), BBOX_ACCURACY);
            final MeasurementRange<Double> range = Extents.getVerticalRange(area);
            if (range != null) {
                openElement(true, "VerticalExtent");
                setColor(ElementKind.EXTENT);
View Full Code Here

            final String   topic    = decoder.stringValue(TOPIC_CATEGORY);
            final String   type     = decoder.stringValue(DATA_TYPE);
            final String   credits  = decoder.stringValue(ACKNOWLEDGMENT);
            final String   license  = decoder.stringValue(LICENSE);
            final String   access   = decoder.stringValue(ACCESS_CONSTRAINT);
            final Extent   extent   = hasExtent ? null : createExtent();
            if (standard!=null || keywords!=null || topic != null || type!=null || credits!=null || license!=null || access!= null || extent!=null) {
                if (identification == null) {
                    identification = new DefaultDataIdentification();
                }
                if (topic    != null) addIfAbsent(identification.getTopicCategories(), Types.forCodeName(TopicCategory.class, topic, true));
View Full Code Here

            String area, String scope, String remarks)
            throws SQLException, FactoryException
    {
        final Map<String,Object> properties = createProperties(name, code, remarks);
        if (area != null  &&  (area=area.trim()).length() != 0) {
            final Extent extent = buffered.createExtent(area);
            properties.put(Datum.DOMAIN_OF_VALIDITY_KEY, extent);
        }
        if (scope != null &&  (scope=scope.trim()).length() != 0) {
            properties.put(Datum.SCOPE_KEY, scope);
        }
View Full Code Here

     *         store. This exception usually have {@link SQLException} as its cause.
     */
    @Override
    public synchronized Extent createExtent(final String code) throws FactoryException {
        ensureNonNull("code", code);
        Extent returnValue = null;
        try {
            final String primaryKey = toPrimaryKey(Extent.class, code,
                    "[Area]", "AREA_CODE", "AREA_NAME");
            final PreparedStatement stmt;
            stmt = prepareStatement("Area", "SELECT AREA_OF_USE,"
View Full Code Here

    /**
     * Test of getDomainOfValidity method, of class DefaultTemporalReferenceSystem.
     */
    @Test
    public void testGetDomainOfValidity() {
        Extent result = temporalReferenceSystem1.getDomainOfValidity();
        assertEquals(temporalReferenceSystem2.getDomainOfValidity(), result);
    }
View Full Code Here

TOP

Related Classes of org.opengis.metadata.extent.Extent

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.