-
Notifications
You must be signed in to change notification settings - Fork 15
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
Is it helpful in D3 to simplify the precision of svg coordinates? #59
Comments
It's helpful on the data preparation side, for sure, and we're already doing it there. These values are post-projection, so the utility is in rendering rather than file size, but cleaner rendering also makes for sharper edges sometimes. I'm not sure whether there's a performance effect in this case, and sharper edges may not be relevant for geospatial polygons, but I'd like to know more. If we decide it's worth doing, I know that some d3 scales do offer |
Ok - good to know. I understand the point about rendering sharpness, but |
Oh, I meant it can be sharper with fewer digits, not more |
I am also curious about the impact of precision on performance. |
Mike doubts it is a performance improvement but it doesn't look like there is a reason as to why it doesn't matter and also unclear if anyone has tested to see if it impacts performance. |
When we were generating things like paths in a processing/visualize step (not in the browser), I would often simplify the coordinates to go to
xx.12
orxx.123
. Our current DOM has a lot of precision in thepath
elements that isn't really useful for rendering. Does this matter? Does it slow things down at all? This is a practical question (optimization) but also something I am just curious about. No urgency to it.The text was updated successfully, but these errors were encountered: