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

Voronoi Topology Artifacts with topojson merge #1861

Closed
emeeks opened this issue May 5, 2014 · 1 comment
Closed

Voronoi Topology Artifacts with topojson merge #1861

emeeks opened this issue May 5, 2014 · 1 comment

Comments

@emeeks
Copy link

emeeks commented May 5, 2014

Not sure if it's voronoi.topology or topojson.merge, but you can see some issues with the following implementation:

http://bl.ocks.org/emeeks/75f50585460ad842cd27

This code was derived from code for generating regions in <orbis.stanford.edu/v2/> where it's used for the Regions functionality. To reproduce the behavior there, you need to:
Click the Network tab
Click "calculate network"
Click "Regions" on the right
Click the "+" and "-" buttons on the legend to adjust the break points from which the voronoi is constructed and merged

I realize that's cumbersome but it does demonstrate that the artifacts are different for different groupings of the same set of points used to generate the voronoi (which are visible in the block).

@mbostock
Copy link
Member

mbostock commented May 5, 2014

You have coincident points in your input. Remove those coincident points before computing the Voronoi (e.g., by using d3.nest).

http://bl.ocks.org/mbostock/2b070f9c7fa8f44eb2f0/288458fc4b7ff4b13d52ac5a279518f1a249fde9

@mbostock mbostock closed this as completed May 5, 2014
mbostock added a commit that referenced this issue May 5, 2014
This makes voronoi.topology more consistent with the non-topological version,
and has the nice side-effect that you ignore coincident points by default.

Fixes #1861.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants