Re-2: [Proj] GK31_Tirol (Austria)
Jens Schwarz
jens.schwarz at alpstein.de
Mon Apr 23 01:36:00 PDT 2007
Hello Frank,
thanks again!
-------- Original Message --------
Subject: Re: [Proj] GK31_Tirol (Austria) (20-Apr-2007 15:02)
From: Frank Warmerdam <warmerdam at pobox.com>
To: jens.schwarz at alpstein.de
> Jens Schwarz wrote:
> >
> > Hello Frank,
> >
> > thanks for your help!
> > cs2cs works now. I didn't see that the parameter is called towgs84 for proj
> > and towgs for cs2cs.
>
> Jens,
>
> It is towgs84 everywhere. Is there some documentation in conflict with
> this?
> If so, let me know and I'll fix it.
proj ignores towgs84 (as far as I can reproduce it):
proj +proj=tmerc +ellps=bessel +lat_0=0 +lon_0=13.333333 +k=1.000000 +x_0=0 +y_0=-5000000 +towgs84=577.326,90.129,463.919,5.1366,1.4742,5.2970,2.4232 -r<<EOF
> 47.487218 12.254853
> EOF
-81265.97 261441.61
proj +proj=tmerc +ellps=bessel +lat_0=0 +lon_0=13.333333 +k=1.000000 +x_0=0 +y_0=-5000000 -r<<EOF
> 47.487218 12.254853
> EOF
-81265.97 261441.61
But:
cs2cs +proj=latlong +datum=WGS84 +to +proj=tmerc +ellps=bessel +lat_0=0 +lon_0=13.333333 +k=1.000000 +x_0=0 +y_0=-5000000 +towgs84=577.326,90.129,463.919,5.1366,1.4742,5.2970,2.4232 -r<<EOF
> 47.487218 12.254853
> EOF
-81220.59 261502.07 -47.76
I couldn't get the right result with proj, only with cs2cs (and your help).
I wondered if/how postgis decides when to use proj or cs2cs.
>
> > I need it in postgis. I don't know if it would be enough to set the cs2cs
> > parameter string as proj4text there.
> > I'll ask their mailing list.
>
> You should be able to use the same coordinate system in proj4text
> as you used on the cs2cs commandline.
I tried to do it brute force and did the following in postgis:
select * from spatial_ref_sys where srid=31255;
srid | auth_name | auth_srid | srtext | proj4text
-------+-----------+-----------+--------+---------------------------------------------------------------
31255 | | | | +proj=tmerc +ellps=bessel
+lat_0=0 +lon_0=13.333333 +k=1.000000
+x_0=0 +y_0=-5000000
+towgs84=577.326,90.129,463.919,5.1366,1.4742,5.2970,2.4232
select AsText(Transform(PointFromText('POINT(47.487218 12.254853)',4326),31255));
astext
-------------------------------------------
POINT(3933583.45695887 -3371941.86007218)
I'm confused as it's not right and not the same as proj on command line.
>
> > As we're running web applications, we're also using the javascript port of
> > proj.
> > The cs2cs port isn't there yet.
>
> Ah, well the javascript library is a completely different implementation so
> you do have to be wary about compatability issues.
>
> Best regards,
> --
Best regards.
More information about the Proj
mailing list