use of eu.esdihumboldt.hale.common.instance.model.Instance in project hale by halestudio.
the class OrientableCurveGeometryTest method testorientableCurveGml32.
/**
* Test orientable curve geometries read from a GML 3.2 file
*
* @throws Exception if an error occurs
*/
@Test
public void testorientableCurveGml32() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml32.xsd").toURI(), getClass().getResource("/data/curve/sample-orientablecurve-gml32.xml").toURI());
// twelve instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. segments with LineStringSegment defined through coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, checker);
} finally {
it.close();
}
}
use of eu.esdihumboldt.hale.common.instance.model.Instance in project hale by halestudio.
the class OrientableCurveGeometryTest method testorientableCurveGml32_Grid.
/**
* Test orientable curve geometries read from a GML 3.2 file. Geometry
* coordinates will be moved to the universal grid
*
* @throws Exception if an error occurs
*/
@Test
public void testorientableCurveGml32_Grid() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml32.xsd").toURI(), getClass().getResource("/data/curve/sample-orientablecurve-gml32.xml").toURI(), gridConfig);
// twelve instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. segments with LineStringSegment defined through coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, gridChecker);
} finally {
it.close();
}
}
use of eu.esdihumboldt.hale.common.instance.model.Instance in project hale by halestudio.
the class PolygonPatchGeometryTest method testPolygonPatchGml32.
/**
* Test polygon patch geometries read from a GML 3.2 file
*
* @throws Exception if an error occurs
*/
@Test
public void testPolygonPatchGml32() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml32.xsd").toURI(), getClass().getResource("/data/polygon/sample-polygonpatch-gml32.xml").toURI());
// one instance expected
ResourceIterator<Instance> it = instances.iterator();
try {
// PolygonPatchProperty with LinearRing defined through coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, checker);
} finally {
it.close();
}
}
use of eu.esdihumboldt.hale.common.instance.model.Instance in project hale by halestudio.
the class RectangleGeometryTest method testRectangleGml32.
/**
* Test rectangle geometries read from a GML 3.2 file
*
* @throws Exception if an error occurs
*/
@Test
public void testRectangleGml32() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml32.xsd").toURI(), getClass().getResource("/data/sample-rectangle-gml32.xml").toURI());
// two instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. segments with LineStringSegment defined through coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, checker);
// 1. segments with LineStringSegment defined through coordinates
assertTrue("First sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, checker);
} finally {
it.close();
}
}
use of eu.esdihumboldt.hale.common.instance.model.Instance in project hale by halestudio.
the class RingGeometryTest method testRingGml31.
/**
* Test ring geometries read from a GML 2 file
*
* @throws Exception if an error occurs
*/
@Test
public void testRingGml31() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml31.xsd").toURI(), getClass().getResource("/data/sample-ring-gml31.xml").toURI());
// one instance expected
ResourceIterator<Instance> it = instances.iterator();
try {
// Ring with segments defined through LineStringSegment
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, checker);
} finally {
it.close();
}
}
Aggregations