|
|
|
SpatialContext has two methods: {{ onDefaultCoordinates() }} and {{ onCoordinates(String) }} , the first one makes it easy for simple cases .
, but {{ DistanceSortField }} constructors must know the spatial field name (you can't create one for the default coordinates) --> . I suggest to add {{ DistanceSortField(Point) }} and {{ DistanceSortField(double, double) }} which act on default coordinates
same .
Same for {{ FullTextQuery.setSpatialParameters(Point, String) }} and {{ FullTextQuery.setSpatialParameters(double, double, String) --> there }}. There should be {{ FullTextQuery.setSpatialParameters(Point) }} and {{ FullTextQuery.setSpatialParameters(double, double)
}}.
I would like to reuse distance computation in my own code: if my entity implements {{ Coordinates }} and I have a {{ Point }} origin, I would like to be able to call {{ origin.getDistanceTo(myEntity) }} but {{ Point.getDistanceTo() }} takes a {{ Point }} , not a {{ Coordinates }} . --> I suggest to change {{ Point.getDistanceTo(Point other) }} to {{ Point.getDistanceTo(Coordinates other) }}.
|
|
|
|