No subject


Wed Feb 3 18:16:50 EST 2010


+proj=tmerc +lat_0=47.5 +y_0=3175000.0 +x_0=3925000.0 +lon_0=-97.0 +k_0=1.0
+units=m +ellps=sphere

(The sphere ellipsoid is a guess as they didn't provide the geographic
coordinate system.)
So when I test out this proj4 string, these are the results I get:

proj -f "%f" +proj=tmerc +lat_0=47.5 +y_0=3175000.0 +x_0=3925000.0
+lon_0=-97.0 +k_0=1.0 +units=m +ellps=sphere
in> -126.0869 19.61229
in> -125.6792 19.77242
in> -125.2703 19.93048

out> 773317.154904   359897.643377
out> 824089.485710   370794.986195
out> 874706.342446   381466.440468

the projection coordinates should be:
600000   600000
650000   600000
700000   600000

and then the opposite transformation:

invproj -f "%f" +proj=tmerc +lat_0=47.5 +y_0=3175000.0 +x_0=3925000.0
+lon_0=263 +k_0=1.0 +ellps=sphere
in>  600000 600000
in>  650000 600000
in>  700000 600000

out>  -127.929260     -21.210147
out>  -127.514502     -21.293413
out>  -127.097731     -21.375966

and the coordinates should be:
-126.0869 19.61229
-125.6792 19.77242
-125.2703 19.93048

The longitude are at least in the ballpark, but the latitudes are completely
off.

If it helps, this data has been downloaded from NARCCAP, and it is the
RegCM3 model.
Any help would really be appreciated.
Thanks in advance,
Hailey

--001636c93289031bc8048beb6b26
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello all,<br>I am trying to create the proj4 string for a netcdf file with=
 the following coordinate information:<br><br><span style=3D"font-family: c=
ourier new,monospace;">variables:</span><span style=3D"font-family: courier=
 new,monospace;"></span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0 c=
har Transverse_Mercator ;</span><br style=3D"font-family: courier new,monos=
pace;"><span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Transverse_Mercator:grid_mapping_name =3D &q=
uot;transverse_mercator&quot; ;</span><br style=3D"font-family: courier new=
,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 Transverse_Mercator:longitude_of_central_meridian =
=3D -97. ;</span><br style=3D"font-family: courier new,monospace;"><span st=
yle=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 Transverse_Mercator:latitude_of_projection_origin =3D 47.5 =
;</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 Transverse_Mercator:scale_factor_at_central_meridi=
an =3D 1. ;</span><br style=3D"font-family: courier new,monospace;"><span s=
tyle=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 Transverse_Mercator:false_easting =3D 3925000. ;</span><br =
style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 Transverse_Mercator:false_northing =3D 3175000. ;<=
/span><br style=3D"font-family: courier new,monospace;"><span style=3D"font=
-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0 double lat(yc, xc) ;=
</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 lat:units =3D &quot;degrees_north&quot; ;</span><b=
r style=3D"font-family: courier new,monospace;"><span style=3D"font-family:=
 courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 lat:=
long_name =3D &quot;latitude&quot; ;</span><br style=3D"font-family: courie=
r new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 lat:standard_name =3D &quot;latitude&quot; ;</span=
><br style=3D"font-family: courier new,monospace;"><span style=3D"font-fami=
ly: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 l=
at:axis =3D &quot;Y&quot; ;</span><br style=3D"font-family: courier new,mon=
ospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0 d=
ouble lon(yc, xc) ;</span><br style=3D"font-family: courier new,monospace;"=
><span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 lon:units =3D &quot;degrees_east&quot; ;</span><br=
 style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 lon:long_name =3D &quot;longitude&quot; ;</span><b=
r style=3D"font-family: courier new,monospace;"><span style=3D"font-family:=
 courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 lon:=
standard_name =3D &quot;longitude&quot; ;</span><br style=3D"font-family: c=
ourier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 lon:axis =3D &quot;X&quot; ;</span><span style=3D"=
font-family: courier new,monospace;"></span><br style=3D"font-family: couri=
er new,monospace;"><span style=3D"font-family: courier new,monospace;">=A0=
=A0=A0=A0=A0=A0=A0 double xc(xc) ;</span><br style=3D"font-family: courier =
new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 xc:long_name =3D &quot;x-coordinate in Cartesian s=
ystem&quot; ;</span><br style=3D"font-family: courier new,monospace;"><span=
 style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0 xc:standard_name =3D &quot;projection_x_coordinate&quot;=
 ;</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 xc:units =3D &quot;m&quot; ;</span><br style=3D"fo=
