[Cubicweb] [PATCH] Add ST_GeomFromText() to RQL functions

Rémi Cardona remi.cardona at logilab.fr
Fri Jan 10 17:29:25 CET 2014


# HG changeset patch
# User Rémi Cardona <remi.cardona at logilab.fr>
# Date 1389371088 -3600
#      Fri Jan 10 17:24:48 2014 +0100
# Node ID eadf74f7a086642674ebaa914737820a24c17e68
# Parent  9bc9b6276506ac93db7d3bef68d4cda44dc94182
Add ST_GeomFromText() to RQL functions

diff --git a/site_cubicweb.py b/site_cubicweb.py
--- a/site_cubicweb.py
+++ b/site_cubicweb.py
@@ -149,10 +149,16 @@ class ST_ASGEOJSON(FunctionDescr):
      minargs = 1
      maxargs = 2
      supported_backends = ('postgres',)
      rtype = 'String'
  +class ST_GEOMFROMTEXT(FunctionDescr):
+    minargs = 1
+    maxargs = 2
+    supported_backends = ('postgres',)
+    rtype = 'Geometry'
+
  class ST_UNION(FunctionDescr):
      aggregat = True
      minargs = 1
      supported_backends = ('postgres',)
      rtype = 'Geometry'
@@ -183,6 +189,7 @@ register_function(ST_AREA)
  register_function(ST_NUMINTERIORRINGS)
  register_function(ST_SIMPLIFY)
  register_function(ST_TRANSFORM)
  register_function(DISPLAY)
  register_function(ST_ASGEOJSON)
+register_function(ST_GEOMFROMTEXT)
  register_function(ST_UNION)



More information about the Cubicweb mailing list