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);
}
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);
}
Aggregations