Skip to content

Commit

Permalink
Manage empty geometry with ShapefileWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed May 21, 2024
1 parent 1705d2f commit 07bdee0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public void writeGeometry(Geometry g) throws IOException {
shapeBuffer.putInt(++cnt);
shapeBuffer.putInt(length);
shapeBuffer.order(ByteOrder.LITTLE_ENDIAN);
if (g == null) {
if (g == null || g.isEmpty()) {
shapeBuffer.putInt(0);
} else {
shapeBuffer.putInt(type.id);
Expand Down

0 comments on commit 07bdee0

Please sign in to comment.