You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
import psycopg2
uname = "dbices"
pwd = "vectors"
host = "postgresx03.infra.xtr.deltares.nl"
dbname= "ICES"
strSql = """select avg(doxy)
from ocean o,icessquares i
where st_contains(i.the_geom,o.the_point)
and year = 2005
and i.statsq= '32F3'
"""
strSql = """select st_x(the_point),st_y(the_point)
from ocean o,icessquares i
where st_contains(i.the_geom,o.the_point)
and year = 2005
and i.statsq= '32F3'
"""
conn = psycopg2.connect("dbname="+dbname+" host="+host+" user="+uname+" password="+pwd)
cur = conn.cursor()
arr = []
cur.execute(strSql)
arr = cur.fetchall()
conn.close()