Search in sources :

Example 1 with ReaderConfiguration

use of eu.esdihumboldt.hale.io.gml.geometry.handler.internal.ReaderConfiguration in project hale by halestudio.

the class EnvelopeHandlerTest method testEnvelopeGml3_Grid.

/**
 * Test envelope geometries read from a GML 3 file
 *
 * @throws Exception if an error occurs
 */
@Test
public void testEnvelopeGml3_Grid() throws Exception {
    ReaderConfiguration config = InterpolationConfigurations.ALL_TO_GRID_DEFAULT;
    InstanceCollection instances = AbstractHandlerTest.loadXMLInstances(getClass().getResource("/data/gml/geom-gml3.xsd").toURI(), getClass().getResource("/data/envelope/sample-envelope-gml3.xml").toURI(), config);
    // one instances expected
    ResourceIterator<Instance> it = instances.iterator();
    try {
        // 1. EnvelopeProperty defined through pos
        assertTrue("First sample feature missing", it.hasNext());
        Instance instance = it.next();
        checkSingleGeometry(instance, combine(referenceChecker(reference, InterpolationHelper.DEFAULT_MAX_POSITION_ERROR), config.geometryChecker()));
    } finally {
        it.close();
    }
}
Also used : ReaderConfiguration(eu.esdihumboldt.hale.io.gml.geometry.handler.internal.ReaderConfiguration) Instance(eu.esdihumboldt.hale.common.instance.model.Instance) InstanceCollection(eu.esdihumboldt.hale.common.instance.model.InstanceCollection) Test(org.junit.Test) AbstractHandlerTest(eu.esdihumboldt.hale.io.gml.geometry.handler.internal.AbstractHandlerTest)

Aggregations

Instance (eu.esdihumboldt.hale.common.instance.model.Instance)1 InstanceCollection (eu.esdihumboldt.hale.common.instance.model.InstanceCollection)1 AbstractHandlerTest (eu.esdihumboldt.hale.io.gml.geometry.handler.internal.AbstractHandlerTest)1 ReaderConfiguration (eu.esdihumboldt.hale.io.gml.geometry.handler.internal.ReaderConfiguration)1 Test (org.junit.Test)1