harsha2010 / magellan

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

withinCircle operators on BoundingBox #171

Closed ritesh-dineout closed 7 years ago

ritesh-dineout commented 7 years ago

It seems withinCircle function is added to BoundingBox 10 days ago. I believe it is not yet released. The latest released version 1.0.5 don't support withinCircle operation on BoundingBox.

https://github.com/harsha2010/magellan/blob/829860de0e78b8d8a8ea18f36283f217bf25c7a4/src/main/scala/magellan/BoundingBox.scala#L65

I have a need to use this function. Can this be released sometime soon ? or is there any alternate ?

I need to know whether a point on coordinate system in inside a given circle or outside.

harsha2010 commented 7 years ago

Can you build against the master branch? sbt/sbt clean spDist

And then use the function in spark SQL using; points.where($"point" withinRange( Point(0.0,0.0) , 5)) where 0.0,0.0 is the origin and 5 is the radius(customize this for your use case)

The function itself will be optimized even more in a further PR but should be good enough to use Let me know how it works for you

ritesh-dineout commented 7 years ago

@harsha2010 Yes I can build it against the master or I can use scala implicits to add the custom function.

The purpose for this issue is to understand the roadmap of this project and the expected release of next version.

Thanks.