This class provides column types and extension methods to work with Geometry columns associated with an SRID in PostGIS.
This class provides column types and extension methods to work with Geometry columns associated with an SRID in PostGIS.
val PostGIS = new PostGisProjectionSupport(PostgresDriver) import PostGIS._ class City(tag: Tag) extends Table[(Int,String,Projected[Point])](tag, "cities") { def id = column[Int]("id", O.PrimaryKey, O.AutoInc) def name = column[String]("name") def geom = column[Projected[Point]]("geom") def * = (id, name, geom) }
A class which provides column types and extension methods for working with Geometry columns in PostGIS.
A class which provides column types and extension methods for working with Geometry columns in PostGIS.
val PostGIS = new PostGisSupport(PostgresDriver) import PostGIS._ class City(tag: Tag) extends Table[(Int,String,Point)](tag, "cities") { def id = column[Int]("id", O.PrimaryKey, O.AutoInc) def name = column[String]("name") def geom = column[Point]("geom") def * = (id, name, geom) }
A case class which represents Geometry with an SRID.
A case class which represents Geometry with an SRID.
import geotrellis.proj4._ val projected = Point(1,1).withSRID(4326) // LatLng, trust me val projected = projected.reproject(LatLng, WebMercator)(3857)
This exists because PostGIS requires an SRID to be stored with the Geometry and the decision has been made not to encapsulate SRID semantics in the Geometry hierarchy for the moment.
,It is up to the application developer to ensure that the SRID parameter stays semantically consistent.
Implicit conversion for geotrellis.vector.Geometry instances