use of eu.esdihumboldt.hale.common.instance.model.InstanceCollection in project hale by halestudio.
the class PolygonHandlerTest method testPolygonGml31_Grid.
/**
* Test polygon geometries read from a GML 3.1 file
*
* @throws Exception if an error occurs
*/
@Test
public void testPolygonGml31_Grid() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml31.xsd").toURI(), getClass().getResource("/data/polygon/sample-polygon-gml31.xml").toURI(), gridConfig);
// one instance expected
ResourceIterator<Instance> it = instances.iterator();
try {
// PolygonProperty with LinearRing 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.InstanceCollection in project hale by halestudio.
the class PolygonHandlerTest method testPolygonGml2.
/**
* Test polygon geometries read from a GML 2 file
*
* @throws Exception if an error occurs
*/
@Test
public void testPolygonGml2() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml2.xsd").toURI(), getClass().getResource("/data/polygon/sample-polygon-gml2.xml").toURI());
// one instance expected
ResourceIterator<Instance> it = instances.iterator();
try {
// PolygonProperty 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.InstanceCollection in project hale by halestudio.
the class PolygonHandlerTest method testPolygonGml3_Grid.
/**
* Test polygon geometries read from a GML 3 file
*
* @throws Exception if an error occurs
*/
@Test
public void testPolygonGml3_Grid() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml3.xsd").toURI(), getClass().getResource("/data/polygon/sample-polygon-gml3.xml").toURI(), gridConfig);
// one instance expected
ResourceIterator<Instance> it = instances.iterator();
try {
// PolygonProperty with LinearRing 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.InstanceCollection in project hale by halestudio.
the class CompositeCurveGeometryTest method testCompositeCurveGml32.
/**
* Test composite curve geometries read from a GML 3.2 file
*
* @throws Exception if an error occurs
*/
@Test
public void testCompositeCurveGml32() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml32.xsd").toURI(), getClass().getResource("/data/curve/sample-compositecurve-gml32.xml").toURI());
// one instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 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.InstanceCollection in project hale by halestudio.
the class CompositeCurveGeometryTest method testCompositeCurveGml32_Grid.
/**
* Test composite curve geometries read from a GML 3.2 file. Geometry
* coordinates will be moved to universal grid
*
* @throws Exception if an error occurs
*/
@Test
public void testCompositeCurveGml32_Grid() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml32.xsd").toURI(), getClass().getResource("/data/curve/sample-compositecurve-gml32.xml").toURI(), gridConfig);
// one instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// segments with LineStringSegment defined through coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, gridChecker);
} finally {
it.close();
}
}
Aggregations