Skip to content

Instantly share code, notes, and snippets.

View CEZERT's full-sized avatar


View GitHub Profile

Afficher stst des lignes par rapport des polygones

"nom_com" || '_' ||  "CODE_INSEE"  ||  '\n'  ||  '\n'  || 


'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:="longueur", filter:=( "ft"  like '%_DET_DETECT%')),2)) || ' m ----- Detection OK ---'  ||  '\n' || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:=("ft" LIKE '%_DETECTION_PERT%')),2)) || ' m ----- Perturbée ---' ||  '\n'  || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:="ft" LIKE '%INACCESSIBLE%'),2)) || ' m ----- Inaccessible ---' ||  '\n'  || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:="ft" LIKE '%CULTURE%'),2)) || ' m ----- Zone culture ---' ||  '\n'  || 
The QGIS expression is designed to split a string (found in the "Code_ouvra" field) by underscores ('_'), and then recombine the first three elements of the resulting array into a new string, again separated by underscores.
array_to_string(array_slice(string_to_array("Code_ouvra", '_'), 0, 2), '_')
This expression does the following:
1. `string_to_array("Code_ouvra", '_')`: Splits the "Code_ouvra" string into an array using '_' as the separator.
2. `array_slice(..., 0, 2)`: Takes a slice of the array from the first element (index 0) to the third element (index 2).
3. `array_to_string(..., '_')`: Converts the sliced array back into a string, with elements separated by '_'.
for %X in (*.shp) do ogr2ogr -skipfailures -clipsrc
Initial Inquiry: "Hi, thank you for reaching out. I've read your requirements and I'm confident I can help with your QlikSense dashboard. Let's discuss more about your project so I can better understand your needs."
Discussing Details: "Thanks for sharing these details. It helps me understand your project better. Could you also provide some information about the specific KPIs you're interested in?"
Project Timeline: "Based on your requirements, I anticipate this project will take approximately X days to complete. I'll be able to give a more accurate estimate once we finalize the project details."
Data Confidentiality: "Rest assured, your data's security is my top priority. I adhere to strict data privacy protocols and will only use your data for this specific project."
Project Updates: "I wanted to update you on the project. The data modeling is complete and I've started working on the dashboard. I'll keep you posted with further updates."
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='23-0241ACA_LOT_7' AND pid <> pg_backend_pid();
create database "23-0242ACA_LOT_8" template "23-0241ACA_LOT_7";
mport datetime as dt
import json
import os
import contextily as cx
import folium
import geopandas as gp
import mapclassify
import matplotlib.pyplot as plt
import pandas as pd
import shapely.geometry as sg
# Connect Drive
from __future__ import print_function
import os.path
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
CEZERT / Tab_layouts
Last active December 28, 2022 23:33
import sys
from PyQt5.QtWidgets import QApplication, QCheckBox, QTabWidget, QVBoxLayout, QWidget
class Window(QWidget):
def __init__(self):
self.setWindowTitle('QTabWidget exemple')
self.resize(400, 150)
# Create top level layout
-- traitement tables fusion pour éviter les doublons
-- NON UTILISEE methode 1 : fonction trigger
-- NB : la comparaison ne fonctionne pas si les valeurs des attributs à comparer sont NULL
--DROP FUNCTION terrain.verif_fusion_aff();
create or replace function terrain.verif_fusion_aff() returns opaque as $body$
if NEW.geom in ( select geom from terrain.fusion_aff )
AND NEW.lot in ( select lot from terrain.fusion_aff )
AND NEW.etude in ( select etude from terrain.fusion_aff )