Merge pull request #597 from flavour/ST_SimplifyPreserveTopology
Add support for ST_SimplifyPreserveTopology
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user