return geometry.distance((com.vividsolutions.jts.geom.Geometry) other.unwrap());
}
@JSFunction
public Geometry buffer(double distance, NativeObject options) {
BufferParameters params = new BufferParameters();
if (options != null) {
Object segsObj = options.get("segs", options);
if (segsObj instanceof Integer) {
params.setQuadrantSegments((Integer) segsObj);
}
Object singleObj = options.get("single", options);
if (singleObj instanceof Boolean) {
params.setSingleSided((Boolean) singleObj);
}
Object capsObj = options.get("caps", options);
if (capsObj instanceof Integer) {
params.setEndCapStyle((Integer) capsObj);
}
}
com.vividsolutions.jts.geom.Geometry buffered = BufferOp.bufferOp(getGeometry(), distance, params);
Geometry wrapped = (Geometry) GeometryWrapper.wrap(getParentScope(), buffered);
if (projection != null) {