But why design Point so that you have to do:
`Point point = new Point.Builder() .latitude(25.2012544) .longitude(55.2569389) .build();`
Instead of:
`Point point = new Point(25.2012544,55.2569389)`
Cool project btw... working with geospatial data can be fun.
I personally like static methods.
Point point = Point.fromLonLat(55.25…, 25.20…);
The builder pattern is useful to set defaults and add features without breaking backward compatibility.
Ah, that is interesting. Did not think about that.
Although agreed it's used when you start to get to more parameters. I didn't check but it's possible there are a lot of null/default values like projection or something.
In creating a Point, neither value is optional, so I would question the value versus the additional complexity in this case.
`kdTree.findNearestNeighbor(point, 2);` does this return
1. A list of ALL points that match the distance predicate?
2. Are they sorted by distance to the target?
3. Is it possible to cap to only the closest N points?
I would like to have your input and have the better understanding of what you are looking for as well.