[Proj] NAD_1983_To_WGS_1984_5

Roger Bivand Roger.Bivand at nhh.no
Sat Aug 30 11:12:37 PDT 2014


On Sat, 30 Aug 2014, Hermann Peifer wrote:

> Hi Roger,
>
> I might be wrong as I haven't really understood the details of your problem, 
> but it looks to me that you want to get to these benchmark coordinates as a 
> result of step 2:
>
> 1703671.30566227 424014.398045834
> 1704020.20113366 421943.708664294
>
> I am getting pretty close, when using +nadgrids=@null in step 2, see below.

Thanks, this does look like the best so far, and appears to avoid the 
inverse projection and transformation step in pj_transform to WGS84 
geographical coordinates (if I understand correctly).

>
> BTW, you specify too many parameters in your sample code: +ellps=GRS80 
> +datum=NAD83 
> +towgs84=-0.991,1.9072,0.5129,0.025789908,0.0096501,0.0116599,0.0
>
> datum=NAD83 is a shortcut for "ellps=GRS80 towgs84=0,0,0" so you actually 
> have 2 specifications for ellps and towgs84. This is why you end up with:
>
> #--- following specified but NOT used
> # +ellps=GRS80 +towgs84=0,0,0
>

Right, possibly muddying the waters. The +nadgrids=@null trick seems to be 
the way to go for now. I'll pass this on in thr R-sig-geo thread.

Roger

>
> Hermann
>
>
> cat locs.xy # input coordinates for step 1
> -121.524764291826 37.6600366036405
> -121.523480804667 37.6543604613483
>
> # step 1: transform and project to epsg 2227
> cs2cs -f "%16.9f" +proj=longlat +datum=WGS84 +to +proj=lcc 
> +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 
> +x_0=2000000.0 +y_0=500000.0 +ellps=GRS80 +units=us-ft +no_defs 
> +towgs84=-0.991,1.9072,0.5129,0.025789908,0.0096501,0.0116599,0.0 locs.xy | 
> tee locs.step1
> 6265039.137827862	2064418.929329731      1.854230785
> 6265388.042578982	2062348.222394954      1.854689702
>
> # step 2: transform to epsg 26743
> cs2cs -f "%16.9f" +proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 
> +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0 +y_0=500000.0 +ellps=GRS80 
> +units=us-ft +no_defs +nadgrids=@null +to +init=epsg:26743  locs.step1
>
> 1703671.305672543	424014.398046337      1.854230785
> 1704020.201144472	421943.708664825      1.854689702
>
>
> On 2014-08-30 14:04, Roger Bivand wrote:
>> Hi,
>> 
>> I'm aware of Frank's reply:
>> 
>> http://lists.maptools.org/pipermail/proj/2008-September/003833.html
>> 
>> but would value clarification of why this happens (further details on:
>> 
>> https://stat.ethz.ch/pipermail/r-sig-geo/2014-August/021611.html
>> 
>> from WGS84 geographical coordinates to NAD27 via WGS84_5).
>> 
>> (code attached to get around line breaks)
>> 
>> The first test using cs2cs is wrong because it doesn't use +towgs84= to
>> use *_5:
>> 
>> (the test is against benchmark coordinates)
>> 
>> The works in the first sub-step (geographical to WGS84_5 State Plane):
>> 
>> So locs.step1 are OK, but the next step gets the same errors as ignoring
>> *_5
>> 
>> Turning on -v shows:
>> 
>> cs2cs -v -f "%16.9f" +proj=lcc +lat_1=38.43333333333333
>> +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0
>> +y_0=500000.0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs
>> +towgs84=-0.991,1.9072,0.5129,0.025789908,0.0096501,0.0116599,0.0 +to
>> +init=epsg:26743 < locs.step1
>> 
>> # ---- From Coordinate System ----
>> #Lambert Conformal Conic
>> #    Conic, Sph&Ell
>> #    lat_1= and lat_2= or lat_0
>> # +proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5
>> # +lon_0=-120.5 +x_0=2000000.0 +y_0=500000.0 +ellps=GRS80 +datum=NAD83
>> # +units=us-ft +no_defs
>> # +towgs84=-0.991,1.9072,0.5129,0.025789908,0.0096501,0.0116599,0.0
>> #--- following specified but NOT used
>> # +ellps=GRS80 +towgs84=0,0,0
>> # ---- To Coordinate System ----
>> #Lambert Conformal Conic
>> #    Conic, Sph&Ell
>> #    lat_1= and lat_2= or lat_0
>> # +init=epsg:26743 +proj=lcc +lat_1=38.43333333333333
>> # +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384
>> # +y_0=0 +datum=NAD27 +units=us-ft +no_defs +ellps=clrk66
>> # +nadgrids=@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat
>> 
>> Puzzled,
>> 
>> Roger
>> 
>> 
>> NAD83_WGS84_5_test.txt
>> 
>> 
>> cat > locs.xy << EOF
>> -121.524764291826 37.6600366036405
>> -121.523480804667 37.6543604613483
>> EOF
>> 
>> cs2cs -f "%16.9f" +proj=longlat +datum=WGS84 +to +init=epsg:26743 locs.xy | 
>> awk '{if (NR == 1)
>>   printf("%16.9f %16.9f\n", 1703671.30566227-$1, 424014.398045834-$2)
>>   else
>>   printf("%16.9f %16.9f\n", 1704020.20113366-$1, 421943.708664294-$2)
>> }'
>> 
>> cs2cs -f "%16.9f" +proj=longlat +datum=WGS84 +to +proj=lcc 
>> +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 
>> +x_0=2000000.0 +y_0=500000.0 +ellps=GRS80 +datum=NAD83 +units=us-ft 
>> +no_defs +towgs84=-0.991,1.9072,0.5129,0.025789908,0.0096501,0.0116599,0.0 
>> locs.xy > locs.step1
>> awk '{
>> if (NR == 1)
>>   printf("%16.9f %16.9f\n", 6265039.1378244-$1, 2064418.92932968-$2)
>>   else
>>   printf("%16.9f %16.9f\n", 6265388.04257557-$1, 2062348.22239488-$2)
>> }' locs.step1
>> 
>> cs2cs -f "%16.9f" +proj=lcc +lat_1=38.43333333333333 
>> +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0 
>> +y_0=500000.0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs 
>> +towgs84=-0.991,1.9072,0.5129,0.025789908,0.0096501,0.0116599,0.0 +to 
>> +init=epsg:26743 < locs.step1 | awk '{
>> if (NR == 1)
>>   printf("%16.9f %16.9f\n", 1703671.30566227-$1, 424014.398045834-$2)
>>   else
>>   printf("%16.9f %16.9f\n", 1704020.20113366-$1, 421943.708664294-$2)
>> }'
>> 
>> 
>> 
>> _______________________________________________
>> Proj mailing list
>> Proj at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/proj
>> 
>
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no




More information about the Proj mailing list