Created
December 9, 2013 23:17
-
-
Save timwis/7882901 to your computer and use it in GitHub Desktop.
Convert between 4326 and 2272 with Proj4js. Written by @davewalk. Uses http://trac.osgeo.org/proj4js/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convertCoordinates: function (coords) { | |
Proj4js.defs['EPSG:2272'] = '+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs'; | |
var source = new Proj4js.Proj('EPSG:4326'); | |
var dest = new Proj4js.Proj('EPSG:2272'); | |
var point = new Proj4js.Point(-75.163789, 39.952335); | |
Proj4js.transform(source, dest, point); | |
return point; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment