| Summary: | Executing PostGIS functions in PostGres9.2 | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | aquavitae69 |
| Component: | Image | Assignee: | Jakub Hadvig <jhadvig> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.x | CC: | chunchen, jhadvig, mfojtik, xtian, yadu |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-01-30 00:53:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
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 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 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)
|
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.