Search in sources :

Example 6 with DefaultVerticalExtent

use of org.apache.sis.metadata.iso.extent.DefaultVerticalExtent in project sis by apache.

the class ServicesForMetadataTest method testVerticalIntersection.

/**
 * Tests {@link DefaultVerticalExtent#intersect(VerticalExtent)}.
 *
 * @throws TransformException if the transformation failed.
 *
 * @since 0.8
 */
@Test
public void testVerticalIntersection() throws TransformException {
    final DefaultVerticalExtent e1 = new DefaultVerticalExtent(1000, 2000, HardCodedCRS.ELLIPSOIDAL_HEIGHT_cm);
    final DefaultVerticalExtent e2 = new DefaultVerticalExtent(15, 25, HardCodedCRS.ELLIPSOIDAL_HEIGHT);
    e1.intersect(e2);
    assertEquals(new DefaultVerticalExtent(1500, 2000, HardCodedCRS.ELLIPSOIDAL_HEIGHT_cm), e1);
}
Also used : DefaultVerticalExtent(org.apache.sis.metadata.iso.extent.DefaultVerticalExtent) Test(org.junit.Test)

Example 7 with DefaultVerticalExtent

use of org.apache.sis.metadata.iso.extent.DefaultVerticalExtent in project sis by apache.

the class ServicesForMetadataTest method testSetVerticalBoundsFromGeoid.

/**
 * Tests (indirectly) {@link ServicesForMetadata#setBounds(Envelope, DefaultVerticalExtent)}
 * from a geoidal height
 *
 * @throws TransformException should never happen.
 */
@Test
public void testSetVerticalBoundsFromGeoid() throws TransformException {
    final DefaultVerticalExtent extent = new DefaultVerticalExtent();
    extent.setBounds(createEnvelope(HardCodedCRS.GEOID_4D));
    verifyVerticalExtent(CommonCRS.Vertical.MEAN_SEA_LEVEL, extent);
}
Also used : DefaultVerticalExtent(org.apache.sis.metadata.iso.extent.DefaultVerticalExtent) Test(org.junit.Test)

Aggregations

DefaultVerticalExtent (org.apache.sis.metadata.iso.extent.DefaultVerticalExtent)7 Test (org.junit.Test)5 DefaultGeographicBoundingBox (org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox)3 DefaultTemporalExtent (org.apache.sis.metadata.iso.extent.DefaultTemporalExtent)2 DefaultTemporalCRS (org.apache.sis.referencing.crs.DefaultTemporalCRS)2 CoordinateReferenceSystem (org.opengis.referencing.crs.CoordinateReferenceSystem)2 SingleCRS (org.opengis.referencing.crs.SingleCRS)2 TemporalCRS (org.opengis.referencing.crs.TemporalCRS)2 VerticalCRS (org.opengis.referencing.crs.VerticalCRS)2 TransformException (org.opengis.referencing.operation.TransformException)2 HashMap (java.util.HashMap)1 ImmutableIdentifier (org.apache.sis.metadata.iso.ImmutableIdentifier)1 DefaultExtent (org.apache.sis.metadata.iso.extent.DefaultExtent)1 DependsOnMethod (org.apache.sis.test.DependsOnMethod)1 GeographicBoundingBox (org.opengis.metadata.extent.GeographicBoundingBox)1 GeographicExtent (org.opengis.metadata.extent.GeographicExtent)1 VerticalExtent (org.opengis.metadata.extent.VerticalExtent)1 GeographicCRS (org.opengis.referencing.crs.GeographicCRS)1