Search in sources :

Example 1 with PhotoOverlay

use of de.micromata.opengis.kml.v_2_2_0.PhotoOverlay in project ddf by codice.

the class KmlFeatureToJtsGeometryConverterTest method testConvertKmlPhotoOverlayFeature.

@Test
public void testConvertKmlPhotoOverlayFeature() {
    InputStream stream = KmlFeatureToJtsGeometryConverterTest.class.getResourceAsStream("/kmlPhotoOverlay.kml");
    Kml kml = Kml.unmarshal(stream);
    assertThat(kml, notNullValue());
    PhotoOverlay kmlPhotoOverlay = (PhotoOverlay) kml.getFeature();
    assertThat(kmlPhotoOverlay, notNullValue());
    Geometry geometry = KmlFeatureToJtsGeometryConverter.from(kmlPhotoOverlay);
    assertThat(geometry, notNullValue());
    assertFeature(kmlPhotoOverlay, geometry);
}
Also used : Geometry(org.locationtech.jts.geom.Geometry) InputStream(java.io.InputStream) Kml(de.micromata.opengis.kml.v_2_2_0.Kml) PhotoOverlay(de.micromata.opengis.kml.v_2_2_0.PhotoOverlay) Test(org.junit.Test)

Example 2 with PhotoOverlay

use of de.micromata.opengis.kml.v_2_2_0.PhotoOverlay in project ddf by codice.

the class KmlPhotoOverlayToJtsPointConverterTest method setupClass.

@BeforeClass
public static void setupClass() {
    InputStream stream = KmlPhotoOverlayToJtsPointConverterTest.class.getResourceAsStream("/kmlPhotoOverlay.kml");
    Kml kml = Kml.unmarshal(stream);
    testKmlPhotoOverlay = ((PhotoOverlay) kml.getFeature());
}
Also used : InputStream(java.io.InputStream) Kml(de.micromata.opengis.kml.v_2_2_0.Kml) PhotoOverlay(de.micromata.opengis.kml.v_2_2_0.PhotoOverlay) BeforeClass(org.junit.BeforeClass)

Example 3 with PhotoOverlay

use of de.micromata.opengis.kml.v_2_2_0.PhotoOverlay in project ddf by codice.

the class KmlPhotoOverlayToJtsPointConverterTest method testConvertEmptyKmlPhotoOverlayReturnsNullPoint.

@Test
public void testConvertEmptyKmlPhotoOverlayReturnsNullPoint() {
    Point jtsPoint = KmlPhotoOverlayToJtsPointConverter.from(new PhotoOverlay());
    assertThat(jtsPoint, nullValue());
}
Also used : Point(org.locationtech.jts.geom.Point) PhotoOverlay(de.micromata.opengis.kml.v_2_2_0.PhotoOverlay) Test(org.junit.Test)

Aggregations

PhotoOverlay (de.micromata.opengis.kml.v_2_2_0.PhotoOverlay)3 Kml (de.micromata.opengis.kml.v_2_2_0.Kml)2 InputStream (java.io.InputStream)2 Test (org.junit.Test)2 BeforeClass (org.junit.BeforeClass)1 Geometry (org.locationtech.jts.geom.Geometry)1 Point (org.locationtech.jts.geom.Point)1