Skip to content

Commit

Permalink
Add support for locationtech's JTS library - supplement
Browse files Browse the repository at this point in the history
  • Loading branch information
tminglei committed Jan 29, 2019
1 parent 9922596 commit ca83b6a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.github.tminglei.slickpg

import java.sql.{PreparedStatement, ResultSet}

import com.locationtech.jts.geom._
import com.locationtech.jts.io.{WKBReader, WKBWriter, WKTReader, WKTWriter}
import org.locationtech.jts.geom._
import org.locationtech.jts.io.{WKBReader, WKBWriter, WKTReader, WKTWriter}
import slick.ast.FieldSymbol
import slick.jdbc._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.github.tminglei.slickpg

import java.util.concurrent.Executors

import com.locationtech.jts.geom.{Geometry, Point}
import com.locationtech.jts.io.{WKBWriter, WKTReader, WKTWriter}
import org.locationtech.jts.geom.{Geometry, Point}
import org.locationtech.jts.io.{WKBWriter, WKTReader, WKTWriter}
import org.scalatest.FunSuite
import slick.jdbc.{GetResult, PostgresProfile}

Expand Down Expand Up @@ -55,7 +55,7 @@ class PgPostGISSupportSuite extends FunSuite {
val wktWriter = new WKTWriter()
val wkbWriter = new WKBWriter(2, true)

test("PostGIS Lifted support - constructor") {
test("PostGIS (lt) Lifted support - constructor") {
val POINT = "POINT(-71.064544 42.28787)"
val point = wktReader.read(POINT).asInstanceOf[Point]
val point1 = wktReader.read("POINT(-81.064544 32.28787)").asInstanceOf[Point]
Expand Down Expand Up @@ -142,7 +142,7 @@ class PgPostGISSupportSuite extends FunSuite {
), Duration.Inf)
}

test("PostGIS Lifted support - operator") {
test("PostGIS (lt) Lifted support - operator") {
val line1 = wktReader.read("LINESTRING(0 0, 3 3)")
val line2 = wktReader.read("LINESTRING(1 2, 4 6)")
val line3 = wktReader.read("LINESTRING(1 1, 2 2)")
Expand Down Expand Up @@ -241,7 +241,7 @@ class PgPostGISSupportSuite extends FunSuite {
), Duration.Inf)
}

test("PostGIS Lifted support - accessor") {
test("PostGIS (lt) Lifted support - accessor") {
val point = wktReader.read("POINT(4 5 7)")
val line = wktReader.read("LINESTRING(0 0, 3 3)")
val polygon = wktReader.read("POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))")
Expand Down Expand Up @@ -374,7 +374,7 @@ class PgPostGISSupportSuite extends FunSuite {
), Duration.Inf)
}

test("PostGIS Lifted support - output") {
test("PostGIS (lt) Lifted support - output") {
val POLYGON = "POLYGON((0 0,0 1,1 1,1 0,0 0))"
val polygon = wktReader.read(POLYGON)
val POLYGON_EWKT = POLYGON // not "SRID=0;POLYGON((0 0,0 1,1 1,1 0,0 0))"
Expand Down Expand Up @@ -445,7 +445,7 @@ class PgPostGISSupportSuite extends FunSuite {
), Duration.Inf)
}

test("PostGIS Lifted support - relationship") {
test("PostGIS (lt) Lifted support - relationship") {
val polygon = wktReader.read("POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))")
val multiPoints = wktReader.read("MULTIPOINT(125 100, 125 101)")
val point = wktReader.read("POINT(175 150)")
Expand Down Expand Up @@ -529,7 +529,7 @@ class PgPostGISSupportSuite extends FunSuite {
), Duration.Inf)
}

test("PostGIS Lifted support - measure") {
test("PostGIS (lt) Lifted support - measure") {
val point1 = wktReader.read("POINT(25 45)").asInstanceOf[Point]
val point2 = wktReader.read("POINT(75 100)").asInstanceOf[Point]
val point3 = wktReader.read("POINT(-75 80)").asInstanceOf[Point]
Expand Down Expand Up @@ -627,7 +627,7 @@ class PgPostGISSupportSuite extends FunSuite {
), Duration.Inf)
}

test("PostGIS Lifted support - processing") {
test("PostGIS (lt) Lifted support - processing") {
val point = wktReader.read("POINT(-123.365556 48.428611)")
val point1 = wktReader.read("POINT(3 1)")
val line = wktReader.read("LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2 1)")
Expand Down Expand Up @@ -744,7 +744,7 @@ class PgPostGISSupportSuite extends FunSuite {
), Duration.Inf)
}

test("PostGIS Plain SQL support") {
test("PostGIS (lt) Plain SQL support") {
import MyPostgresProfile.plainAPI._

implicit val GetPointBeanResult = GetResult(r => PointBean(r.nextLong, r.nextGeometry[Point]))
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ lazy val slickPgProject = Project(id = "slick-pg", base = file("."),
libraryDependencies := mainDependencies(scalaVersion.value)
)
).dependsOn (slickPgCore)
.aggregate (slickPgCore, slickPgJoda, slickPgJson4s, slickPgJts, slickPgPlayJson, slickPgSprayJson, slickPgCirceJson, slickPgArgonaut, slickPgJawn)
.aggregate (slickPgCore, slickPgJoda, slickPgJson4s, slickPgJts, slickPgJtsLt, slickPgPlayJson, slickPgSprayJson, slickPgCirceJson, slickPgArgonaut, slickPgJawn)

lazy val slickPgJoda = Project(id = "slick-pg_joda-time", base = file("./addons/joda-time"),
settings = Defaults.coreDefaultSettings ++ commonSettings ++ Seq(
Expand Down

0 comments on commit ca83b6a

Please sign in to comment.