Skip to content

Instantly share code, notes, and snippets.

@andrewgiessel
Created November 21, 2014 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewgiessel/08e5cb531b5bbd24cf6a to your computer and use it in GitHub Desktop.
Save andrewgiessel/08e5cb531b5bbd24cf6a to your computer and use it in GitHub Desktop.
import pyproj
wgs84 = pyproj.Proj('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs')##4326
geocentric= pyproj.Proj('+proj=geocent +datum=WGS84 +units=m +no_defs') ##4978
for x, y in coords:
x2, y2, z2 = pyproj.transform( wgs84, geocentric, x, y, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment