Yes, Virginia, `ST_MakeLine` really exists in PostGIS 1.3 and above.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Justin Bronn 2009-12-24 15:07:53 +00:00
parent 474fb8c3ae
commit 9b8e90f937
1 changed files with 3 additions and 2 deletions

View File

@ -199,9 +199,11 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
if version < (1, 3, 0): if version < (1, 3, 0):
UNIONAGG = 'GeomUnion' UNIONAGG = 'GeomUnion'
UNION = 'Union' UNION = 'Union'
MAKELINE = False
else: else:
UNIONAGG = 'ST_Union' UNIONAGG = 'ST_Union'
UNION = 'ST_Union' UNION = 'ST_Union'
MAKELINE = 'ST_MakeLine'
# Only PostGIS versions 1.3.4+ have GeoJSON serialization support. # Only PostGIS versions 1.3.4+ have GeoJSON serialization support.
if version < (1, 3, 4): if version < (1, 3, 4):
@ -212,11 +214,10 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
# ST_ContainsProperly ST_MakeLine, and ST_GeoHash added in 1.4. # ST_ContainsProperly ST_MakeLine, and ST_GeoHash added in 1.4.
if version >= (1, 4, 0): if version >= (1, 4, 0):
GEOHASH = 'ST_GeoHash' GEOHASH = 'ST_GeoHash'
MAKELINE = 'ST_MakeLine'
BOUNDINGCIRCLE = 'ST_MinimumBoundingCircle' BOUNDINGCIRCLE = 'ST_MinimumBoundingCircle'
self.geometry_functions['contains_properly'] = PostGISFunction(prefix, 'ContainsProperly') self.geometry_functions['contains_properly'] = PostGISFunction(prefix, 'ContainsProperly')
else: else:
GEOHASH, MAKELINE, BOUNDINGCIRCLE = False, False, False GEOHASH, BOUNDINGCIRCLE = False, False
# Geography type support added in 1.5. # Geography type support added in 1.5.
if version >= (1, 5, 0): if version >= (1, 5, 0):