[Django] #23757: Spatialite backend doesn't support 3d introspection

41 views
Skip to first unread message

Django

unread,
Nov 3, 2014, 4:01:02 PM11/3/14
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
------------------------------------+------------------------
Reporter: claudep | Owner: nobody
Type: Bug | 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 |
------------------------------------+------------------------
Currently, Django crashes with an error like the following while
introspecting Spatialite 3D field:
{{{
Traceback (most recent call last):
File "...python2.7/tests/inspectdb/tests.py", line 182, in
test_special_column_name_introspection
call_command('inspectdb', stdout=out)
File "...python2.7/django/core/management/__init__.py", line 115, in
call_command
return klass.execute(*args, **defaults)
File "...python2.7/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "...python2.7/django/core/management/base.py", line 533, in handle
return self.handle_noargs(**options)
File "...python2.7/django/core/management/commands/inspectdb.py", line
27, in handle_noargs
for line in self.handle_inspection(options):
File "...python2.7/django/core/management/commands/inspectdb.py", line
100, in handle_inspection
field_type, field_params, field_notes =
self.get_field_type(connection, table_name, row)
File "...python2.7/django/contrib/gis/management/commands/inspectdb.py",
line 14, in get_field_type
field_type, geo_params =
connection.introspection.get_geometry_type(table_name, geo_col)
File
"...python2.7/django/contrib/gis/db/backends/spatialite/introspection.py",
line 42, in get_geometry_type
field_type = OGRGeomType(row[2]).django
File "...python2.7/django/contrib/gis/gdal/geomtype.py", line 46, in
__init__
raise OGRException('Invalid OGR Integer Type: %d' % type_input)
OGRException: Invalid OGR Integer Type: 1001
}}}

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

Django

unread,
Nov 3, 2014, 4:05:39 PM11/3/14
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
-------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------+------------------------------------
Changes (by claudep):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/3462

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

Django

unread,
Nov 3, 2014, 4:59:55 PM11/3/14
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
-------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------+------------------------------------
Changes (by claudep):

* needs_better_patch: 0 => 1


Comment:

Tests are failing on the CI server, probably due to a different Spatialite
version than on my system (4.0.0)...

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

Django

unread,
Nov 4, 2014, 1:01:10 PM11/4/14
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
-------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------+------------------------------------

Comment (by claudep):

I *think* the remaining failures (unreproduceable on my system, even with
Spatialite 3.0) are related to GEOS (see
http://trac.osgeo.org/geos/ticket/292 which is fixed in GEOS 3.3). That is
the GEOS version Spatialite is compiled with. In that case, we could
simply skip those tests when GEOS < 3.3.

Extract of a traceback of one of those errors happening on the CI server
(django.contrib.gis.tests.geo3d.tests.Geo3DTest.test_3d_hasz):


{{{
Traceback (most recent call last):

File ".../python2.7/django/contrib/gis/tests/geo3d/tests.py", line 116,
in test_3d_hasz
self._load_interstate_data()
File ".../python2.7/django/contrib/gis/tests/geo3d/tests.py", line 95,
in _load_interstate_data
Interstate3D.objects.create(name=name, line=line_3d)
...
File ".../python2.7/django/db/backends/sqlite3/base.py", line 507, in
execute
return Database.Cursor.execute(self, query, params)
IntegrityError: geo3d_interstate3d.line violates Geometry constraint
[geom-type or SRID not allowed]
}}}

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

Django

unread,
Nov 4, 2014, 5:31:34 PM11/4/14
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
-------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------+------------------------------------

Comment (by timgraham):

If that's the case, it sounds good to me. I verified the new tests pass on
Ubuntu 14.04 and added a new build to Jenkins "django-master-trusty" to
help us going forward. We need some workaround on 1.7 and 1.6 (like
skipping tests) before creating similar builds for those versions, or we
can simply skip the Spatial builds there.

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

Django

unread,
Mar 17, 2015, 7:41:09 PM3/17/15
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
-------------------------+---------------------------------------------

Reporter: claudep | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------+---------------------------------------------
Changes (by timgraham):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


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

Django

unread,
Mar 18, 2015, 2:28:40 PM3/18/15
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
-------------------------+---------------------------------------------
Reporter: claudep | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------+---------------------------------------------
Changes (by Claude Paroz <claude@…>):

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


Comment:

In [changeset:"65129aac07022f23afa1df7ec7fad2216634cb38" 65129aa]:
{{{
#!CommitTicketReference repository=""
revision="65129aac07022f23afa1df7ec7fad2216634cb38"
Fixed #23757 -- Added 3D introspection support to Spatialite backend

Thanks Tim Graham for the review.
}}}

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

Django

unread,
Mar 18, 2015, 7:00:09 PM3/18/15
to django-...@googlegroups.com
#23757: Spatialite backend doesn't support 3d introspection
-------------------------+---------------------------------------------
Reporter: claudep | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------+---------------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"02d78bb1a80706d941ffc6c892cc75208eb6b782" 02d78bb]:
{{{
#!CommitTicketReference repository=""
revision="02d78bb1a80706d941ffc6c892cc75208eb6b782"
Fixed build failure introduced by refs #23757.
}}}

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

Reply all
Reply to author
Forward
0 new messages