// take into account the meta buffer to try and clip all geometries by the same
// amount
double clipBuffer = Math.max(size / 2, metaBuffer) + 10;
Envelope env = new Envelope(screenSize.getMinX(), screenSize.getMaxX(), screenSize.getMinY(), screenSize.getMaxY());
env.expandBy(clipBuffer);
final GeometryClipper clipper = new GeometryClipper(env);
Geometry g = clipper.clip(shape.getGeometry(), false);
if(g == null) {
continue;
}
if(g != shape.getGeometry()) {
shape = new LiteShape2(g, null, null, false);