Skip to content

Instantly share code, notes, and snippets.

@christlc
Created December 13, 2016 01:22
Show Gist options
  • Save christlc/0e005e5130e00f51eb2b7be18f356595 to your computer and use it in GitHub Desktop.
Save christlc/0e005e5130e00f51eb2b7be18f356595 to your computer and use it in GitHub Desktop.
Convert Lat-Long to HK1980 grid points using pyproj
from pyproj import Proj, transform
# lat-long to HK coordinates
hk_proj = Proj(init='epsg:2326') # HK1980 projection
latlon_proj = Proj(init='epsg:4326') # lat lon projection
x1,y1 = transform(latlon_proj, hk_proj, float(lon), float(lat))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment