Mercurial > hg > ChinaGisRestApi
diff RestDbGisApi.py @ 157:8ef6fbc8b89a
polygon-Layers
author | fknauft |
---|---|
date | Mon, 07 Feb 2011 13:39:59 +0100 |
parents | cca88caad152 |
children | a4cbe5e71bda |
line wrap: on
line diff
--- a/RestDbGisApi.py Mon Feb 07 11:49:01 2011 +0100 +++ b/RestDbGisApi.py Mon Feb 07 13:39:59 2011 +0100 @@ -341,8 +341,9 @@ def getPointForChGisId(self, gis_id): """returns coordinate pair for given gis_id""" def getPoint(id): - sql="SELECT x_coord,y_coord FROM chgis.chgis_coords WHERE gis_id = %s" - res = self.executeSQL(sql, (gis_id,)) + sql="SELECT x_coord,y_coord FROM chgis.chgis_coords WHERE gis_id = CAST(%s AS text)" + str_gis_id=str(gis_id).split('.')[0] + res = self.executeSQL(sql, (str_gis_id,)) if len(res['rows']) > 0: return res['rows'][0] return None