Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#22456 closed New feature (fixed)

Add PostGIS 2.1 / GDAL 1.10 support

Reported by: Tim Graham Owned by: Claude Paroz
Component: GIS Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (11)

comment:1 by Claude Paroz, 10 years ago

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).

comment:2 by Claude Paroz, 10 years ago

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

comment:3 by Tim Graham, 10 years ago

Summary: Add PostGIS 2.1 supportAdd PostGIS 2.1 / GDAL 1.10 support

GDAL 1.10.1 (which I see isn't listed as supported).

comment:4 by Tim Graham, 10 years ago

I tried 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.

comment:5 by Claude Paroz, 10 years ago

Owner: changed from nobody to Claude Paroz
Status: newassigned

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

comment:6 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 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.

comment:7 by Claude Paroz <claude@…>, 10 years ago

In 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.

comment:8 by Claude Paroz <claude@…>, 10 years ago

In 3cea917e3e8a26b5b701c160f4f6e03b1b85cf84:

Confirmed support for PostGIS 2.1 and GDAL 1.10

Refs #22456.

comment:9 by Claude Paroz <claude@…>, 10 years ago

In edaff9b0dffc9ad984671673214d671d84abe144:

[1.7.x] Confirmed support for PostGIS 2.1 and GDAL 1.10

Refs #22456.
Backport of 3cea917e3e from master.

comment:10 by Pavel Grochal, 9 years ago

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)

comment:11 by Tim Graham, 9 years ago

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."

Note: See TracTickets for help on using tickets.
Back to Top