org.geolatte.geom.codec.Sfa110WktEncoder 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.codec;
import org.geolatte.geom.Geometry;
import org.geolatte.geom.Position;
/**
* A WKT encoder for the format specified in Simple Feature Access, version 1.1.0
*/
public class Sfa110WktEncoder implements WktEncoder {
@Override
public String encode(Geometry
geometry) {
return new Sfa110WktWriter().writeGeometry(geometry);
}
}
class Sfa110WktWriter extends BaseWktWriter {
public Sfa110WktWriter() {
super(Sfa110WktDialect.INSTANCE, new StringBuilder());
}
@Override
protected
void addMultiPointText(Geometry
geometry) {
addPointList(geometry.getPositions());
}
}