Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cared for PostGIS 2 renamed operations

  • Loading branch information...
commit 864a0514b85637ee92d6f1ba596997195dfc7107 1 parent 92b5341
@claudep claudep authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 django/contrib/gis/db/backends/postgis/operations.py
View
12 django/contrib/gis/db/backends/postgis/operations.py
@@ -231,7 +231,6 @@ def get_dist_ops(operator):
self.distance_spheroid = prefix + 'distance_spheroid'
self.envelope = prefix + 'Envelope'
self.extent = prefix + 'Extent'
- self.extent3d = prefix + 'Extent3D'
self.force_rhr = prefix + 'ForceRHR'
self.geohash = GEOHASH
self.geojson = GEOJSON
@@ -239,14 +238,12 @@ def get_dist_ops(operator):
self.intersection = prefix + 'Intersection'
self.kml = prefix + 'AsKML'
self.length = prefix + 'Length'
- self.length3d = prefix + 'Length3D'
self.length_spheroid = prefix + 'length_spheroid'
self.makeline = prefix + 'MakeLine'
self.mem_size = prefix + 'mem_size'
self.num_geom = prefix + 'NumGeometries'
self.num_points =prefix + 'npoints'
self.perimeter = prefix + 'Perimeter'
- self.perimeter3d = prefix + 'Perimeter3D'
self.point_on_surface = prefix + 'PointOnSurface'
self.polygonize = prefix + 'Polygonize'
self.reverse = prefix + 'Reverse'
@@ -259,6 +256,15 @@ def get_dist_ops(operator):
self.union = prefix + 'Union'
self.unionagg = prefix + 'Union'
+ if version >= (2, 0, 0):
+ self.extent3d = prefix + '3DExtent'
+ self.length3d = prefix + '3DLength'
+ self.perimeter3d = prefix + '3DPerimeter'
+ else:
+ self.extent3d = prefix + 'Extent3D'
+ self.length3d = prefix + 'Length3D'
+ self.perimeter3d = prefix + 'Perimeter3D'
+
def check_aggregate_support(self, aggregate):
"""
Checks if the given aggregate name is supported (that is, if it's
Please sign in to comment.
Something went wrong with that request. Please try again.