use of eu.esdihumboldt.hale.common.instance.model.Instance in project hale by halestudio.
the class PointHandlerTest method testPointGml31_Grid.
/**
* Test point geometries read from a GML 3.1 file.
*
* @throws Exception if an error occurs
*/
@Test
public void testPointGml31_Grid() throws Exception {
InstanceCollection instances = loadXMLInstances(getClass().getResource("/data/gml/geom-gml31.xsd").toURI(), getClass().getResource("/data/point/sample-point-gml31.xml").toURI(), gridConfig);
// three instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. PointProperty with Point defined through coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 2. PointProperty with Point defined through coord
assertTrue("Second sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 3. GeometryProperty with Point defined through coord
assertTrue("Third sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 4. PointProperty with Point defined through pos
assertTrue("Fourth sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 5. GeometryProperty with Point defined through pos
assertTrue("Fifth sample feature missing", it.hasNext());
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 PolygonHandlerTest method testPolygonGml31.
/**
* Test polygon geometries read from a GML 3.1 file
*
* @throws Exception if an error occurs
*/
@Test
public void testPolygonGml31() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml31.xsd").toURI(), getClass().getResource("/data/polygon/sample-polygon-gml31.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.Instance 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.Instance 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.Instance 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();
}
}
Aggregations