[Django] #22456: Add PostGIS 2.1 support

36 views
Skip to first unread message

Django

unread,
Apr 16, 2014, 8:20:37 AM4/16/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 support
---------------------------------------+------------------------
Reporter: timo | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
In Ubuntu 14.04, the packaged version of PostGIS is 2.1. In trying to
build a Jenkins box, I've encountered one failing test:

{{{
Traceback (most recent call last):
File
"/var/lib/jenkins/jobs/Django/workspace/database/postgis/python/python2.7/django/contrib/gis/tests/test_spatialrefsys.py",
line 113, in test_add_entry
add_srs_entry(900913)
File
"/var/lib/jenkins/jobs/Django/workspace/database/postgis/python/python2.7/django/contrib/gis/utils/srs.py",
line 52, in add_srs_entry
srs = SpatialReference(srs)
File
"/var/lib/jenkins/jobs/Django/workspace/database/postgis/python/python2.7/django/contrib/gis/gdal/srs.py",
line 96, in __init__
self.import_epsg(srs_input)
File
"/var/lib/jenkins/jobs/Django/workspace/database/postgis/python/python2.7/django/contrib/gis/gdal/srs.py",
line 287, in import_epsg
capi.from_epsg(self.ptr, epsg)
File
"/var/lib/jenkins/jobs/Django/workspace/database/postgis/python/python2.7/django/contrib/gis/gdal/prototypes/errcheck.py",
line 117, in check_errcode
check_err(result)
File
"/var/lib/jenkins/jobs/Django/workspace/database/postgis/python/python2.7/django/contrib/gis/gdal/error.py",
line 53, in check_err
raise e(msg)
SRSException: Unsupported SRS.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22456>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 16, 2014, 8:47:36 AM4/16/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 support
-----------------------------+------------------------------------

Reporter: timo | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by claudep):

900913 srs is deprecated for some time now (replaced by 3856), I think we
could safely remove it from our code.
However, we should still check if it doesn't break anything regrading
OpenLayers (see also
http://docs.openlayers.org/library/spherical_mercator.html).

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:1>

Django

unread,
Apr 16, 2014, 8:49:40 AM4/16/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 support
-----------------------------+------------------------------------

Reporter: timo | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by claudep):

And FWIW, it might be more related to the GDAL version than to PostGIS.
What is the GDAL version?

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:2>

Django

unread,
Apr 16, 2014, 9:00:29 AM4/16/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------

Reporter: timo | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by timo):

GDAL 1.10.1 (which I see
[https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/geolibs/
isn't listed as supported]).

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:3>

Django

unread,
Apr 17, 2014, 8:57:58 AM4/17/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by timo):

I tried
[https://github.com/timgraham/django/commit/00dcfa46d62118f6272c1a0be4695fc476dcc61e
updating the test] to use the alternate SRS as suggested, but still get
the same exception so possibly I have a bad configuration or missing
installation of something, but the test passes on Ubuntu 12.04 with pretty
much the same configuration. The main difference I can think of is that
14.04 is using `CREATE EXTENSION postgis;` with PostGIS 2.1 while 12.04 is
using the `createdb -T template_postgis <db_name>` technique on PostGIS
1.5.

I guess I will go back to building the new Jenkins on 12.04 as there are
some failing tests on 1.4 that would require backporting a couple things
like [747f7d25] which we shouldn't do if we are only doing security
updates for 1.4.

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:4>

Django

unread,
Apr 17, 2014, 3:05:34 PM4/17/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: claudep
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by claudep):

* status: new => assigned
* owner: nobody => claudep


Comment:

Tim, I'm so sorry, it is 3857, not 3856 /o\. I'll care for this issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:5>

Django

unread,
Apr 17, 2014, 3:20:13 PM4/17/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: claudep
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"c082f3c74c63f0939e349896cc802205a8863dfa"]:
{{{
#!CommitTicketReference repository=""
revision="c082f3c74c63f0939e349896cc802205a8863dfa"
Fixed #22456 -- Replaced 900913 EPSG code by 3857 in some tests

3857 is now the official EPSG code for the Google spherical mercator
projection and some recent versions of GDAL do not recognize 900913
any longer.
Thanks Tim Graham for the report and initial patch.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:6>

Django

unread,
Apr 17, 2014, 3:21:50 PM4/17/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: claudep
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"f039c555cad59ef21b2ce3fcfda0579d82fd45a6"]:
{{{
#!CommitTicketReference repository=""
revision="f039c555cad59ef21b2ce3fcfda0579d82fd45a6"
[1.7.x] Fixed #22456 -- Replaced 900913 EPSG code by 3857 in some tests

3857 is now the official EPSG code for the Google spherical mercator
projection and some recent versions of GDAL do not recognize 900913
any longer.
Thanks Tim Graham for the report and initial patch.

Backport of c082f3c74c from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:7>

Django

unread,
Apr 17, 2014, 3:24:32 PM4/17/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: claudep
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"3cea917e3e8a26b5b701c160f4f6e03b1b85cf84"]:
{{{
#!CommitTicketReference repository=""
revision="3cea917e3e8a26b5b701c160f4f6e03b1b85cf84"
Confirmed support for PostGIS 2.1 and GDAL 1.10

Refs #22456.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:8>

Django

unread,
Apr 17, 2014, 3:28:24 PM4/17/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: claudep
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"edaff9b0dffc9ad984671673214d671d84abe144"]:
{{{
#!CommitTicketReference repository=""
revision="edaff9b0dffc9ad984671673214d671d84abe144"
[1.7.x] Confirmed support for PostGIS 2.1 and GDAL 1.10

Refs #22456.
Backport of 3cea917e3e from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:9>

Django

unread,
Oct 29, 2014, 6:58:47 PM10/29/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: claudep
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by Darkless012):

Gosh, Fix also the DOC please!
I've spent significant time figuring out "What the hell is wrong"

https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/

FROM:
add_srs_entry(900913)
TO:
add_srs_entry(3857)

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:10>

Django

unread,
Oct 29, 2014, 7:17:46 PM10/29/14
to django-...@googlegroups.com
#22456: Add PostGIS 2.1 / GDAL 1.10 support
-----------------------------+------------------------------------
Reporter: timo | Owner: claudep
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by timgraham):

If you believe there is a doc error, please open a new ticket. It's
unclear why that would be related to this ticket as that section is
described as "If you’re running GDAL 1.7 or above (most users), you can
skip this step."

--
Ticket URL: <https://code.djangoproject.com/ticket/22456#comment:11>

Reply all
Reply to author
Forward
0 new messages