[postgis-users] Workaround for "transform: couldn't project point"	error?
    Evan Martin 
    postgresql at realityexists.net
       
    Thu Nov 17 19:19:31 PST 2011
    
    
  
I'm importing some data into a PostGIS DB. The points in the data come 
in various SRIDs, but I need to transform them all to 4326 to use the 
geography type.
A simple ST_Transform() doesn't always work for this, because of the 
error in http://trac.osgeo.org/postgis/ticket/318 So I tried 
transforming via 3395, eg.
SELECT 
ST_AsText(ST_Transform(ST_Transform(ST_GeomFromEWKT('SRID=4267;POINT(-31.94944 
52.38833)'), 3395), 4326))
This works for most points, but fails at the poles, eg.
SELECT 
ST_AsText(ST_Transform(ST_Transform(ST_GeomFromEWKT('SRID=4267;POINT(-80 
-90)'), 3395), 4326))
     ERROR:  transform: couldn't project point (-80 -90 0): tolerance 
condition error (-20)
Is there any effective workaround for this? Is the bug likely to be 
fixed any time soon? It's been open for some time and a few people have 
run into it.
Regards,
Evan
    
    
More information about the postgis-users
mailing list