This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# scrip d'import des données SIM2 (sim2/ISBA) dans postgresql | |
psql -c " | |
create table sim2 (LAMBX int,LAMBY int,DATE varchar,PRENEI_Q float,PRELIQ_Q float,T_Q float,FF_Q float,Q_Q float, DLI_Q float, SSI_Q float,HU_Q float,EVAP_Q float,ETP_Q float,PE_Q float,SWI_Q float,DRAINC_Q float,RUNC_Q float,RESR_NEIGE_Q float,RESR_NEIGE6_Q float, HTEURNEIGE_Q float, HTEURNEIGE6_Q float, HTEURNEIGEX_Q float, SNOW_FRAC_Q float, ECOULEMENT_Q float, WG_RACINE_Q float, WGI_RACINE_Q float, TINF_H_Q float, TSUP_H_Q float);" | |
create table sim2_grid (lambx int, lamby int, lat varchar, lon varchar); | |
\copy sim2_grid from 'coordonnees_grille_sim2_lambert-2-etendu.csv' with (format csv, header true, delimiter ';'); | |
alter table sim2_grid add geom geometry(point,4326) ; | |
update sim2_grid set geom = st_makepoint(replace(lon,',','.')::numeric, replace(lat,',','.')::numeric); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
# script de conversion du code HTML de l'arrêté https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000048234967 | |
# au format geojson | |
# !!! MANQUE MURUROA non délimité dans le tableau d'origine !!! | |
import re, json | |
from bs4 import BeautifulSoup | |
cols = ['','immatriculation','communes','nom','dep','limites','ministere','zone_aero'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# This script converts dashcam videos into geotagged still images | |
# - extraction with ffmpeg of key images | |
# - extraction of GPS location and time using OCR | |
# - sub-second metadata generation | |
# - image cropping and optimization | |
# | |
# Tested with ThiEYE carview4 dashcam (front and back) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
""" | |
Script de remise en forme du fichier des copropriétés | |
Auteur: Christian Quest - 24-08-2022 | |
Licence: WTFPL | |
""" | |
import sys, csv, re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
import sys, fileinput, socket, re, csv, time | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
#from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.firefox.options import Options as FirefoxOptions | |
import psycopg2 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
ANNEE=$1 | |
mkdir -p $ANNEE | |
cd $ANNEE | |
# téléchargement des fichiers Excel | |
wget -N http://www2.impots.gouv.fr/documentation/statistiques/ircom$ANNEE/dep/{01..95}0.xls | |
wget -N http://www2.impots.gouv.fr/documentation/statistiques/ircom$ANNEE/dep/2A0.xls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# download limites géographiques des communes | |
wget -N http://data.cquest.org/ign/adminexpress/ADMIN-EXPRESS_2-4__SHP__FRA_L93_2020-09-15.7z | |
7z x ADMIN-EXPRESS_2-4__SHP__FRA_L93_2020-09-15.7z | |
# import dans une base locale postgresql/postgis pour traitements géo | |
ogr2ogr -f pgdump /vsistdout/ -t_srs EPSG:4326 -nln admin_express_communes -nlt geometry ADMIN-EXPRESS_2-4__SHP__FRA_2020-09-15/ADMIN-EXPRESS/1_DONNEES_LIVRAISON_2020-09-15/ADE_2-4_SHP_LAMB93_FR/COMMUNE.shp | psql | |
# métropoles et régions concernées |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://download.geofabrik.de/europe/france/ile-de-france-latest-free.shp.zip -N -nv | |
unzip ile-de-france-latest-free.shp.zip | |
ogr2ogr -f pgdump /vsistdout/ gis_osm_roads_free_1.shp -nln osm_roads --config PG_USE_COPY YES -lco GEOMETRY_NAME=geometry | psql | |
psql -tA -c " | |
SELECT row_to_json(p) FROM | |
( | |
SELECT j.*, c.nom as city, c.insee as citycode | |
FROM (SELECT 'junction_' || st_geohash(st_centroid(unnest(ST_ClusterWithin(st_intersection(r1.geometry, r2.geometry),0.0001)))) as id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# téléchargement de documents PDF sur data.inpi.fr | |
if [ $# -ne 1 ]; | |
then | |
echo "Usage: ./download SIREN" | |
echo "example: ./download SIREN 429211592" | |
exit | |
fi |
NewerOlder