Skip to content

Instantly share code, notes, and snippets.

@dylan
Forked from pbogden/Base.png
Created January 29, 2016 09:41
Show Gist options
  • Save dylan/d3a0e7c1074f447c4304 to your computer and use it in GitHub Desktop.
Save dylan/d3a0e7c1074f447c4304 to your computer and use it in GitHub Desktop.
Georeference an image

Use D3 to georeference (manually) a PNG that has no projection or bounding box info.

The image has country boundaries, so Natural Earth provides a path forward.

Instructions:

  1. Pan and zoom the vector layer until the country boundaries align.
  2. Update 'scale' and 'translate' accordingly (in the code).
  3. Repeat until happy.
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.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment