[postgis-users] Bug or Problem with st_transform

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue May 18 06:55:24 PDT 2010


Stephen Woodbridge wrote:

> Hi guys,
> 
> This is looking like it might be a bug on version "POSTGIS="1.3.3" 
> GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec 2007" USE_STATS" which 
> I know is ancient, but upgrading is not trivial.
> 
> What I am trying to do is construct a shape in 900913 in meters and then 
> rotate, transform it to 4326 and translate it to a location.
> 
> The problem is the transform does not look correct. To just rough out 
> the math, 4030 meters should be about 0.036202 degrees based on
> 4030/40075016*360 = 0.036202 but st_transform is giving back numbers 
> like -5.67596869587729e-09
> 
> Is this a known problem on this version?
> Is my logic faulty?
> Is there a better way to do this?
> 
> Thanks,
>   -Steve

Hi Steve,

The first thing I would suggest is that you run the same query on a 
spare fresh 1.4/1.5 installation and see what happens. The 
transformation code had a good tidy up and some logic corrections within 
that timeframe, including better reporting of error messages.

HTH,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-users mailing list