Skip to content

Commit

Permalink
Follow up on PostGIS deprecation (ST_Distance_Sphere->ST_DistanceSphe…
Browse files Browse the repository at this point in the history
…re) and add the missing ST_DistanceSpheroid function
  • Loading branch information
nremond committed Aug 26, 2016
1 parent 23a3f41 commit 6859e0f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ trait PgPostGISExtensions extends JdbcTypesComponent { driver: PostgresDriver =>
val Length3D = new SqlFunction("ST_3DLength")
val Perimeter = new SqlFunction("ST_Perimeter")
val Distance = new SqlFunction("ST_Distance")
val DistanceSphere = new SqlFunction("ST_Distance_Sphere")
val DistanceSphere = new SqlFunction("ST_DistanceSphere")
val DistanceSpheroid = new SqlFunction("ST_DistanceSpheroid")
val MaxDistance = new SqlFunction("ST_MaxDistance")
val HausdorffDistance = new SqlFunction("ST_HausdorffDistance")
val LongestLine = new SqlFunction("ST_LongestLine")
Expand Down Expand Up @@ -488,6 +489,9 @@ 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)
}
def distanceSpheroid[P2, R](geom: Rep[P2])(implicit om: o#to[Float, R]) = {
om.column(GeomLibrary.DistanceSpheroid, 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 6859e0f

Please sign in to comment.