use of eu.esdihumboldt.hale.common.instance.model.InstanceCollection in project hale by halestudio.
the class MultiLineStringGeometryTest method testMultiLineStringGml2_Grid.
/**
* Test multi line string geometries read from a GML 2 file. Geometry
* coordinates will be moved to the universal grid
*
* @throws Exception if an error occurs
*/
@Test
public void testMultiLineStringGml2_Grid() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml2.xsd").toURI(), getClass().getResource("/data/linestring/sample-multilinestring-gml2.xml").toURI(), gridConfig);
// two instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. MultiLineStringProperty with MultiLineString defined through
// coord
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 2. MultiLineStringProperty with MultiLineString defined through
// coordinates
assertTrue("Second sample feature missing", it.hasNext());
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 MultiLineStringGeometryTest method testMultiLineStringGml31.
/**
* Test multi line string geometries read from a GML 2 file
*
* @throws Exception if an error occurs
*/
@Test
public void testMultiLineStringGml31() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml31.xsd").toURI(), getClass().getResource("/data/linestring/sample-multilinestring-gml31.xml").toURI());
// six instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. MultiLineStringProperty with MultiLineString defined through
// coord
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, checker);
// 2. MultiLineStringProperty with MultiLineString defined through
// coordinates
assertTrue("Second sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, checker);
// 3. MultiLineStringProperty with MultiLineString defined through
// pointRep
assertTrue("Third sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, checker);
// 4. MultiLineStringProperty with MultiLineString defined through
// pos
assertTrue("Fourth sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, checker);
// 5. MultiLineStringProperty with MultiLineString defined through
// pointProperty
assertTrue("Fifth sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, checker);
// 6. MultiLineStringProperty with MultiLineString defined through
// posList
assertTrue("Sixth sample feature missing", it.hasNext());
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 MultiPointGeometryTest method testMultiPointGml31.
/**
* Test multi point geometries read from a GML 31 file
*
* @throws Exception if an error occurs
*/
@Test
public void testMultiPointGml31() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml31.xsd").toURI(), getClass().getResource("/data/point/sample-multipoint-gml31.xml").toURI());
// four instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. MultiPointProperty with MultiPoint defined through pointMember
// - coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, checker);
// 2. MultiPointProperty with MultiPoint defined through pointMember
// - coordinates
assertTrue("Second sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, checker);
// 3. MultiPointProperty with MultiPoint defined through
// pointMembers - coord
assertTrue("Third sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, checker);
// 4. MultiPointProperty with MultiPoint defined through
// pointMembers - pos
assertTrue("Fourth sample feature missing", it.hasNext());
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 MultiPointGeometryTest method testMultiPointGml32_Grid.
/**
* Test multi point geometries read from a GML 32 file. Geometry coordinates
* will be moved to the universal grid
*
* @throws Exception if an error occurs
*/
@Test
public void testMultiPointGml32_Grid() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml32.xsd").toURI(), getClass().getResource("/data/point/sample-multipoint-gml32.xml").toURI(), gridConfig);
// three instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. MultiPointProperty with MultiPoint defined through pointMember
// - coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 2. MultiPointProperty with MultiPoint defined through pointMember
// - coordinates
assertTrue("Second sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 3. MultiPointProperty with MultiPoint defined through
// pointMembers - pos
assertTrue("Third sample feature missing", it.hasNext());
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 MultiPointGeometryTest method testMultiPointGml31_Grid.
/**
* Test multi point geometries read from a GML 31 file. Geometry coordinates
* will be moved to the universal grid
*
* @throws Exception if an error occurs
*/
@Test
public void testMultiPointGml31_Grid() throws Exception {
InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml31.xsd").toURI(), getClass().getResource("/data/point/sample-multipoint-gml31.xml").toURI(), gridConfig);
// four instances expected
ResourceIterator<Instance> it = instances.iterator();
try {
// 1. MultiPointProperty with MultiPoint defined through pointMember
// - coordinates
assertTrue("First sample feature missing", it.hasNext());
Instance instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 2. MultiPointProperty with MultiPoint defined through pointMember
// - coordinates
assertTrue("Second sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 3. MultiPointProperty with MultiPoint defined through
// pointMembers - coord
assertTrue("Third sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, gridChecker);
// 4. MultiPointProperty with MultiPoint defined through
// pointMembers - pos
assertTrue("Fourth sample feature missing", it.hasNext());
instance = it.next();
checkSingleGeometry(instance, gridChecker);
} finally {
it.close();
}
}
Aggregations