-
Notifications
You must be signed in to change notification settings - Fork 1
proj4
rothwell.andy@gmail.com edited this page Aug 6, 2024
·
3 revisions
Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.
The 2 coordinate systems that are used are 4326 and 2272. proj4 requires you to know that these are defined as:
const projection4326 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
const projection2272 = "+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";
4326 is [lng, lat] coordinates, they look like [-75.163471, 39.953338].
2272 are State Plane for Pennsylvania coordinates:
They look like [2698724, 241508].
The main place we need to do this transformation is from cyclomedia.