optimisation calcul hash/validité geojson
This commit is contained in:
parent
268c270ac0
commit
071005528f
1 changed files with 4 additions and 4 deletions
|
@ -122,9 +122,9 @@ class EventResource(BaseEvent):
|
|||
# get its id (md5 hash)
|
||||
h = cur.fetchone()
|
||||
if h is None:
|
||||
cur.execute("""SELECT md5(st_asewkt(st_geomfromgeojson( %s ))),
|
||||
ST_IsValid(st_geomfromgeojson( %s )),
|
||||
ST_IsValidReason(st_geomfromgeojson( %s )) ;""", (geometry,geometry,geometry))
|
||||
cur.execute("""SELECT md5(st_asewkt(geom)),
|
||||
ST_IsValid(geom),
|
||||
ST_IsValidReason(geom) from (SELECT st_geomfromgeojson( %s ) as geom) as g ;""", (geometry,))
|
||||
h = cur.fetchone()
|
||||
return h
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue