22 lines
636 B
Python
22 lines
636 B
Python
#!/usr/bin/env python
|
|
# -*- coding: UTF-8 -*-
|
|
#Nom : view_data.py
|
|
#Description : Test de connection en base et d'accès aux données
|
|
#Copyright : 2021, CEN 38
|
|
#Auteur : Colas Geier
|
|
|
|
|
|
import geopandas as gpd
|
|
|
|
|
|
PATHIN = '/home/colas/Documents/5_BDD'
|
|
coucheA = '/ZONES_HUMIDES/TronconHydrographique/TronconHydrographique_FXX.shp'
|
|
coucheB = '/1_QGIS/dept_isere.shp'
|
|
coucheSortie = 'TronconHydrographique_Isere2'
|
|
|
|
A = gpd.read_file(PATHIN + coucheA)
|
|
B = gpd.read_file(PATHIN + coucheB)
|
|
|
|
|
|
C = gpd.sjoin(A, B, op='intersects')
|
|
C.to_file(PATHIN + 'tmp/{0}.shp' %(model,dateEch), driver='ESRI Shapefile', layer='{0}'.format(coucheSortie)) |