use of eu.esdihumboldt.hale.common.core.io.report.IOReport in project hale by halestudio.
the class StreamGmlWriterTest method testGeometryPrimitive_32_MultiPolygon_WindingOrder_CW.
/**
* Test writing a {@link MultiPolygon} to a GML 3.2 geometry primitive type
* with Winding Order in ClockWise
*
* @throws Exception if an error occurs
*/
@Test
public void testGeometryPrimitive_32_MultiPolygon_WindingOrder_CW() throws Exception {
// create the geometry
MultiPolygon mp = geomFactory.createMultiPolygon(new Polygon[] { createPolygon(0.0), createPolygon(1.0), createPolygon(-1.0) });
Map<List<QName>, Object> values = new HashMap<List<QName>, Object>();
// $NON-NLS-1$
values.put(GEOMETRY_PROPERTY, mp);
IOReport report = fillFeatureTest(// $NON-NLS-1$
"AggregateTest", // $NON-NLS-1$
getClass().getResource("/data/geom_schema/geom-gml32.xsd").toURI(), // $NON-NLS-1$
values, // $NON-NLS-1$
"geometryPrimitive_32_MultiPolygon", // $NON-NLS-1$
DEF_SRS_NAME, false, false, EnumWindingOrderTypes.clockwise);
// $NON-NLS-1$
assertTrue("Expected GML output to be valid", report.isSuccess());
}
use of eu.esdihumboldt.hale.common.core.io.report.IOReport in project hale by halestudio.
the class StreamGmlWriterTest method testGeometryPrimitive_32_Point.
/**
* Test writing a {@link Point} to a GML 3.2 geometry primitive type
*
* @throws Exception if an error occurs
*/
@Test
public void testGeometryPrimitive_32_Point() throws Exception {
// create the geometry
Point point = createPoint(10.0);
Map<List<QName>, Object> values = new HashMap<List<QName>, Object>();
// $NON-NLS-1$
values.put(GEOMETRY_PROPERTY, point);
IOReport report = fillFeatureTest(// $NON-NLS-1$
"PrimitiveTest", // $NON-NLS-1$
getClass().getResource("/data/geom_schema/geom-gml32.xsd").toURI(), values, "geometryPrimitive_32_Point", // $NON-NLS-1$
DEF_SRS_NAME);
// $NON-NLS-1$
assertTrue("Expected GML output to be valid", report.isSuccess());
}
use of eu.esdihumboldt.hale.common.core.io.report.IOReport in project hale by halestudio.
the class StreamGmlWriterTest method testGeometry_2_MultiPolygon.
/**
* Test writing a {@link MultiPolygon} to a GML 2 geometry type
*
* @throws Exception if an error occurs
*/
@Ignore
// GML 2 stuff currently not working (because of unrelated schemas)
@Test
public void testGeometry_2_MultiPolygon() throws Exception {
// create the geometry
MultiPolygon mp = geomFactory.createMultiPolygon(new Polygon[] { createPolygon(0.0), createPolygon(1.0), createPolygon(-1.0) });
Map<List<QName>, Object> values = new HashMap<List<QName>, Object>();
// $NON-NLS-1$
values.put(GEOMETRY_PROPERTY, mp);
IOReport report = fillFeatureTest(// $NON-NLS-1$
"Test", // $NON-NLS-1$
getClass().getResource("/data/geom_schema/geom-gml2.xsd").toURI(), values, "geometry_2_MultiPolygon", // $NON-NLS-1$
DEF_SRS_NAME);
// $NON-NLS-1$
assertTrue("Expected GML output to be valid", report.isSuccess());
}
use of eu.esdihumboldt.hale.common.core.io.report.IOReport in project hale by halestudio.
the class StreamGmlWriterTest method testGeometryAggregate_32_MultiLineString.
/**
* Test writing a {@link MultiLineString} to a GML 3.2 geometry aggregate
* type
*
* @throws Exception if an error occurs
*/
@Test
public void testGeometryAggregate_32_MultiLineString() throws Exception {
// create the geometry
MultiLineString mls = geomFactory.createMultiLineString(new LineString[] { createLineString(0.0), createLineString(1.0), createLineString(2.0) });
Map<List<QName>, Object> values = new HashMap<List<QName>, Object>();
// $NON-NLS-1$
values.put(GEOMETRY_PROPERTY, mls);
IOReport report = fillFeatureTest(// $NON-NLS-1$
"AggregateTest", // $NON-NLS-1$
getClass().getResource("/data/geom_schema/geom-gml32.xsd").toURI(), // $NON-NLS-1$
values, // $NON-NLS-1$
"geometryAggregate_32_MultiLineString", // $NON-NLS-1$
DEF_SRS_NAME, true, false);
// $NON-NLS-1$
assertTrue("Expected GML output to be valid", report.isSuccess());
}
use of eu.esdihumboldt.hale.common.core.io.report.IOReport in project hale by halestudio.
the class StreamGmlWriterTest method testGeometryAggregate_32_LineString.
/**
* Test writing a {@link LineString} to a GML 3.2 geometry aggregate type
*
* @throws Exception if an error occurs
*/
@Test
public void testGeometryAggregate_32_LineString() throws Exception {
// create the geometry
LineString lineString = createLineString(0.0);
Map<List<QName>, Object> values = new HashMap<List<QName>, Object>();
// $NON-NLS-1$
values.put(GEOMETRY_PROPERTY, lineString);
IOReport report = fillFeatureTest(// $NON-NLS-1$
"AggregateTest", // $NON-NLS-1$
getClass().getResource("/data/geom_schema/geom-gml32.xsd").toURI(), // $NON-NLS-1$
values, // $NON-NLS-1$
"geometryAggregate_32_LineString", // $NON-NLS-1$
DEF_SRS_NAME, true, false);
// $NON-NLS-1$
assertTrue("Expected GML output to be valid", report.isSuccess());
}
Aggregations