Skip to content

Conversation

@metaxasa
Copy link
Contributor

This pull request improves the handling and testing of LineString features in the MVT encoding logic. The main change ensures that LineString features are only encoded if they contain at least two points, and that all points are used in the encoding process. New tests have been added to verify this behavior.

LineString encoding improvements

  • Updated mvtAddFeature in internal/server/mvt.go to only encode LineString features with two or more points, and fixed a bug where only the first point was used in the loop instead of all points.

Testing enhancements

  • Added new tests in internal/server/mvt_test.go to verify that LineString features are encoded using all points, and that LineStrings with fewer than two points do not produce geometry commands.

@tidwall tidwall merged commit 7d1b0d4 into tidwall:master Dec 11, 2025
1 check passed
@tidwall
Copy link
Owner

tidwall commented Dec 11, 2025

Thanks!

@metaxasa metaxasa deleted the fix-linestring-mvt branch December 12, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants