[postgis-users] different answers for Transform and cs2cs
Don
harterc1 at comcast.net
Fri Oct 31 21:38:56 PDT 2008
Obe, Regina wrote:
> Don,
> 4030 is missing datum information so I think when you transform the
> datum gets ignored which
> means best proj can guess is that 4030 and 4267 should return same
> number since it can't tell if they are the same or different datum
>
> 4030 looks like this - "+proj=longlat +ellps=WGS84 +no_defs "
>
> I suspect you should be using 4326 which looks like this
> "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "
>
> When I use 4326 with your example
> select
> X( Transform( SetSRID(MakePoint(-86.123456789::double
> precision,34.123456789::double
> precision),4326),4267 ))::double precision, Y( Transform(
> SetSRID(MakePoint(-86.123456789::double
> precision,34.123456789::double
> precision),4326),4267 ))::double precision;
>
> I get the below which accounting for rounding differences is about the
> same
> -86.1234814621629;34.1233611276746
>
> Hope that helps,
> Regina
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Don
> Sent: Thursday, October 30, 2008 11:11 PM
> To: PostGIS Users Discussion
> Subject: [postgis-users] different answers for Transform and cs2cs
>
> I have basically the same transformration encoded below in 2 different
> ways. One uses transform the other the program cs2cs. I am just
> trying to convert a latlong to a different datum. It seems that I am
> getting the wrong answer with Transform.
>
> select
> X( Transform( SetSRID(MakePoint(-86.123456789::double
> precision,34.123456789::double
> precision),4030),4267 ))::double precision from al_ent;
> x
> ---------------
> -86.123456789
> -86.123456789
>
>
>> cs2cs +proj=latlong +datum=NAD83 +to +proj=latlong +datum=NAD27 -f
>>
> %.12f<<EOF
>
>> -86.123456789 34.123456789
>>
>> -86.123481462163 34.123361126798 -0.000032913871
>>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> -----------------------------------------
> The substance of this message, including any attachments, may be
> confidential, legally privileged and/or exempt from disclosure
> pursuant to Massachusetts law. It is intended
> solely for the addressee. If you received this in error, please
> contact the sender and delete the material from any computer.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
OK . Thanks. I guess the key is datum for transform to work properly.
I had thought mistakenly that a nad27 ellps was the same as a nad27
datum. From what I have reviewed on the web a datum is a coordinate
system and an ellipse. So specifying datum of nad27 would specify the
appropriate clark ellipsoid for nad27.
So for longlat coordinates I should use; 4326, 26716, 32616, and 4267
for my utm zone 16. These coordinates were taken from GPS using NAD27
conus, and I wanted to provide them in other formats.
The UTM are useful for handplotting on a topo map in the field and the
WGS84 is what google earth uses.
More information about the postgis-users
mailing list