Repository navigation
Easy Importing for the Vector Package - #2885
Conversation
1ef6cd7 to
ecd235d
Compare
| import geotrellis.vector.io.wkb.WKB | ||
| import geotrellis.vector.io.wkt.WKT | ||
|
|
||
| package object io extends io.json.Implicits |
There was a problem hiding this comment.
These extensions have to be removed, because other wise if you do something like this:
import geotrellis.vector._
import geotrellis.vector.io._The compiler will throw an error about not being able to find an implicit.
| /** The algorithms herein are all implemented in JTS, but the wrapper methods | ||
| * here make it straightforward to call them with geotrellis.vector classes. | ||
| */ | ||
| implicit class withAnyGeometryMethods[G <: Geometry](val self: G) extends MethodExtensions[G] |
There was a problem hiding this comment.
I moved this up just so it's easier to see what implicits will be in scope when importing geotrellis.vector._
|
I'd personally like to see a wholesale renaming of import geotrellis.vector._
import io.circe._Instead, this must be done: import geotrellis.vector._
import _root_.io.circe._ |
|
@moradology Is there an alternative name for |
|
Not sure, I think that naming conflict is bad but I'd suggest dealing with that rename last or in different PR. |
|
@jbouffard Part of the sugar in cats imports seems to be to bring important types to the root level with a I know that I often end up reaching for |
|
@echeipesh That makes sense. I think the renaming is something we should probably discuss as a group. So I'll hold off on renaming until later. Yeah, I think |
|
|
ba107a9 to
5de0eda
Compare
…mport in the vector package Signed-off-by: Jacob Bouffard <[email protected]> Cleaned up DissolveMethodsSpec Signed-off-by: Jacob Bouffard <[email protected]> Added the WKT and WKB vals to vector.package Signed-off-by: Jacob Bouffard <[email protected]> Fixed the imports in the code in the slick package Signed-off-by: Jacob Bouffard <[email protected]> Fixed the imports in the spark tests Signed-off-by: Jacob Bouffard <[email protected]> Removed WKT and WKB from the vector package Signed-off-by: Jacob Bouffard <[email protected]>
f112577 to
14ea52f
Compare
Overview
This PR simplifies the imports needed to use certain functionality in the
geotrellis.vectorpackage. Mainly,vector.io.wkb.Implicits,vector.io.wkt.implicits, andvector.io.json.Implicitsare now all imported withimport geotrellis.vector._.Checklist
docs/CHANGELOG.rstupdated, if necessarydocsguides update, if necessaryDemo
Before:
After: