本文整理了Java中org.opengis.metadata.extent.Extent
类的一些代码示例,展示了Extent
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extent
类的具体详情如下:
包路径:org.opengis.metadata.extent.Extent
类名称:Extent
[英]Information about spatial, vertical, and temporal extent. This interface has four optional attributes ( #getGeographicElements, #getTemporalElements, and #getVerticalElements) and an element called #getDescription. At least one of the four shall be used.
[中]关于空间、垂直和时间范围的信息。此接口有四个可选属性(#GetGeographicalElements、#GetTemporalements和#getVerticalElements)和一个名为#getDescription的元素。应至少使用四种方法中的一种。
代码示例来源:origin: geotools/geotools
final Extent domainOfValidity = crs.getDomainOfValidity();
if (domainOfValidity != null) {
for (final GeographicExtent extent : domainOfValidity.getGeographicElements()) {
if (extent instanceof GeographicBoundingBox) {
final GeographicBoundingBox candidate = (GeographicBoundingBox) extent;
代码示例来源:origin: org.apache.sis.core/sis-metadata
/**
* Constructs a new instance initialized with the values from the specified metadata object.
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
* @param object the metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Extent)
*/
public DefaultExtent(final Extent object) {
super(object);
if (object != null) {
description = object.getDescription();
geographicElements = copyCollection(object.getGeographicElements(), GeographicExtent.class);
temporalElements = copyCollection(object.getTemporalElements(), TemporalExtent.class);
verticalElements = copyCollection(object.getVerticalElements(), VerticalExtent.class);
}
}
代码示例来源:origin: org.geoserver.web/gs-web-demo
if (domainOfValidity != null) {
areaOfValidity =
domainOfValidity.getDescription() == null
? ""
: domainOfValidity.getDescription().toString(locale);
Collection<? extends GeographicExtent> geographicElements =
domainOfValidity.getGeographicElements();
for (GeographicExtent ex : geographicElements) {
aovCoords.append(" ").append(ex);
代码示例来源:origin: apache/sis
/**
* Tests {@link Store#getMetadata()}.
*
* @throws DataStoreException if an error occurred while parsing the data.
*/
@Test
public void testGetMetadata() throws DataStoreException {
final Metadata metadata;
try (Store store = open()) {
metadata = store.getMetadata();
}
final Extent extent = getSingleton(((AbstractIdentification) getSingleton(metadata.getIdentificationInfo())).getExtents());
final GeographicBoundingBox bbox = (GeographicBoundingBox) getSingleton(extent.getGeographicElements());
assertEquals("westBoundLongitude", 50.23, bbox.getWestBoundLongitude(), STRICT);
assertEquals("eastBoundLongitude", 50.31, bbox.getEastBoundLongitude(), STRICT);
assertEquals("southBoundLatitude", 9.23, bbox.getSouthBoundLatitude(), STRICT);
assertEquals("northBoundLatitude", 9.27, bbox.getNorthBoundLatitude(), STRICT);
assertTrue("Should not have a vertical extent.", extent.getVerticalElements().isEmpty());
}
代码示例来源:origin: Geomatys/geotoolkit
/**
* Method use for xml.
*
* @return {@linkplain Extent#getDescription() extend description} from
* {@linkplain #getDomainOfValidity() super class domaine of validity}
*/
@XmlElement(name = "domainOfValidity", required = true)
protected InternationalString getdomaineOfValidity() {
return super.getDomainOfValidity().getDescription();
}
}
代码示例来源:origin: opengeospatial/geoapi
double min = Double.POSITIVE_INFINITY;
double max = Double.NEGATIVE_INFINITY;
for (final VerticalExtent e : extent.getVerticalElements()) {
double minValue = toPrimitive(e.getMinimumValue());
double maxValue = toPrimitive(e.getMaximumValue());
代码示例来源:origin: org.apache.sis.core/sis-metadata
Date max = null;
if (extent != null) {
for (final TemporalExtent t : extent.getTemporalElements()) {
Date startTime = null;
Date endTime = null;
代码示例来源:origin: apache/sis
final GeographicBoundingBox bbox = (GeographicBoundingBox) getSingleton(extent.getGeographicElements());
assertEquals("extentTypeCode", Boolean.TRUE, bbox.getInclusion());
assertEquals("westBoundLongitude", 4.55, bbox.getWestBoundLongitude(), STRICT);
final VerticalExtent ve = getSingleton(extent.getVerticalElements());
assertEquals("minimumValue", 0.1, ve.getMinimumValue(), STRICT);
assertEquals("maximumValue", 10000, ve.getMaximumValue(), STRICT);
代码示例来源:origin: apache/sis
final InternationalString description = domain.getDescription();
if (description != null) {
String text = description.toString(locale);
代码示例来源:origin: org.apache.sis.core/sis-metadata
VerticalDatumType selectedType = null;
if (extent != null) {
for (final VerticalExtent element : extent.getVerticalElements()) {
double min = element.getMinimumValue();
double max = element.getMaximumValue();
代码示例来源:origin: apache/sis
Date max = null;
if (extent != null) {
for (final TemporalExtent t : extent.getTemporalElements()) {
Date startTime = null;
Date endTime = null;
代码示例来源:origin: geotools/geotools
if (extent != null) {
GeographicBoundingBoxImpl modifiable = null;
for (final GeographicExtent element : extent.getGeographicElements()) {
final GeographicBoundingBox bounds;
if (element instanceof GeographicBoundingBox) {
代码示例来源:origin: apache/sis
/**
* Constructs a new instance initialized with the values from the specified metadata object.
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
* @param object the metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Extent)
*/
public DefaultExtent(final Extent object) {
super(object);
if (object != null) {
description = object.getDescription();
geographicElements = copyCollection(object.getGeographicElements(), GeographicExtent.class);
temporalElements = copyCollection(object.getTemporalElements(), TemporalExtent.class);
verticalElements = copyCollection(object.getVerticalElements(), VerticalExtent.class);
}
}
代码示例来源:origin: org.apache.sis.core/sis-metadata
appendOnNewLine(WKTKeywords.Scope, scope, ElementKind.SCOPE);
if (area != null) {
appendOnNewLine(WKTKeywords.Area, area.getDescription(), ElementKind.EXTENT);
append(Extents.getGeographicBoundingBox(area), BBOX_ACCURACY);
appendVerticalExtent(Extents.getVerticalRange(area));
代码示例来源:origin: apache/sis
VerticalDatumType selectedType = null;
if (extent != null) {
for (final VerticalExtent element : extent.getVerticalElements()) {
double min = element.getMinimumValue();
double max = element.getMaximumValue();
代码示例来源:origin: org.apache.sis.core/sis-metadata
Date max = null;
if (extent != null) {
for (final TemporalExtent t : extent.getTemporalElements()) {
final Date startTime, endTime;
if (t instanceof DefaultTemporalExtent) {
代码示例来源:origin: geotools/geotools
final Extent domainOfValidity = crs.getDomainOfValidity();
if (domainOfValidity != null) {
for (final GeographicExtent extent : domainOfValidity.getGeographicElements()) {
if (Boolean.FALSE.equals(extent.getInclusion())) {
continue;
代码示例来源:origin: org.opengis/geoapi-conformance
/**
* Validates the given extent.
*
* @param object The object to validate, or {@code null}.
*/
public void validate(final Extent object) {
if (object == null) {
return;
}
validateOptional(object.getDescription());
validateCollection(GeographicExtent.class, object.getGeographicElements());
validateCollection(VerticalExtent.class, object.getVerticalElements());
validateCollection(TemporalExtent.class, object.getTemporalElements());
}
}
代码示例来源:origin: apache/sis
appendOnNewLine(WKTKeywords.Scope, scope, ElementKind.SCOPE);
if (area != null) {
appendOnNewLine(WKTKeywords.Area, area.getDescription(), ElementKind.EXTENT);
append(Extents.getGeographicBoundingBox(area), BBOX_ACCURACY);
appendVerticalExtent(Extents.getVerticalRange(area));
代码示例来源:origin: apache/sis
Date max = null;
if (extent != null) {
for (final TemporalExtent t : extent.getTemporalElements()) {
final Date startTime, endTime;
if (t instanceof DefaultTemporalExtent) {
内容来源于网络,如有侵权,请联系作者删除!