init depot renew
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import geopandas as gpd
|
||||
import pycen
|
||||
|
||||
sql = 'SELECT * FROM zones_humides.v_zoneshumides'
|
||||
req = gpd.read_postgis(sql,pycen.con)
|
||||
|
||||
df = req[~req.geom.is_valid].copy()
|
||||
df.geom = df.geom.buffer(0)
|
||||
df = df[['site_code','geom']].copy()
|
||||
df.columns = ['id_site','geom']
|
||||
df = pycen.tools.Polygons_to_MultiPolygon(df)
|
||||
|
||||
pycen.update_to_sql(
|
||||
df,pycen.con,
|
||||
'r_sites_geom','sites',
|
||||
'id_site','geom'
|
||||
)
|
||||
Reference in New Issue
Block a user