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

Public Member Functions

void testEnsureClosed ()
 
void testEnsureClosed2 ()
 

Static Public Attributes

static final String duplicateRings ="POLYGON((8 2, 11 13, 2 6, 8 2), (8 2, 11 13, 2 6, 8 2))"
 
static final String nonClosed ="LINESTRING(8 2, 11 13, 2 6)"
 
static final String closed ="LINESTRING (8 2, 11 13, 2 6, 8 2)"
 
static final String ring ="LINEARRING (8 2, 11 13, 2 6, 8 2)"
 

Member Function Documentation

◆ testEnsureClosed()

void testEnsureClosed ( )
24  {
25  EnsureClosed instance=new EnsureClosed();
26  ValueFactory valfac=SimpleValueFactory.getInstance();
27  Value geo=valfac.createLiteral(nonClosed, WKTDatatype.LiteralIRI);
28  Value result=instance.evaluate(valfac, geo,valfac.createLiteral(0.));
29  Value expResult=valfac.createLiteral(closed, WKTDatatype.LiteralIRI);
30  assertEquals(expResult, result);
31  }
static final String closed
Definition: EnsureClosedTest.java:19
static final String nonClosed
Definition: EnsureClosedTest.java:17

References EnsureClosedTest.closed, GeometricModifierDoubleFunction.evaluate(), WKTDatatype.LiteralIRI, and EnsureClosedTest.nonClosed.

◆ testEnsureClosed2()

void testEnsureClosed2 ( )
34  {
35  EnsureClosed instance=new EnsureClosed();
36  ValueFactory valfac=SimpleValueFactory.getInstance();
37  Value geo=valfac.createLiteral(closed, WKTDatatype.LiteralIRI);
38  Value result=instance.evaluate(valfac, geo,valfac.createLiteral(0.));
39  Value expResult=valfac.createLiteral(closed, WKTDatatype.LiteralIRI);
40  assertEquals(expResult, result);
41  }

References EnsureClosedTest.closed, GeometricModifierDoubleFunction.evaluate(), and WKTDatatype.LiteralIRI.

Member Data Documentation

◆ closed

final String closed ="LINESTRING (8 2, 11 13, 2 6, 8 2)"
static

◆ duplicateRings

final String duplicateRings ="POLYGON((8 2, 11 13, 2 6, 8 2), (8 2, 11 13, 2 6, 8 2))"
static

◆ nonClosed

final String nonClosed ="LINESTRING(8 2, 11 13, 2 6)"
static

◆ ring

final String ring ="LINEARRING (8 2, 11 13, 2 6, 8 2)"
static