geoPoint, getLine, geoPolygon
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.4.1-alpha.1+timestamp.2012.12.20.15.47.02
|
||||
Version 2.4.1-alpha.1+timestamp.2012.12.20.18.16.02
|
||||
|
||||
13
gluon/dal.py
13
gluon/dal.py
@@ -9666,6 +9666,19 @@ GQLDB = DAL
|
||||
DAL.Field = Field # was necessary in gluon/globals.py session.connect
|
||||
DAL.Table = Table # was necessary in gluon/globals.py session.connect
|
||||
|
||||
################################################################################
|
||||
# Geodal utils
|
||||
################################################################################
|
||||
|
||||
def geoPoint(*line):
|
||||
return "POINT (%f %f)" % (x,y)
|
||||
|
||||
def geoLine(*line):
|
||||
return "LINESTRING (%s)" % ','.join("%f %f" % item for item in line)
|
||||
|
||||
def geoPolygon(*line):
|
||||
return "POLYGON ((%s))" % ','.join("%f %f" % item for item in line)
|
||||
|
||||
################################################################################
|
||||
# run tests
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user