[postgis-users] [XX000] ERROR: AddToPROJ4SRSCache: could not parse proj4 string
Andrew Joseph
ap.joseph at live.com
Mon Nov 13 14:23:48 PST 2017
The query you suggested to test works -but ONLY if run on separate
transaction. If I run the create server / create foreign table / insert /
select on the same transaction, it fails.
Any idea what would cause that to occur?
I can also get the following statements to work -if I run in another
connection and run the commands in the same specific order:
SELECT ST_AsText(ST_Transform(ST_Transform(ST_SetSRID(ST_Point(-97.353287,
31.105862), 4326), 2277),4326));
SELECT
st_transform(st_setsrid(geom,2277),4326)
FROM
shapefiles.testshp
However the following throws the exception if run on the following same
connection in exact order:
DROP SERVER IF EXISTS shapefiles CASCADE;
CREATE SERVER shapefiles
FOREIGN DATA WRAPPER ogr_fdw
OPTIONS (
datasource
'/data/jurisdictions/country/us/state/tx/county/travis/assessor/data_20161007/shapefiles/Parcel_poly.shp',
format 'ESRI Shapefile'
);
DROP SCHEMA IF EXISTS shapefiles CASCADE;
CREATE SCHEMA shapefiles;
CREATE FOREIGN TABLE shapefiles.testshp(
fid bigint,
pid_10 text,
prop_id text,
geom geometry(MultiPolygon,2277)
) SERVER shapefiles OPTIONS (layer 'Parcel_poly');
SELECT ST_AsText(ST_Transform(ST_Transform(ST_SetSRID(ST_Point(-97.353287,
31.105862), 4326), 2277),4326));
I double checked that I don't have any packages for proj installed. I've
tried using both postgis 2.4 and 2.3 Postgres 10.1 and 9.6 GDAL trunk, gdal
2.2.2 and gdal 2.2.0, proj 4.8, and reverting fdw to the last working
revision and nothing seems to make a difference. The DOCKERFILE included in
the proj git repository no longer seems to require manually loading the
gridshift files -though I have attempted to make this work with/without
copying the files. https://github.com/OSGeo/proj.4/blob/master/Dockerfile
Apt-packages for postgres are as follows:
postgresql-10/xenial-pgdg,now 10.1-1.pgdg16.04+1 amd64 [installed]
postgresql-client-10/xenial-pgdg,now 10.1-1.pgdg16.04+1 amd64
[installed,automatic]
postgresql-client-common/xenial-pgdg,now 188.pgdg16.04+1 all
[installed,automatic]
postgresql-common/xenial-pgdg,now 188.pgdg16.04+1 all [installed]
postgresql-contrib/xenial-pgdg,now 10+188.pgdg16.04+1 all [installed]
postgresql-server-dev-10/xenial-pgdg,now 10.1-1.pgdg16.04+1 amd64
[installed]
I did notice that since 9.6 postgresql-common and contrib are no longer
specific to the specified version of postgres -but I doubt that has anything
to do with the issue.
Extension install:
CREATE SCHEMA postgis;
-- Enable PostGIS (includes raster)
CREATE EXTENSION postgis WITH SCHEMA postgis;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION postgis_sfcgal WITH SCHEMA postgis;
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION address_standardizer;
CREATE EXTENSION address_standardizer_data_us;
CREATE EXTENSION postgis_tiger_geocoder;
CREATE EXTENSION "uuid-ossp";
CREATE EXTENSION ogr_fdw;
CREATE EXTENSION mysql_fdw;
CREATE EXTENSION pgRouting;
UPDATE pg_database SET datistemplate=true WHERE datname='template_postgis';
.
--
Sent from: http://postgis.17.x6.nabble.com/PostGIS-User-f3516033.html
More information about the postgis-users
mailing list