Search in sources :

Example 1 with GroundOverlay

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

the class KmlFeatureToJtsGeometryConverterTest method testConvertKmlGroundOverlayFeature.

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

Example 2 with GroundOverlay

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

the class KmlGroundOverlayToJtsGeometryConverterTest method testConvertEmptyKmlGroundOverlayReturnsNullPoint.

@Test
public void testConvertEmptyKmlGroundOverlayReturnsNullPoint() {
    Geometry jtsGeometry = KmlGroundOverlayToJtsGeometryConverter.from(new GroundOverlay());
    assertThat(jtsGeometry, nullValue());
}
Also used : Geometry(org.locationtech.jts.geom.Geometry) GroundOverlay(de.micromata.opengis.kml.v_2_2_0.GroundOverlay) Test(org.junit.Test)

Example 3 with GroundOverlay

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

the class KmlGroundOverlayToJtsGeometryConverterTest method setupClass.

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

Example 4 with GroundOverlay

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

the class KmlLatLonBoxToJtsGeometryConverterTest method setupClass.

@BeforeClass
public static void setupClass() {
    InputStream stream = KmlLatLonBoxToJtsGeometryConverterTest.class.getResourceAsStream("/kmlGroundOverlay.kml");
    Kml kml = Kml.unmarshal(stream);
    GroundOverlay groundOverlay = ((GroundOverlay) kml.getFeature());
    testKmlLatLonBox = groundOverlay.getLatLonBox();
}
Also used : InputStream(java.io.InputStream) Kml(de.micromata.opengis.kml.v_2_2_0.Kml) GroundOverlay(de.micromata.opengis.kml.v_2_2_0.GroundOverlay) BeforeClass(org.junit.BeforeClass)

Aggregations

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