use of org.geotoolkit.data.kml.model.Camera in project geotoolkit by Geomatys.
the class CameraTest method cameraReadTest.
@Test
public void cameraReadTest() throws IOException, XMLStreamException, KmlException, URISyntaxException {
final KmlReader reader = new KmlReader();
reader.setInput(new File(pathToTestFile));
final Kml kmlObjects = reader.read();
reader.dispose();
final Feature feature = kmlObjects.getAbstractFeature();
assertEquals(KmlModelConstants.TYPE_PHOTO_OVERLAY, feature.getType());
final Camera camera = (Camera) feature.getPropertyValue(KmlConstants.TAG_VIEW);
assertEquals(4, camera.getLongitude(), DELTA);
assertEquals(43, camera.getLatitude(), DELTA);
assertEquals(625, camera.getAltitude(), DELTA);
assertEquals(2, camera.getHeading(), DELTA);
assertEquals(1, camera.getTilt(), DELTA);
assertEquals(2, camera.getRoll(), DELTA);
assertEquals(EnumAltitudeMode.RELATIVE_TO_GROUND, camera.getAltitudeMode());
}
Aggregations