rdf4j-postgis  Version 0.1.0.0
SelfIntersectionsTest Class Reference
Collaboration diagram for SelfIntersectionsTest:

Public Member Functions

void testSelfIntersections ()
 
void testNoSelfIntersections ()
 

Static Public Attributes

static final String testGeom ="LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)"
 
static final String testGeom2 ="LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31)"
 
static final String intersectResult ="MULTIPOINT ((77.29 29.07))"
 
static final String intersectResult2 ="MULTIPOINT EMPTY"
 

Member Function Documentation

◆ testNoSelfIntersections()

void testNoSelfIntersections ( )
34  {
35  SelfIntersections instance=new SelfIntersections();
36  ValueFactory valfac=SimpleValueFactory.getInstance();
37  Value geo=valfac.createLiteral(testGeom2, WKTDatatype.LiteralIRI);
38  Value result=instance.evaluate(valfac, geo);
39  Value expResult=valfac.createLiteral(intersectResult2, WKTDatatype.LiteralIRI);
40  assertEquals(expResult, result);
41  }
static final String testGeom2
Definition: SelfIntersectionsTest.java:17
static final String intersectResult2
Definition: SelfIntersectionsTest.java:21

References GeometricUnaryFunction.evaluate(), SelfIntersectionsTest.intersectResult2, WKTDatatype.LiteralIRI, and SelfIntersectionsTest.testGeom2.

◆ testSelfIntersections()

void testSelfIntersections ( )
24  {
25  SelfIntersections instance=new SelfIntersections();
26  ValueFactory valfac=SimpleValueFactory.getInstance();
27  Value geo=valfac.createLiteral(testGeom, WKTDatatype.LiteralIRI);
28  Value result=instance.evaluate(valfac, geo);
29  Value expResult=valfac.createLiteral(intersectResult, WKTDatatype.LiteralIRI);
30  assertEquals(expResult, result);
31  }
static final String testGeom
Definition: SelfIntersectionsTest.java:15
static final String intersectResult
Definition: SelfIntersectionsTest.java:19

References GeometricUnaryFunction.evaluate(), SelfIntersectionsTest.intersectResult, WKTDatatype.LiteralIRI, and SelfIntersectionsTest.testGeom.

Member Data Documentation

◆ intersectResult

final String intersectResult ="MULTIPOINT ((77.29 29.07))"
static

◆ intersectResult2

final String intersectResult2 ="MULTIPOINT EMPTY"
static

◆ testGeom

final String testGeom ="LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)"
static

◆ testGeom2

final String testGeom2 ="LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31)"
static