harsha2010 / magellan

Geo Spatial Data Analytics on Spark
Apache License 2.0
534 stars 149 forks source link

line intersect error: an implementation is missing #188

Open DeRooBert opened 6 years ago

DeRooBert commented 6 years ago

Hi, I'm trying to find if two lines intersect but it gives the following error: scala.NotImplementedError: an implementation is missing

This is a short code that reproduce the error I'm getting (using 1.0.5-s2.11) import magellan.{Point, Polygon, Line} import org.apache.spark.sql.magellan.dsl.expressions. import org.apache.spark.sql.types._ case class fence(line:magellan.Line, Fencename:String) val CP = fence(Line(Point(4.22220,51.35798),Point(4.24783,51.36902)),"CP") val PIZ = fence(Line(Point(4.33183,51.19521),Point(4.33805,51.19074)),"PIZ") val KEN = fence(Line(Point(4.357334,51.203966),Point(4.359198,51.200238)),"KEN") val fences = sc.parallelize(Seq(CP,PIZ,KEN)).toDF().cache

val fencesb = fences.withRenamedColumn("lineb", "line") fences.join(fencesb, $"line" intersects $"lineb", "inner").show

Charmatzis commented 6 years ago

Yes, this implementation is missing in this version. Stay tune for the next release.