Skip to content

Commit

Permalink
updated geometry type in sql schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
p3t3r67x0 committed Sep 11, 2024
1 parent 3ccfa06 commit 346da96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions data/flensburg_stadtteile.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
DROP TABLE IF EXISTS districts CASCADE;

CREATE TABLE IF NOT EXISTS districts (
"id" INT,
"name" VARCHAR,
"wkb_geometry" geometry,
id INT,
name VARCHAR NOT NULL,
geom GEOMETRY(POLYGON, 4326),
PRIMARY KEY(id)
);

Expand Down
2 changes: 1 addition & 1 deletion tools/insert_districts.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def update_district(cur, district_id, geometry):

wkb_geometry = wkb.dumps(g, hex=True, srid=4326)

sql = '''UPDATE districts SET wkb_geometry = %s WHERE id = %s'''
sql = 'UPDATE districts SET geom = %s WHERE id = %s'

cur.execute(sql, (wkb_geometry, district_id))

Expand Down

0 comments on commit 346da96

Please sign in to comment.