[Proj] Using pj_transform API to convert WGS84 to OSGB

Keith Sharp kms at passback.co.uk
Fri Jan 20 05:01:31 PST 2006


On Fri, 2006-01-20 at 08:42 -0400, John Smart wrote:
> > double x = 55.863157, y = -4.432298, z = 0;
> 
> I could be missing something here but haven't you got your x and y mixed up? 
> Your command line test had x=-4 and y=55 (4w and 55n).
> 
> If I do your command line test with the mixed up values I get:
> 55.863157 -4.432298
> 8256101.80      -6437819.18 599.248
> 
> (I was supposing maybe I'd get the same message as you).
> 
> maybe there's some sanity checking going on in the code, since a Transverse 
> Mercator projection generally isn't useful so far away from its origin.

I may well have my X and Y mixed up, but switching them gives the same
error with my code:

[kms at animal test]$ ./test 
Converting from WGS84 to OSGB
X: -4.432298e+00  Y: 5.586316e+01  Z: 0.000000e+00
Transform failed: latitude or longitude exceeded limits

Thanks,

Keith.




More information about the Proj mailing list