EPSG: 2163 is a Lambert azimuthal equal-area projection, and you can easily find a brief idea of the required formulas on the wikipedia page for Lambert azimuthal equal-area projection. Please note that these are valid for a sphere.
Since we work with an ellipsoid, you need more intricate forumlas.
My go to reference for projection related information is Map Projections: A Working Manual, 1987, Snyder, John P.
It contains a lot of information about projections, includes detailed explanations, formulas, and examples. You should refer to it, for the detailed elipsoidal formula.
You can find the projection formulas in the above reference on pp 187-188 with an example on p. 332.
Did I actually transform my data points from WGS84 to NAD27?
Not really. Assuming your original coordinates are actually WGS84, you just assigned an erroneous CRS of NAD27(BLM14) the second time you imported the data. Assigning the CRS does not transform the data.
I was hoping to see a difference between the two layers, but I saw
none.
You may have on-the-fly transformations on for your project. If so, your WGS84 points were automatically reprojected (or projected in this case) to NAD27(BLM14). Turn it off (under Project Properties -> CRS) to see the actual differences.
To more clearly see the difference, relative to your Google Maps points (which may be in a different CRS), load the layer, defining it as having a CRS as WGS84 (probably accurate), then right-click on the layer and choose Save As...
, defining your project CRS of NAD27(BLM14) for the resultant file.
Turn off on-the-fly transformations for you project and load the saved NAD27(BLM14) file in. You should see the difference between the projections, i.e. your ~ 50 meters.
You can also use command line utilities to convert your coordinates:
PROJ's cs2cs utility
GDAL's gdaltransform utility
One way to use gdaltransform
is to start a terminal session (OSGeo4W if you are on Windows) and interactively execute:
gdaltransform -s_srs EPSG:<source CRS code> -t_srs EPSG:<target CRS code>
EPSG stands for European Petroleum Survey Group. Reference codes may be found at spatialreference.org.
For example, EPSG:4326
and EPSG:4267
are reference codes for WGS84 and NAD27, respectively:
gdaltransform -s_srs EPSG:4326 -t_srs EPSG:4267
-102.60930001 32.16984002 <-- user input
will return the corresponding coordinate in NAD27,
-102.608865426754 32.1697300184475
or, depending upon your platform, you may use stdin
/stdout
redirection as follows,
gdaltransform -s_srs EPSG:4326 -t_srs EPSG:4267 < input.csv > output.txt
This way, if you construct your lon/lat data as a csv with one coordinate pair per line, like,
-102.60930001, 32.16984002
-102.60350002, 32.14630999
then the input redirector, '<', will feed your data in, and the output redirector, '>', will write output.txt
, which will look like,
-102.608865426754 32.1697300184475 0
-102.603066486342 32.1461989948827 0
See also: Proper gdaltransform syntax to transform a list of coordinates?
Best Answer
If you want to use PHP, you could use Proj4PHP. This is a PHP-Class for geographic coordinates transformation using proj4 definitions. Proj4php is an OSGeo community project.