nt-family: courier new,monospace;"><span style=3D"font-family: courier new,=
monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 xc:axis =3D &quot=
;X&quot; ;</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0 d=
ouble yc(yc) ;</span><br style=3D"font-family: courier new,monospace;"><spa=
n style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0 yc:long_name =3D &quot;y-coordinate in Cartesian system&=
quot; ;</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 yc:standard_name =3D &quot;projection_y_coordinate=
&quot; ;</span><br style=3D"font-family: courier new,monospace;"><span styl=
e=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 yc:units =3D &quot;m&quot; ;</span><br style=3D"font-family: c=
ourier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 yc:axis =3D &quot;Y&quot; ;</span><br><br><br>The =
file gives the coordinates in their native projected coordinates as well as=
 the lat &amp; lon coordinates. <br>
<br>From this information, I created the following proj4 string:<br>+proj=
=3Dtmerc +lat_0=3D47.5 +y_0=3D3175000.0 +x_0=3D3925000.0 +lon_0=3D-97.0 +k_=
0=3D1.0 +units=3Dm +ellps=3Dsphere<br><br>(The sphere ellipsoid is a guess =
as they didn&#39;t provide the geographic coordinate system.)<br>
So when I test out this proj4 string, these are the results I get:<br><br><=
span style=3D"font-family: courier new,monospace;">proj -f &quot;%f&quot; +=
proj=3Dtmerc +lat_0=3D47.5 +y_0=3D3175000.0 +x_0=3D3925000.0 +lon_0=3D-97.0=
 +k_0=3D1.0 +units=3Dm +ellps=3Dsphere</span><br style=3D"font-family: cour=
ier new,monospace;">
<span style=3D"font-family: courier new,monospace;">in&gt; -126.0869 19.612=
29</span><br style=3D"font-family: courier new,monospace;"><span style=3D"f=
ont-family: courier new,monospace;">in&gt; -125.6792 19.77242</span><br sty=
le=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">in&gt; -125.2703 19.930=
48</span><br style=3D"font-family: courier new,monospace;"><span style=3D"f=
ont-family: courier new,monospace;"></span><br><span style=3D"font-family: =
courier new,monospace;">out&gt; 773317.154904=A0=A0 359897.643377</span><br=
 style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">out&gt; 824089.485710=
=A0=A0 370794.986195</span><br style=3D"font-family: courier new,monospace;=
"><span style=3D"font-family: courier new,monospace;">out&gt; 874706.342446=
=A0=A0 381466.440468</span><br>
<br>the projection coordinates should be:<br>600000=A0=A0 600000<br>650000=
=A0=A0 600000<br>700000=A0=A0 600000<br><br>and then the opposite transform=
ation:<br><br><span style=3D"font-family: courier new,monospace;">invproj -=
f &quot;%f&quot; +proj=3Dtmerc +lat_0=3D47.5 +y_0=3D3175000.0 +x_0=3D392500=
0.0 +lon_0=3D263 +k_0=3D1.0 +ellps=3Dsphere </span><br style=3D"font-family=
: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">in&gt;=A0 600000 600000=
</span><br style=3D"font-family: courier new,monospace;"><span style=3D"fon=
t-family: courier new,monospace;">in&gt;=A0 650000 600000</span><br style=
=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">in&gt;=A0 700000 600000=
</span><br style=3D"font-family: courier new,monospace;"><br style=3D"font-=
family: courier new,monospace;"><span style=3D"font-family: courier new,mon=
ospace;">out&gt;=A0 -127.929260=A0=A0=A0=A0 -21.210147</span><br style=3D"f=
ont-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">out&gt;=A0 -127.514502=
=A0=A0=A0=A0 -21.293413</span><br style=3D"font-family: courier new,monospa=
ce;"><span style=3D"font-family: courier new,monospace;">out&gt;=A0 -127.09=
7731=A0=A0=A0=A0 -21.375966</span><br>
<br>and the coordinates should be:<br><span style=3D"font-family: courier n=
ew,monospace;">-126.0869 19.61229</span><br style=3D"font-family: courier n=
ew,monospace;">
<span style=3D"font-family: courier new,monospace;">-125.6792 19.77242</spa=
n><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">-125.2703 19.93048</spa=
n><br><br>The longitude are at least in the ballpark, but the latitudes are=
 completely off. <br><br>If it helps, this data has been downloaded from NA=
RCCAP, and it is the  RegCM3 model.<br>
Any help would really be appreciated.<br>Thanks in advance,<br>Hailey<br><b=
r><br><br>

--001636c93289031bc8048beb6b26--


More information about the Proj mailing list