slick-pg
slick-pg copied to clipboard
st_distance_sphere geography/geometry mismatch
I am getting the error "ERROR: function st_distance_sphere(geography, geometry) does not exist" because my db column is a geography column and I am trying to call distanceSphere using makePoint in the same way that is done in the tests. Unfortunately, that creates a geometry object and I think the error is saying either both need to be geography or geometry, can anyone think of a simple workaround for this?
Interestingly, distance works
Yes, slick-pg
didn't have good support for geography
. It's majorly target to geometry
.
Is this still the case? If yes, is a pull request welcome?
+1 to geography support
Can you guys recommend any geography java sdk?
Currently vividsolutions jts
or locationtech jts
only support geometry
.
@tminglei I think there is a geotools module for jts that handles geographic types, I have not personally used it: https://docs.geotools.org/latest/javadocs/org/geotools/geometry/jts/JTS.html
@jdcohen220 seems not a good choice.
I finally self-made the geography types by extending jts geometry types, and added geography support . Can you guys help review and check it?
It's on a new branch geography
.
If it looks good, I'll merge it to branch master
.