Mercurial > hg > ChinaGisRestApi
changeset 35:55dbaea75e66
more work on types
author | casties |
---|---|
date | Wed, 01 Sep 2010 13:02:03 +0200 |
parents | c237699c4752 |
children | b356b86773a1 |
files | RestDbInterface.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/RestDbInterface.py Tue Aug 31 17:56:23 2010 +0200 +++ b/RestDbInterface.py Wed Sep 01 13:02:03 2010 +0200 @@ -176,6 +176,18 @@ def setTableMetaTypes(self,schema,table,fields): """sets the GIS meta information for table""" logging.debug("settablemetatypes schema=%s, table=%s, fields=%s"%(schema,table,fields)) + gisIdField = None + latField = None + lonField = None + for f in fields: + t = f['type'] + if t == 'gis_id': + gisIdField = f['name'] + elif t == 'coord_lat': + latField = f['name'] + elif t == 'coord_lon': + lonField = f['name'] + res = self.executeSQL("select * from metadata where tablename=%s", table) #if len(res["rows"]) > 0: # TODO: what now?