diff --git a/src/NetTopologySuite.IO.VectorTiles.Mapbox/MapboxTileWriter.cs b/src/NetTopologySuite.IO.VectorTiles.Mapbox/MapboxTileWriter.cs index ba008aa..5de26a3 100644 --- a/src/NetTopologySuite.IO.VectorTiles.Mapbox/MapboxTileWriter.cs +++ b/src/NetTopologySuite.IO.VectorTiles.Mapbox/MapboxTileWriter.cs @@ -349,6 +349,11 @@ private static void EncodeTo(List destination, CoordinateSequence sequence if (count == 0) return; + // In case we decide to ditch encoded data, we must reset currentX and currentY + // or subsequent geometry items will not be positioned correctly. + int initialCurrentX = currentX; + int initialCurrentY = currentY; + // if we have a ring we need to check orientation if (ring) {