Skip to content

Commit

Permalink
Merge pull request #300 from nremond/distance
Browse files Browse the repository at this point in the history
Keep access to the deprecated PostGIS functions
  • Loading branch information
tminglei authored Aug 29, 2016
2 parents 0491fad + 1174749 commit 49044d4
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ trait PgPostGISExtensions extends JdbcTypesComponent { driver: PostgresDriver =>
val Perimeter = new SqlFunction("ST_Perimeter")
val Distance = new SqlFunction("ST_Distance")
val DistanceSphere = new SqlFunction("ST_DistanceSphere")
val DistanceSphere0 = new SqlFunction("ST_Distance_Sphere")
val DistanceSpheroid = new SqlFunction("ST_DistanceSpheroid")
val DistanceSpheroid0 = new SqlFunction("ST_Distance_Spheroid")
val MaxDistance = new SqlFunction("ST_MaxDistance")
val HausdorffDistance = new SqlFunction("ST_HausdorffDistance")
val LongestLine = new SqlFunction("ST_LongestLine")
Expand Down Expand Up @@ -489,9 +491,17 @@ trait PgPostGISExtensions extends JdbcTypesComponent { driver: PostgresDriver =>
def distanceSphere[P2, R](geom: Rep[P2])(implicit om: o#to[Float, R]) = {
om.column(GeomLibrary.DistanceSphere, n, geom.toNode)
}
@deprecated(message = "Use to access old `ST_Distance_Sphere` function", since = "0.15")
def distanceSphere0[P2, R](geom: Rep[P2])(implicit om: o#to[Float, R]) = {
om.column(GeomLibrary.DistanceSphere0, n, geom.toNode)
}
def distanceSpheroid[P2, R](geom: Rep[P2])(implicit om: o#to[Float, R]) = {
om.column(GeomLibrary.DistanceSpheroid, n, geom.toNode)
}
@deprecated(message = "Use to access old `ST_Distance_Spheroid` function", since = "0.15")
def distanceSpheroid0[P2, R](geom: Rep[P2])(implicit om: o#to[Float, R]) = {
om.column(GeomLibrary.DistanceSpheroid0, n, geom.toNode)
}
def maxDistance[P2, R](geom: Rep[P2])(implicit om: o#to[Float, R]) = {
om.column(GeomLibrary.MaxDistance, n, geom.toNode)
}
Expand Down

0 comments on commit 49044d4

Please sign in to comment.