MemoryContext PJMemoryContext;
projPJ projection = NULL;
char *proj_str;
- int* pj_errno_ref;
/*
** Turn the SRID number into a proj4 string, by reading from spatial_ref_sys
}
projection = lwproj_from_string(proj_str);
-
- pj_errno_ref = pj_get_errno_ref();
- if ( (projection == NULL) || (*pj_errno_ref))
+ if ( projection == NULL )
{
- /* we need this for error reporting */
- /*pfree(projection); */
- elog(ERROR, "AddToPROJ4SRSCache: couldn't parse proj4 string: '%s': %s", proj_str, pj_strerrno(*pj_errno_ref));
+ elog(ERROR,
+ "AddToPROJ4SRSCache: couldn't parse proj4 string: '%s': %s",
+ proj_str, pj_strerrno(*pj_get_errno_ref()));
}
/*
)
select '#1578', _st_within(p, mp), _st_intersects(p, mp) FROM inp;
+-- #1580
+select '#1580.1', ST_Summary(ST_Transform('SRID=4326;POINT(0 0)'::geometry, 3395));
+select '#1580.2', ST_Transform('SRID=4326;POINT(180 90)'::geometry, 3395); -- fails
+select '#1580.3', ST_Summary(ST_Transform('SRID=4326;POINT(0 0)'::geometry, 3395));
+
-- Clean up
DELETE FROM spatial_ref_sys;
#1398b|POINT(-160.137654 77.091608)
#1543|MULTILINESTRING((0 0,10 0,10 10,0 0),(0 0))|POLYGON((0 0,10 10,10 0,0 0))
#1578|f|f
+#1580.1|Point[B]
+ERROR: transform: couldn't project point (180 90 0): tolerance condition error (-20)
+#1580.3|Point[B]