Skip to content

Commit

Permalink
Make geotrellis.vector.prepared Serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
James McClain authored and echeipesh committed Oct 6, 2017
1 parent d612708 commit 747e0c3
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -24,7 +24,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory
* performance enhancements to operations over those geometries. See Chris Bennight's
* [[https://github.com/chrisbennight/intersection-test writeup and benchmarks]] for more.
*/
case class PreparedGeometry[G <: Geometry](val geom: Geometry) {
case class PreparedGeometry[G <: Geometry](val geom: Geometry) extends Serializable {
private val prepared = PreparedGeometry.factory.create(geom.jtsGeom)
def contains(that: Geometry): Boolean =
prepared.contains(that.jtsGeom)
Expand Down Expand Up @@ -59,6 +59,6 @@ case class PreparedGeometry[G <: Geometry](val geom: Geometry) {

/** Companion object to [[PreparedGeometry]] */
object PreparedGeometry {
private val factory = new PreparedGeometryFactory
private val factory = new PreparedGeometryFactory
}

0 comments on commit 747e0c3

Please sign in to comment.