Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. insert(id, Height, X, Y)
  2. ....
  3. def insert(gid,height, X, Y):
  4. gid=str(gid)
  5. connection = psycopg2.connect(host='', dbname='postgres', user='', password='')
  6. cur = connection.cursor()
  7. cur.execute ("""INSERT INTO gronkarta.test5 (gid, height, geom) VALUES (""" + gid + """,""" + str(height) + ""","""+ST_GeomFromText('POINT(X Y)', 3008)+""");""")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement