[GRASS-user] Correctly Converting LL to LCC
Glynn Clements
glynn at gclements.plus.com
Mon Dec 28 12:16:43 EST 2009
Rich Shepard wrote:
> There are three points whose geographic coordinates I have in long/lat. I
> need to convert these to the Oregon Lambert Conformal Conic projection with
> the Washington-Oregon adjustment. When I try doing this with the cs2cs tool I
> get incorrect values as a result.
> This is the command line I used:
>
> cs2cs ... +x_0=1312336
Versus:
> false east 1312335.958000 (International feet)
Versus:
http://trac.osgeo.org/proj/wiki/GenParms#Units
If one uses the internal ellipsoid figure table, ellps=, then because
all a= entries in the table are in meters the user must refer to the
other linear unit items in meters.
> What have I done incorrectly? How should I properly translate the long/lat
> values to lcc for my project?
You forgot to convert between feet and metres.
Technically, PROJ is units-agnostic. All of the values which it deals
with are dimensionless quantities. HOWEVER: you must use the same
units for everything. As the named ellipsoids use metres for the
semi-major axis, x_0 must also be in metres (the false easting given
above is 400000m), and you need to use +to_meter= if you want the
resulting cartographic coordinates converted to feet.
Looking for similar projections in the EPSG table (/usr/share/proj/epsg),
I find:
# NAD83 / Oregon Lambert
<2991> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
# NAD83 / Oregon Lambert (ft)
<2992> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs <>
# NAD83(HARN) / Oregon Lambert
<2993> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
# NAD83(HARN) / Oregon Lambert (ft)
<2994> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs <>
Note that all of these use +x_0=400000 (give or take 1.6 microns), and
those labelled "(ft)" have "+to_meter=0.3048".
Aside from issues related to PROJ itself, make sure that GRASS knows
that your coordinates are in feet (the PROJ_UNITS file should contain
"meters: 0.3048" (or "meters: 0.30480060960121920243" if you want US
survey feet).
Also, take care when dealing with elevation data. Modules will
typically assume that elevations are in metres unless told otherwise
(e.g. zmult=0.3048 for r.slope.aspect), but I wouldn't entirely rule
out the possibility of something somewhere assuming that elevations
use the same units as the horizontal coordinates. Check that the
results make sense.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list