Skip to content

Instantly share code, notes, and snippets.

@pbogden
Last active December 21, 2017 20:25
Show Gist options
  • Save pbogden/7369853 to your computer and use it in GitHub Desktop.
Save pbogden/7369853 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