本文整理了Java中org.opengis.metadata.extent.Extent.getGeographicElements()
方法的一些代码示例,展示了Extent.getGeographicElements()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extent.getGeographicElements()
方法的具体详情如下:
包路径:org.opengis.metadata.extent.Extent
类名称:Extent
方法名:getGeographicElements
[英]Provides geographic component of the extent of the referring object
[中]提供引用对象范围的地理组件
代码示例来源: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: geotools/geotools
if (extent != null) {
GeographicBoundingBoxImpl modifiable = null;
for (final GeographicExtent element : extent.getGeographicElements()) {
final GeographicBoundingBox bounds;
if (element instanceof GeographicBoundingBox) {
代码示例来源: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: apache/tika
Collection<Extent> extentList=((DefaultDataIdentification) i).getExtents();
for(Extent e:extentList){
ArrayList<GeographicExtent> geoElements= (ArrayList<GeographicExtent>) e.getGeographicElements();
for(GeographicExtent g:geoElements) {
代码示例来源:origin: apache/tika
ArrayList<GeographicExtent> geoElements= (ArrayList<GeographicExtent>) e.getGeographicElements();
for(GeographicExtent g:geoElements){
代码示例来源:origin: org.apache.sis.storage/sis-storage
for (final Extent extent : ((DataIdentification) identification).getExtents()) {
if (extent != null) { // Paranoiac check.
for (final GeographicExtent ge : extent.getGeographicElements()) {
if (ge instanceof GeographicBoundingBox) {
final GeneralEnvelope env = new GeneralEnvelope((GeographicBoundingBox) ge);
代码示例来源:origin: apache/sis
for (final GeographicExtent ge : extent.getGeographicElements()) {
if (ge instanceof GeographicBoundingBox) {
final GeneralEnvelope env = new GeneralEnvelope((GeographicBoundingBox) ge);
代码示例来源:origin: org.geotoolkit/geotk-metadata
if (extent != null) {
DefaultGeographicBoundingBox modifiable = null;
for (final GeographicExtent element : extent.getGeographicElements()) {
final GeographicBoundingBox bounds;
if (element instanceof GeographicBoundingBox) {
代码示例来源:origin: apache/sis
/**
* Asserts that all {@link GeographicBoundingBox}, if any,
* {@linkplain #assertIsWorld(GeographicBoundingBox) encompasses the world}.
*
* <p><b>Note:</b> a future version of this method may accept other kinds of extent,
* for example a polygon encompassing the world.</p>
*
* @param extent the extent to verify, or {@code null} if none.
* @param isMandatory {@code true} if an absence of world extent is a failure.
*/
private static void assertIsWorld(final Extent extent, boolean isMandatory) {
if (extent != null) {
for (final GeographicExtent element : extent.getGeographicElements()) {
if (element instanceof GeographicBoundingBox) {
assertIsWorld((GeographicBoundingBox) element);
isMandatory = false;
}
}
}
if (isMandatory) {
fail("Expected a world extent element.");
}
}
代码示例来源: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: 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.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: Geomatys/geotoolkit
for (final Extent extent : identification.getExtents()) {
if (extent != null) { // Paranoiac check.
for (final GeographicExtent ge : extent.getGeographicElements()) {
if (ge instanceof GeographicBoundingBox) {
final GeneralEnvelope env = new GeneralEnvelope((GeographicBoundingBox) ge);
代码示例来源:origin: org.apache.sis.core/sis-metadata
geographicElements = intersect(GeographicExtent.class, geographicElements, other.getGeographicElements(), new BinaryOperator<GeographicExtent>() {@Override public GeographicExtent apply(GeographicExtent e1, GeographicExtent e2) {return Extents.intersection(e1, e2);}});
verticalElements = intersect(VerticalExtent.class, verticalElements, other.getVerticalElements(), new BinaryOperator<VerticalExtent> () {@Override public VerticalExtent apply(VerticalExtent e1, VerticalExtent e2) {return Extents.intersection(e1, e2);}});
temporalElements = intersect(TemporalExtent.class, temporalElements, other.getTemporalElements(), new BinaryOperator<TemporalExtent> () {@Override public TemporalExtent apply(TemporalExtent e1, TemporalExtent e2) {return Extents.intersection(e1, e2);}});
代码示例来源:origin: locationtech/geogig
.getGeographicElements();
代码示例来源:origin: org.locationtech.geogig/geogig-core
.getGeographicElements();
代码示例来源:origin: apache/sis
geographicElements = intersect(GeographicExtent.class, geographicElements, other.getGeographicElements(), Extents::intersection);
verticalElements = intersect(VerticalExtent.class, verticalElements, other.getVerticalElements(), Extents::intersection);
temporalElements = intersect(TemporalExtent.class, temporalElements, other.getTemporalElements(), Extents::intersection);
代码示例来源:origin: opengeospatial/geoapi
/**
* 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());
for (GeographicExtent e : toArray(GeographicExtent.class, object.getGeographicElements())) dispatch(e);
for (VerticalExtent e : toArray(VerticalExtent .class, object.getVerticalElements ())) validate(e);
for (TemporalExtent e : toArray(TemporalExtent .class, object.getTemporalElements ())) validate(e);
}
}
代码示例来源: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: apache/sis
assertNull ("operationVersion", c.getOperationVersion());
final GeographicBoundingBox e = (GeographicBoundingBox) getSingleton(c.getDomainOfValidity().getGeographicElements());
assertEquals("eastBoundLongitude", +180, e.getEastBoundLongitude(), STRICT);
assertEquals("westBoundLongitude", -180, e.getWestBoundLongitude(), STRICT);
内容来源于网络,如有侵权,请联系作者删除!