Skip to content

Commit

Permalink
TEIID-4828 fixing geojson issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Mar 30, 2017
1 parent 8a883ea commit b16ebca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions engine/src/test/java/org/teiid/query/processor/TestGeometry.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,4 +417,16 @@ public void testGmlParseSrid() throws Exception {
assertNull(Evaluator.evaluate(ex));
}


@Test public void testGeoJson() throws Exception {
Expression ex = TestFunctionResolving.getExpression("ST_AsText(ST_GeomFromGeoJson(ST_AsGeoJSON(ST_GeomFromText('MULTIPOINT ((10 40), (40 30), (20 20), (30 10))'))))");
assertEquals("MULTIPOINT ((10 40), (40 30), (20 20), (30 10))", ClobType.getString((ClobType)Evaluator.evaluate(ex)));

ex = TestFunctionResolving.getExpression("ST_AsText(ST_GeomFromGeoJson(ST_AsGeoJSON(ST_GeomFromText('MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))'))))");
assertEquals("MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))", ClobType.getString((ClobType)Evaluator.evaluate(ex)));

ex = TestFunctionResolving.getExpression("ST_AsText(ST_GeomFromGeoJson(ST_AsGeoJSON(ST_GeomFromText('LINESTRING (30 10, 10 30, 40 40)'))))");
assertEquals("LINESTRING (30 10, 10 30, 40 40)", ClobType.getString((ClobType)Evaluator.evaluate(ex)));
}

}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<version.org.apache.olingo>4.2.0-teiid-5</version.org.apache.olingo>
<version.org.eclipse.jetty>9.2.7.v20150116</version.org.eclipse.jetty>
<version.commons-codec>1.9</version.commons-codec>
<version.com.fasterxml.jackson.core>2.4.2</version.com.fasterxml.jackson.core>
<version.com.fasterxml.jackson.core>2.5.4</version.com.fasterxml.jackson.core>
<version.com.fasterxml.jackson.swagger>2.4.5</version.com.fasterxml.jackson.swagger>
<version.com.fasterxml.aalto-xml>0.9.10</version.com.fasterxml.aalto-xml>
<!-- <version.org.reflections>0.9.9</version.org.reflections> -->
Expand All @@ -72,7 +72,7 @@
<version.com.facebook.presto>0.89</version.com.facebook.presto>
<version.net.oauth.core>20100527</version.net.oauth.core>
<version.jts>1.13</version.jts>
<version.jts2geojson>0.7.0</version.jts2geojson>
<version.jts2geojson>0.8.0</version.jts2geojson>
<version.proj4j>0.1.0</version.proj4j>

<version.swagger-jaxrs>1.5.2</version.swagger-jaxrs>
Expand Down

0 comments on commit b16ebca

Please sign in to comment.