use of org.apache.jena.geosparql.implementation.GeometryWrapper in project jena by apache.
the class SfOverlapsFFTest method testRelate_multipoint_multipoint.
// Point-Point returns false. Have to compare two sets of points.
@Test
public void testRelate_multipoint_multipoint() throws FactoryException, MismatchedDimensionException, TransformException {
GeometryWrapper subjectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> MULTIPOINT(60 60, 20 20)", WKTDatatype.INSTANCE));
GeometryWrapper objectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> MULTIPOINT(60 60, 10 10)", WKTDatatype.INSTANCE));
SfOverlapsFF instance = new SfOverlapsFF();
Boolean expResult = true;
Boolean result = instance.relate(subjectGeometryWrapper, objectGeometryWrapper);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.GeometryWrapper in project jena by apache.
the class SfWithinFFTest method testRelate_polygon_polygon.
@Test
public void testRelate_polygon_polygon() throws FactoryException, MismatchedDimensionException, TransformException {
GeometryWrapper subjectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> POLYGON((145 30, 145 40, 160 40, 160 30, 145 30))", WKTDatatype.INSTANCE));
GeometryWrapper objectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> POLYGON((140 15, 140 45, 200 45, 200 15, 140 15))", WKTDatatype.INSTANCE));
SfWithinFF instance = new SfWithinFF();
Boolean expResult = true;
Boolean result = instance.relate(subjectGeometryWrapper, objectGeometryWrapper);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.GeometryWrapper in project jena by apache.
the class SfWithinFFTest method testRelate_polygon_point_false.
@Test
public void testRelate_polygon_point_false() throws FactoryException, MismatchedDimensionException, TransformException {
GeometryWrapper subjectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> POLYGON((30 40, 30 70, 90 70, 90 40, 30 40))", WKTDatatype.INSTANCE));
GeometryWrapper objectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> POINT(30 20)", WKTDatatype.INSTANCE));
SfWithinFF instance = new SfWithinFF();
Boolean expResult = false;
Boolean result = instance.relate(subjectGeometryWrapper, objectGeometryWrapper);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.GeometryWrapper in project jena by apache.
the class SfCrossesFFTest method testRelate_multipoint_linestring.
// Point-Linestring returns false. Have to compare with a set of points.
@Test
public void testRelate_multipoint_linestring() throws FactoryException, MismatchedDimensionException, TransformException {
GeometryWrapper subjectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> MULTIPOINT(90 60, 10 60)", WKTDatatype.INSTANCE));
GeometryWrapper objectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> LINESTRING(75 60, 145 60)", WKTDatatype.INSTANCE));
SfCrossesFF instance = new SfCrossesFF();
Boolean expResult = true;
Boolean result = instance.relate(subjectGeometryWrapper, objectGeometryWrapper);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.GeometryWrapper in project jena by apache.
the class SfCrossesFFTest method testRelate_multipoint_polygon.
// Point-Polygon returns false. Have to compare with a set of points.
@Test
public void testRelate_multipoint_polygon() throws FactoryException, MismatchedDimensionException, TransformException {
GeometryWrapper subjectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> MULTIPOINT(60 60, 20 20)", WKTDatatype.INSTANCE));
GeometryWrapper objectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> POLYGON((30 40, 30 70, 90 70, 90 40, 30 40))", WKTDatatype.INSTANCE));
SfCrossesFF instance = new SfCrossesFF();
Boolean expResult = true;
Boolean result = instance.relate(subjectGeometryWrapper, objectGeometryWrapper);
assertEquals(expResult, result);
}
Aggregations