[postgis-users] ST_Transform unexpectedly returning "tolerance condition error (-20)"

Jeff Lewis jblewis at ucla.edu
Sat Nov 17 15:50:23 PST 2012


Hi,

I just updated from PostGIS 1.5 to PostGIS 2 and I am experiencing an 
issue with ST_Transform() that I hope someone on the list might help me 
with.

Here is my new install info:
# select PostGIS_Full_Version();
                                                                 
postgis_full_version
------------------------------------------------------------------------------------------------------------------
  POSTGIS="2.0.1 r9979" GEOS="3.3.2-CAPI-1.7.2" PROJ="Rel. 4.8.0, 6 
March 2012"
  GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8" TOPOLOGY RASTER
(running of Fedora 17).

Here is an example of the problem:
# select astext(Transform(GeomFromText('POINT(559471 -149527 
0)',999114),900913));
ERROR:  transform: couldn't project point (559471 -149527 0): tolerance 
condition error (-20)

SRID 999114 is defined as:
# select * from spatial_ref_sys where srid=999114;
-[ 
RECORD]----------------------------------------------------------------------------------------------------
srid      | 999114
auth_name | esri
srtext | ...left out to save space...
auth_srid | 102003
proj4text | +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 
+x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs

In my previous install (POSTGIS=1.5.3, PROJ=4.7.1), the query above yields:
# select astext(Transform(GeomFromText('POINT(559471 -149527 
0)',9102003),900913));
                   astext
------------------------------------------
  POINT(-9989042.0860284 4300704.95525496)
(The starting SRID differs because it was remapped to 999114 when I 
upgraded to PostGIS2.  I have confirmed that both the old and the new 
SRIDs have the same prj4text string).

I have reprojected the same point using the same proj4text strings in R 
(using the rproj4 package linked to the same new install of proj 4.8) 
and it "works" (gives the same result as my old install of PostGIS).

I do not have a good strategy for what to do next.  I would be grateful 
for any suggestions as to what could be going on.

Best,

Jeff







More information about the postgis-users mailing list