Skip to content

Instantly share code, notes, and snippets.

@Fil
Last active September 6, 2018 01:41
Show Gist options
  • Save Fil/f67b0f6ccfa1f072c555775e331c307b to your computer and use it in GitHub Desktop.
Save Fil/f67b0f6ccfa1f072c555775e331c307b to your computer and use it in GitHub Desktop.
d3 geojson polygons
d3 = require("d3-geo", "d3-geo-projection", "d3-geo-voronoi")
polygons = d3.geoVoronoi().polygons({…})
projected = d3.geoProject(
d3.geoProject(
polygons,
d3
.geoEquirectangular()
.scale(180 / Math.PI)
.translate([0, 0])
),
d3.geoIdentity().reflectY(true)
)
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment