Par rapport au schema ci-dessus (tiré de http://hallard.me/pitinfov12/), la résistance R1 est remplacé par une resistance plus faible (1k). La 4,7k fonctionnait avant déménagement (ancien compteur), mais pas sur le Linky (cf http://hallard.me/demystifier-la-teleinfo/). A priori pas de prob avec la 1k ou sans resistance.
This file contains hidden or 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
| <!-- Parcelles forestières de l'Office National des Forêts en Hauts-de-France (buffer km) --> | |
| <OGRVRTDataSource> | |
| <OGRVRTLayer name="parcelle_forestiere"> | |
| <SrcDataSource>WFS:http://ws.carmencarto.fr/WFS/105/ONF_Forets?</SrcDataSource> | |
| <SrcLayer>PARC_PUBL_FR</SrcLayer> | |
| <OpenOptions> | |
| <OOI key="EXPOSE_GML_ID">NO</OOI> | |
| </OpenOptions> | |
| <SrcRegion clip="FALSE">POLYGON ((579103 6997695, 580761 7001558, 584837 7004703, 587571 7012556, 591593 7017267, 590762 7022295, 594586 7051079, 593335 7071052, 596473 7076232, 594661 7085073, 595662 7089514, 601773 7092190, 608651 7098986, 618354 7103072, 635982 7106966, 640941 7110703, 645076 7109880, 653102 7112036, 656746 7111226, 669828 7115154, 672622 7112574, 675038 7103420, 678738 7096492, 677637 7085125, 684331 7082539, 689115 7074279, 691164 7074164, 694702 7077503, 706352 7082297, 713130 7081417, 723351 7068188, 722741 7061611, 725127 7050924, 727759 7049711, 732990 7053527, 738247 7052558, 741178 7049682, 746729 |
This file contains hidden or 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
| <OGRVRTDataSource> | |
| <OGRVRTUnionLayer name="zonage"> | |
| <SourceLayerFieldName>TYPE</SourceLayerFieldName> | |
| <OGRVRTLayer name="znieff1"> | |
| <SrcDataSource>WFS:https://ws.carmencarto.fr/WFS/119/fxx_inpn</SrcDataSource> | |
| <OpenOptions> | |
| <OOI key="EXPOSE_GML_ID">NO</OOI> | |
| </OpenOptions> | |
| <SrcLayer>Znieff1</SrcLayer> |
This file contains hidden or 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
| CREATE TABLE xml_mtd ("xml" xml); | |
| /*COPY distant XML file (with removing line feed) */ | |
| COPY xml_mtd FROM PROGRAM 'curl "https://www.geo2france.fr/geonetwork/srv/api/records/6ea5c1bd-b10b-4f7e-9139-2f878c63fc74/formatters/xml?attachment=true&approved=true" | tr -d "\n" '; | |
| /*Extract relevant data*/ | |
| WITH ns AS ( | |
| SELECT ARRAY[ | |
| ARRAY['gmd', 'http://www.isotc211.org/2005/gmd'], | |
| ARRAY['gco', 'http://www.isotc211.org/2005/gco'], |
This file contains hidden or 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
| """A lancer à la racine du dossier Taxhub, après avoir renseigner les accès du S3 | |
| dans le fichier de config et activé l'environnement virtuel""" | |
| import config | |
| import os | |
| import boto3 | |
| import mimetypes | |
| s3 = boto3.client('s3', | |
| aws_access_key_id=config.S3_KEY, |
This file contains hidden or 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
| --Selection des occurences d'Odonates [185356] et taxons inférieurs | |
| --A utiliser également pour sélectionner des espèces, afin d'inclure les éventuelles sous-espèces | |
| SELECT s.* | |
| FROM gn_synthese.synthese s | |
| JOIN taxonomie.taxref t USING (cd_nom) | |
| JOIN taxonomie.taxref_tree_parents ttp ON ttp.cd_nom_parent = t.cd_ref | |
| WHERE ttp.cd_nom_parent = 185356 | |
| --Exemple 2 : Liste des parents sous format JSON |
This file contains hidden or 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
| { | |
| "specific": { | |
| "cd_nom": { | |
| "type_widget": "taxonomy", | |
| "attribut_label": "Taxon", | |
| "type_util": "taxonomy", | |
| "required": true, | |
| "idComponent": "100" | |
| }, | |
| "id_nomenclature_nature_observation": { |
This file contains hidden or 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
| from utils_flask_sqla import response | |
| from datetime import date, time, datetime | |
| import uuid | |
| test_dict=dict( | |
| my_datetime=datetime.now(), | |
| my_uuid=uuid.uuid4(), | |
| my_time=time(12,54), |
This file contains hidden or 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
| /* | |
| --Fonction pas encore dans taxhub | |
| CREATE OR REPLACE FUNCTION taxonomie.find_all_taxons_parents(id integer) | |
| RETURNS TABLE(cd_nom integer, id_rang character varying) | |
| LANGUAGE plpgsql | |
| IMMUTABLE | |
| AS $function$ | |
| --Param : cd_nom d'un taxon quelque soit son rang | |
| --Retourne une table avec le cd_nom de tout les taxons parents et leur id_rang. | |
| --Retourne le cd_nom de tous les taxons parents sous forme d'un jeu de données utilisable comme une table. Les cd_nom sont ordonnées du plus bas vers le plus haut (Dumm) |
This file contains hidden or 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
| <!-- Matomo --> | |
| <script type="text/javascript"> | |
| var _paq = window._paq || []; | |
| /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | |
| _paq.push(['trackPageView']); | |
| _paq.push(['enableLinkTracking']); | |
| (function() { | |
| var u="//MY_MATOMO_URL/"; | |
| _paq.push(['setTrackerUrl', u+'piwik.php']); | |
| _paq.push(['setSiteId', 'MY_MATOMO_ID_SITE']); |
