Merge pull request #597 from flavour/ST_SimplifyPreserveTopology

Add support for ST_SimplifyPreserveTopology
This commit is contained in:
mdipierro
2015-01-23 12:10:18 -06:00
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -278,6 +278,12 @@ class PostgreSQLAdapter(BaseAdapter):
"""
return 'ST_Simplify(%s,%s)' %(self.expand(first), self.expand(second, 'double'))
def ST_SIMPLIFYPRESERVETOPOLOGY(self, first, second):
"""
http://postgis.org/docs/ST_SimplifyPreserveTopology.html
"""
return 'ST_SimplifyPreserveTopology(%s,%s)' %(self.expand(first), self.expand(second, 'double'))
def ST_TOUCHES(self, first, second):
"""
http://postgis.org/docs/ST_Touches.html
+4
View File
@@ -1304,6 +1304,10 @@ class Expression(object):
db = self.db
return Expression(db, db._adapter.ST_SIMPLIFY, self, value, self.type)
def st_simplifypreservetopology(self, value):
db = self.db
return Expression(db, db._adapter.ST_SIMPLIFYPRESERVETOPOLOGY, self, value, self.type)
# GIS queries
def st_contains(self, value):