So I'm getting some user drawn polygons in WKT with OpenLayers. (Web Mercator CRS) and I now need to now convert it to SRID4326 so can do some spatial queries. However, when it fails to do a ST_Transform. A simplified query I run that gives me the error:
SELECT ST_AsText(
ST_Transform('SRID=3857;POLYGON((-10179308.152034 5209576.5082574,-10140172.393558 4329021.9425348,-8516038.4167805 4329021.9425348,-9514000.2579329 5385687.421402,-10179308.152034 5209576.5082574))'::geometry,4326)
);
It gives me this error:
ERROR: transform: couldn't project point (-1.08446e+07 5.1652e+06 0): failed to load NAD27-83 correction file (-38)
HINT: PostGIS was unable to transform the point because either no grid shift files were found, or the point does not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual for details on how to configure PostGIS to alter this behaviour. cohere=> select postgis_full_version();
Even after a bit of google-foo, I still can't figure out how to install the correction file I can do And I can do other transformations just fine (I tried 4326 to 2026 and 3857). I read somewhere to check to make sure PROJ is installed and it is:
SELECT PostGIS_Full_Version();
POSTGIS="1.5.2" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.6.26" USE_STATS
Thanks,