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

Public Member Functions

void testIsPolygonCWTrue ()
 
void testIsPolygonCWFalse ()
 

Static Public Attributes

static final String testPolygon ="POLYGON((1 2, 7 8, 5 6, 3 4, 1 2))"
 
static final String testPolygon2 ="POLYGON((1 2, 3 4, 5 6, 1 2))"
 

Member Function Documentation

◆ testIsPolygonCWFalse()

void testIsPolygonCWFalse ( )
30  {
31  IsPolygonCW instance=new IsPolygonCW();
32  ValueFactory valfac=SimpleValueFactory.getInstance();
33  Value geo=valfac.createLiteral(testPolygon, WKTDatatype.LiteralIRI);
34  Value result=instance.evaluate(valfac, geo);
35  Value expResult=valfac.createLiteral(false);
36  assertEquals(expResult, result);
37  }
static final String testPolygon
Definition: IsPolygonCWTest.java:15

References GeometricBinaryAttributeFunction.evaluate(), WKTDatatype.LiteralIRI, and IsPolygonCWTest.testPolygon.

◆ testIsPolygonCWTrue()

void testIsPolygonCWTrue ( )
20  {
21  IsPolygonCW instance=new IsPolygonCW();
22  ValueFactory valfac=SimpleValueFactory.getInstance();
23  Value geo=valfac.createLiteral(testPolygon, WKTDatatype.LiteralIRI);
24  Value result=instance.evaluate(valfac, geo);
25  Value expResult=valfac.createLiteral(true);
26  assertEquals(expResult, result);
27  }

References GeometricBinaryAttributeFunction.evaluate(), WKTDatatype.LiteralIRI, and IsPolygonCWTest.testPolygon.

Member Data Documentation

◆ testPolygon

final String testPolygon ="POLYGON((1 2, 7 8, 5 6, 3 4, 1 2))"
static

◆ testPolygon2

final String testPolygon2 ="POLYGON((1 2, 3 4, 5 6, 1 2))"
static