use of org.apache.jena.geosparql.implementation.GeometryWrapper in project jena by apache.
the class SfOverlapsFFTest method testRelate_linestring_linestring.
@Test
public void testRelate_linestring_linestring() throws FactoryException, MismatchedDimensionException, TransformException {
GeometryWrapper subjectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> LINESTRING(80 20, 80 50)", WKTDatatype.INSTANCE));
GeometryWrapper objectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> LINESTRING(80 85, 80 30)", 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 RccTangentialProperPartFFTest method testRelate_polygon_polygon.
// Only 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((30 40, 30 48, 45 48, 45 40, 30 40))", 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));
RccTangentialProperPartFF instance = new RccTangentialProperPartFF();
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 RccTangentialProperPartFFTest method testRelate_polygon_polygon_false.
@Test
public void testRelate_polygon_polygon_false() throws FactoryException, MismatchedDimensionException, TransformException {
GeometryWrapper subjectGeometryWrapper = GeometryWrapper.extract(ResourceFactory.createTypedLiteral("<http://www.opengis.net/def/crs/EPSG/0/27700> POLYGON((80 15, 80 45, 140 45, 140 15, 80 15))", 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));
RccTangentialProperPartFF instance = new RccTangentialProperPartFF();
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 SfContainsFFTest 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((140 15, 140 45, 200 45, 200 15, 140 15))", WKTDatatype.INSTANCE));
GeometryWrapper objectGeometryWrapper = 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));
SfContainsFF instance = new SfContainsFF();
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 SfContainsFFTest method testRelate_polygon_polygon_false.
@Test
public void testRelate_polygon_polygon_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> POLYGON((140 15, 140 45, 200 45, 200 15, 140 15))", WKTDatatype.INSTANCE));
SfContainsFF instance = new SfContainsFF();
Boolean expResult = false;
Boolean result = instance.relate(subjectGeometryWrapper, objectGeometryWrapper);
assertEquals(expResult, result);
}
Aggregations