Skip to content

Instantly share code, notes, and snippets.

@mukhtyar
Forked from pbogden/Base.png
Created July 12, 2017 16:03
Show Gist options
  • Save mukhtyar/154f4d06508b6f97860b9af5ab0ddf4d to your computer and use it in GitHub Desktop.
Save mukhtyar/154f4d06508b6f97860b9af5ab0ddf4d 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