Example #1
0
 def populate(self):
     session = current_session()
     query = 'INSERT INTO {output} ' \
             'SELECT {geom_ref_colname} geom_ref, wkb_geometry the_geom ' \
             'FROM {input}'.format(
                 output=self.output().table,
                 input=self.input()['data'].table,
                 geom_ref_colname=self.geom_ref_colname())
     session.execute(query)
Example #2
0
 def populate(self):
     session = current_session()
     query = 'INSERT INTO {output} ' \
             'SELECT {geom_ref_colname} geom_ref, wkb_geometry the_geom ' \
             'FROM {input}'.format(
                 output=self.output().table,
                 input=self.input()['data'].table,
                 geom_ref_colname=self.geom_ref_colname())
     session.execute(query)
Example #3
0
 def columns(self):
     cols = OrderedDict()
     session = current_session()
     for colname, coltarget in self.input().iteritems():
         cols['id_' + colname] = OBSColumn(
             type='Text',
             name='',
             weight=0,
             targets={coltarget: GEOM_REF},
         )
     return cols
Example #4
0
 def columns(self):
     cols = OrderedDict()
     session = current_session()
     for colname, coltarget in self.input().iteritems():
         cols['id_' + colname] = OBSColumn(
             type='Text',
             name='',
             weight=0,
             targets={coltarget: GEOM_REF},
         )
     return cols