Skip to content

Commit

Permalink
Let users implement their own VectorTileEncoder.clipGeometry.
Browse files Browse the repository at this point in the history
For use with GeoTools GeometryClipper or whatever.
  • Loading branch information
halset committed Sep 22, 2022
1 parent ea70985 commit a25e879
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/no/ecc/vectortile/VectorTileEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public class VectorTileEncoder {

private final double minimumArea;

private final Geometry clipGeometry;
protected final Geometry clipGeometry;

private final Envelope clipEnvelope;
protected final Envelope clipEnvelope;

private final PreparedGeometry clipGeometryPrepared;
protected final PreparedGeometry clipGeometryPrepared;

private final boolean autoScale;

Expand Down Expand Up @@ -223,7 +223,7 @@ public void addFeature(String layerName, Map<String, ?> attributes, Geometry geo
}

// no need to add empty geometry
if (geometry.isEmpty()) {
if (geometry == null || geometry.isEmpty()) {
return;
}

Expand Down

0 comments on commit a25e879

Please sign in to comment.