Bug 1040948 - Executing PostGIS functions in PostGres9.2
Summary: Executing PostGIS functions in PostGres9.2
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 11:52 UTC by aquavitae69
Modified: 2014-02-24 07:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:53:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description aquavitae69 2013-12-12 11:52:33 UTC
On a new (PHP) quickstart, with a new PostgreSQL 9.2. cartridge:

test=# CREATE EXTENSION postgis;
CREATE EXTENSION
test=# CREATE EXTENSION postgis_topology;
CREATE EXTENSION
test=# SELECT ST_Transform('SRID=3857;POINT(-10000000 5200000)'::geometry,4326);
                    st_transform                    
----------------------------------------------------
 0101000020E6100000E0C1F1C2377556C0F04DCF5946214540
(1 row)
 
test=# SELECT ST_Transform('SRID=3857;POINT(-10000000 5200000)'::geometry,4326);
ERROR:  transform: couldn't project point (-1e+07 5.2e+06 0): failed to load NAD27-83 correction file (-38)
test=# 

The same function (ST_Transform) is run twice.  The first time it works, the second time it doesn't.  I didn't run any other commands between these, and nobody else has access, so it wasn't messed up that way.  I also tried creating a couple of new apps and it did the same on every one.

Comment 2 Jakub Hadvig 2014-01-15 16:49:01 UTC
Hi aquavitae
thank you for reporting this issue.
I found out that the problem was in missing proj-nad package in spec file.

PR fixing this issue:
https://github.com/openshift/origin-server/pull/4483

Comment 3 openshift-github-bot 2014-01-16 00:20:14 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/6b1340cba4f6196887a9abf8324af29eada77d11
Bug 1040948 - Executing PostGIS functions in PostGres9.2

Comment 4 chunchen 2014-01-16 09:43:29 UTC
It's fixed, verified on devenv_4230, please refer to the following results:

1. Create an app
rhc app create crb19 ruby-1.9 --no-git

2. Add postgresql 9.2 to this app
rhc cartridge add postgresql-9.2 -a crb19

3. SSH into this app and log into psql DB
[crb19-cdm.dev.rhcloud.com 52d780c112b27edcb700004d]\> psql
psql (9.2.4)
Type "help" for help.

crb19=# CREATE EXTENSION postgis;
CREATE EXTENSION
crb19=# CREATE EXTENSION postgis_topology;
CREATE EXTENSION
crb19=# SELECT ST_Transform('SRID=3857;POINT(-10000000 5200000)'::geometry,4326);
                    st_transform                    
----------------------------------------------------
 0101000020E6100000E0C1F1C2377556C0F04DCF5946214540
(1 row)

crb19=# SELECT ST_Transform('SRID=3857;POINT(-10000000 5200000)'::geometry,4326);
                    st_transform                    
----------------------------------------------------
 0101000020E6100000E0C1F1C2377556C0F04DCF5946214540
(1 row)

crb19=# SELECT ST_Transform('SRID=3857;POINT(-10000000 5200000)'::geometry,4326);
                    st_transform                    
----------------------------------------------------
 0101000020E6100000E0C1F1C2377556C0F04DCF5946214540
(1 row)


Note You need to log in before you can comment on or make changes to this bug.