Skip to content

Commit

Permalink
Merge pull request #298 from nremond/distance
Browse files Browse the repository at this point in the history
Follow up on PostGIS deprecation and add missing function mapping
  • Loading branch information
tminglei authored Aug 28, 2016
2 parents 23a3f41 + 6859e0f commit 0491fad
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 0491fad

Please sign in to comment.