org.geolatte.geom.LLAPositionVisitors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geolatte-geom Show documentation
Show all versions of geolatte-geom Show documentation
This geoLatte-geom library offers a geometry model that conforms to the OGC Simple Features for SQL
specification.
The newest version!
package org.geolatte.geom;
public class LLAPositionVisitors {
static public LLAPositionVisitor mkCombiningVisitor(PositionSequenceBuilder
builder){
return new CombiningVisitor<>(builder);
}
}
class CombiningVisitor
implements LLAPositionVisitor {
final PositionSequenceBuilder
builder;
CombiningVisitor(PositionSequenceBuilder
builder) {
this.builder = builder;
}
/**
* The visit method that is executed for each coordinate.
*
* @param coordinate the visited coordinate in array representation
*/
@Override
public void visit(double[] coordinate) {
this.builder.add(coordinate);
}
PositionSequence
result() {
return builder.toPositionSequence();
}
}