Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the projection’s precision also quantizes the output coordinates #1190

Closed
wants to merge 1 commit into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Dec 16, 2022

Not a fancy algorithm, just a toFixed transform before outputing the coordinates to the svg path. On a line, we remove consecutive duplicate points. The size of the test maps is shrunk by about half, which will also make them cheaper to download and share.
I didn't see a point in making a quantize precision option separated from the line sampling precision option—I don't think we would want rough lines with lots of digits, or precise lines with integer coordinates?

@Fil Fil requested a review from mbostock December 16, 2022 15:07
@Fil
Copy link
Contributor Author

Fil commented Dec 18, 2022

closes #1143

superseded by d3/d3-path#12

@Fil Fil closed this Dec 18, 2022
@Fil Fil deleted the fil/geo-quantize branch December 18, 2022 10:18
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.

1 participant