pas de SRID dans le calcul de hash
This commit is contained in:
parent
604a079368
commit
367eb73dd4
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ class EventResource(BaseEvent):
|
|||
def maybe_insert_geometry(self, geometry, cur):
|
||||
# insert into geo table if not existing
|
||||
cur.execute("""INSERT INTO geo
|
||||
SELECT geom, md5(st_asewkt(geom)) as hash, st_centroid(geom) as geom_center FROM
|
||||
SELECT geom, md5(st_astext(geom)) as hash, st_centroid(geom) as geom_center FROM
|
||||
(SELECT st_setsrid(st_geomfromgeojson( %s ),4326) as geom) as g
|
||||
WHERE ST_IsValid(geom)
|
||||
ON CONFLICT DO NOTHING RETURNING hash;""",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue