﻿{"id":16028,"date":"2025-12-09T10:00:00","date_gmt":"2025-12-09T09:00:00","guid":{"rendered":"https:\/\/www.sigterritoires.fr\/?p=16028"},"modified":"2025-12-15T04:28:04","modified_gmt":"2025-12-15T03:28:04","slug":"de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/","title":{"rendered":"De Sentinel-2 \u00e0 1 m de r\u00e9solution : vers une analyse plus fine des milieux c\u00f4tiers"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contenu <\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Les_indices_calcules\" >Les indices calcul\u00e9s<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#NDVI_%E2%80%94_Normalized_Difference_Vegetation_Index\" >NDVI \u2014 Normalized Difference Vegetation Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#NDWI_%E2%80%94_Normalized_Difference_Water_Index\" >NDWI \u2014 Normalized Difference Water Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#MNDWI_%E2%80%94_Modified_NDWI\" >MNDWI \u2014 Modified NDWI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#BSI_%E2%80%94_Bare_Soil_Index\" >BSI \u2014 Bare Soil Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#NDBI_%E2%80%94_Normalized_Difference_Built-up_Index\" >NDBI \u2014 Normalized Difference Built-up Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#EVI_%E2%80%94_Enhanced_Vegetation_Index\" >EVI \u2014 Enhanced Vegetation Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#SAVI_%E2%80%94_Soil_Adjusted_Vegetation_Index\" >SAVI \u2014 Soil Adjusted Vegetation Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#UI_%E2%80%94_Urban_Index_ou_Urbanization_Index\" >UI \u2014 Urban Index (ou Urbanization Index)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#RDI_%E2%80%94_Redness_Difference_Index\" >RDI \u2014 Redness Difference Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Tableau_recapitulatif_complet\" >Tableau r\u00e9capitulatif complet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Palette_dindices_Sentinel\" >Palette d\u2019indices Sentinel<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Pourquoi_utiliser_un_masque_nuages\" >Pourquoi utiliser un masque nuages ?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Masque_nuages_pour_Sentinel-2_a_10_m\" >Masque nuages pour Sentinel-2 \u00e0 10 m<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#a_Masque_officiel_fourni_par_ESA\" >a) Masque officiel fourni par ESA<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#b_Methodes_basees_sur_les_indices_spectrales\" >b) M\u00e9thodes bas\u00e9es sur les indices spectrales<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#c_Algorithmes_automatiques\" >c) Algorithmes automatiques<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Comment_on_a_procede_dans_le_script_Colab\" >Comment on a proc\u00e9d\u00e9 dans le script Colab<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Etapes_principales\" >\u00c9tapes principales :<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Pourquoi_cette_methode\" >Pourquoi cette m\u00e9thode ?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Mode_operatoire\" >Mode op\u00e9ratoire<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/#Conclusion_vers_un_traitement_integre_des_images_Sentinel-2\" >Conclusion : vers un traitement int\u00e9gr\u00e9 des images Sentinel-2<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Dans deux articles pr\u00e9c\u00e9dents, nous avons explor\u00e9 comment passer des images Sentinel-2 standard (10 m de r\u00e9solution) \u00e0 une version super-r\u00e9solue \u00e0 1 m \u00e0 l\u2019aide du module <strong>S2DR3<\/strong>, d\u00e9velopp\u00e9 pour la recherche sur les coraux de Maurice. Cette \u00e9tape permet d\u2019obtenir un niveau de d\u00e9tail in\u00e9dit \u00e0 partir de donn\u00e9es ouvertes, en r\u00e9v\u00e9lant des structures fines souvent invisibles \u00e0 10 m : herbiers, platiers, zones sableuses, ou encore transitions subtiles entre v\u00e9g\u00e9tation et r\u00e9cif.<\/p>\n\n\n\n<p>Traditionnellement, le calcul des indices spectraux (NDVI, NDWI, MNDWI, BSI, NDBI, etc.) se fait dans <strong>QGIS<\/strong>, une fois les images t\u00e9l\u00e9charg\u00e9es et trait\u00e9es. Cependant, il est souvent plus efficace de <strong>g\u00e9n\u00e9rer ces indices directement \u00e0 la source<\/strong>, c\u2019est-\u00e0-dire d\u00e8s la production des images Sentinel-2 super-r\u00e9solues.<\/p>\n\n\n\n<p>Cette approche pr\u00e9sente plusieurs avantages :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Automatisation compl\u00e8te<\/strong> : les indices sont calcul\u00e9s d\u00e8s la cr\u00e9ation du jeu de donn\u00e9es, sans traitement manuel suppl\u00e9mentaire dans QGIS.<\/li>\n\n\n\n<li><strong>Coh\u00e9rence spatiale<\/strong> : les indices utilisent exactement les m\u00eames corrections radiom\u00e9triques et la m\u00eame super-r\u00e9solution que les bandes d\u2019origine.<\/li>\n\n\n\n<li><strong>Gain de temps<\/strong> : aucun export interm\u00e9diaire ni configuration manuelle d\u2019algorithmes raster.<\/li>\n\n\n\n<li><strong>Pr\u00e9paration pour l\u2019analyse<\/strong> : les r\u00e9sultats sont imm\u00e9diatement exploitables dans QGIS ou tout autre outil SIG.<\/li>\n<\/ul>\n\n\n\n<p>Le script pr\u00e9sent\u00e9 ci-dessous automatise ainsi l\u2019ensemble du flux :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>t\u00e9l\u00e9chargement et super-r\u00e9solution de la sc\u00e8ne Sentinel-2,<\/li>\n\n\n\n<li>g\u00e9n\u00e9ration d\u2019un <strong>masque de nuages intelligent<\/strong> (avec exclusion des zones de d\u00e9ferlement),<\/li>\n\n\n\n<li>calcul direct des principaux indices spectraux,<\/li>\n\n\n\n<li>cr\u00e9ation d\u2019un fichier multibande pr\u00eat \u00e0 l\u2019analyse.<\/li>\n<\/ol>\n\n\n\n<p>Cette int\u00e9gration simplifie consid\u00e9rablement le passage de l\u2019image brute aux cartes d\u2019interpr\u00e9tation, tout en garantissant la reproductibilit\u00e9 du traitement scientifique.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Les_indices_calcules\"><\/span>Les indices calcul\u00e9s<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"NDVI_%E2%80%94_Normalized_Difference_Vegetation_Index\"><\/span>NDVI \u2014 Normalized Difference Vegetation Index<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> mesurer la densit\u00e9 et la sant\u00e9 de la v\u00e9g\u00e9tation.<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>NDVI = \\frac{NIR &#8211; Red}{NIR + Red}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>NIR = bande proche infrarouge (B08)<\/li>\n\n\n\n<li>Red = bande rouge (B04)<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> -1 \u00e0 1 ; &gt;0.2 v\u00e9g\u00e9tation, &lt;0.1 sol nu ou eau.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> suivi de la v\u00e9g\u00e9tation, estimation de la biomasse, agriculture.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"NDWI_%E2%80%94_Normalized_Difference_Water_Index\"><\/span>NDWI \u2014 Normalized Difference Water Index<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> d\u00e9tecter la pr\u00e9sence d\u2019eau dans le paysage.<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>NDWI = \\frac{Green &#8211; NIR}{Green + NIR}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Green = bande verte (B03)<\/li>\n\n\n\n<li>NIR = bande proche infrarouge (B08)<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> positives = eau, n\u00e9gatives = sol\/v\u00e9g\u00e9tation.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> cartographie des lacs, rivi\u00e8res, zones humides.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"MNDWI_%E2%80%94_Modified_NDWI\"><\/span>MNDWI \u2014 Modified NDWI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> mieux s\u00e9parer l\u2019eau des zones urbaines ou b\u00e2ti.<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>MNDWI = \\frac{Green &#8211; SWIR1}{Green + SWIR1}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SWIR1 = bande courte longueur d\u2019onde (B11)<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> positives = eau ; am\u00e9liore la d\u00e9tection par rapport au NDWI.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> suivi des plans d\u2019eau en zone urbaine ou c\u00f4ti\u00e8re.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"BSI_%E2%80%94_Bare_Soil_Index\"><\/span>BSI \u2014 Bare Soil Index<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> d\u00e9tecter les sols nus et les zones d\u00e9nud\u00e9es.<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>BSI = \\frac{(SWIR1 + Red) &#8211; (NIR + Blue)}{(SWIR1 + Red) + (NIR + Blue)}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Blue = bande bleue (B02)<\/li>\n\n\n\n<li>Red = B04, NIR = B08, SWIR1 = B11<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> plus BSI est \u00e9lev\u00e9, plus la surface est d\u00e9gag\u00e9e.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> suivi des sols nus, zones urbaines, zones min\u00e9rales.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"NDBI_%E2%80%94_Normalized_Difference_Built-up_Index\"><\/span>NDBI \u2014 Normalized Difference Built-up Index<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> d\u00e9tecter les zones b\u00e2ties ou imperm\u00e9abilis\u00e9es.<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>NDBI = \\frac{SWIR1 &#8211; NIR}{SWIR1 + NIR}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Valeurs :<\/strong> positives = b\u00e2ti, n\u00e9gatives = v\u00e9g\u00e9tation ou eau.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> cartographie urbaine, suivi de l\u2019extension des villes.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"EVI_%E2%80%94_Enhanced_Vegetation_Index\"><\/span>EVI \u2014 Enhanced Vegetation Index<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> am\u00e9liorer la sensibilit\u00e9 de NDVI dans les zones tr\u00e8s denses en v\u00e9g\u00e9tation et corriger l\u2019effet atmosph\u00e9rique.<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>EVI = 2.5 \\cdot \\frac{NIR &#8211; Red}{NIR + 6 \\cdot Red &#8211; 7.5 \\cdot Blue + 1}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Blue = B02, Red = B04, NIR = B08<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> -1 \u00e0 1, similaire \u00e0 NDVI mais plus robuste en zones denses.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> for\u00eats, zones tropicales, suivi de la sant\u00e9 de la v\u00e9g\u00e9tation.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"SAVI_%E2%80%94_Soil_Adjusted_Vegetation_Index\"><\/span><strong>SAVI \u2014 Soil Adjusted Vegetation Index<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> mesurer la v\u00e9g\u00e9tation en corrigeant l\u2019effet du sol (utile dans les zones clairsem\u00e9es).<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>SAVI = \\frac{(NIR &#8211; Red) \\cdot (1 + L)}{NIR + Red + L}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<p>o\u00f9 :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>NIR<\/code> = bande proche infrarouge (Sentinel-2 B08)<\/li>\n\n\n\n<li><code>Red<\/code> = bande rouge (B04)<\/li>\n\n\n\n<li><code>L<\/code> = facteur de correction du sol, souvent 0.5<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> -1 \u00e0 1, comme le NDVI, mais moins sensible au sol nu.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> v\u00e9g\u00e9tation faible ou clairsem\u00e9e (prairies, savanes, zones c\u00f4ti\u00e8res avec faible couverture v\u00e9g\u00e9tale).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"UI_%E2%80%94_Urban_Index_ou_Urbanization_Index\"><\/span><strong>UI \u2014 Urban Index (ou Urbanization Index)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> d\u00e9tecter et quantifier les zones urbaines.<\/li>\n\n\n\n<li><strong>Formule simple :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>UI = \\frac{SWIR &#8211; NIR}{SWIR + NIR}<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SWIR = bande courte longueur d\u2019onde (Sentinel-2 B11 ou B12)<\/li>\n\n\n\n<li>NIR = proche infrarouge (B08)<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> positives pour les zones imperm\u00e9abilis\u00e9es ou construites, faibles\/n\u00e9gatives pour v\u00e9g\u00e9tation ou eau.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> suivi de l\u2019urbanisation, d\u00e9tection de b\u00e2timents ou surfaces artificielles.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"RDI_%E2%80%94_Redness_Difference_Index\"><\/span><strong>RDI \u2014 Redness Difference Index<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>But :<\/strong> d\u00e9tecter les sols nus ou les zones riches en oxyde de fer (\u00ab rouge \u00bb) dans le paysage.<\/li>\n\n\n\n<li><strong>Formule :<\/strong><\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>RDI = Red &#8211; Green<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Red = bande rouge (B04), Green = bande verte (B03)<\/li>\n\n\n\n<li><strong>Valeurs :<\/strong> plus le sol est \u00ab rouge \u00bb, plus le RDI est \u00e9lev\u00e9.<\/li>\n\n\n\n<li><strong>Usage :<\/strong> suivi de l\u2019\u00e9rosion, sols nus, zones min\u00e9rales ou arides.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Tableau_recapitulatif_complet\"><\/span>Tableau r\u00e9capitulatif complet<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indice<\/th><th>Objectif<\/th><th>Formule<\/th><th>Usage typique<\/th><\/tr><\/thead><tbody><tr><td>NDVI<\/td><td>V\u00e9g\u00e9tation<\/td><td>(NIR\u2212Red)\/(NIR+Red)<\/td><td>Surveiller la v\u00e9g\u00e9tation, agriculture<\/td><\/tr><tr><td>EVI<\/td><td>V\u00e9g\u00e9tation am\u00e9lior\u00e9e<\/td><td>2.5*(NIR-Red)\/(NIR+6<em>Red-7.5<\/em>Blue+1)<\/td><td>Zones denses, for\u00eats tropicales<\/td><\/tr><tr><td>SAVI<\/td><td>V\u00e9g\u00e9tation<\/td><td>(NIR\u2212Red)*(1+L)\/(NIR+Red+L)<\/td><td>Zones clairsem\u00e9es, sols visibles<\/td><\/tr><tr><td>NDWI<\/td><td>Eau<\/td><td>(Green\u2212NIR)\/(Green+NIR)<\/td><td>Cartographie des lacs, rivi\u00e8res<\/td><\/tr><tr><td>MNDWI<\/td><td>Eau modifi\u00e9<\/td><td>(Green\u2212SWIR1)\/(Green+SWIR1)<\/td><td>Eau en zones urbaines ou c\u00f4ti\u00e8res<\/td><\/tr><tr><td>BSI<\/td><td>Sol nu<\/td><td>((SWIR1+Red)-(NIR+Blue))\/((SWIR1+Red)+(NIR+Blue))<\/td><td>Zones d\u00e9nud\u00e9es, sols nus<\/td><\/tr><tr><td>NDBI<\/td><td>Urbain<\/td><td>(SWIR1\u2212NIR)\/(SWIR1+NIR)<\/td><td>D\u00e9tection des b\u00e2timents, villes<\/td><\/tr><tr><td>UI<\/td><td>Urbain<\/td><td>(SWIR1\u2212NIR)\/(SWIR1+NIR)<\/td><td>Cartographie urbaine<\/td><\/tr><tr><td>RDI<\/td><td>Sol\/rouge<\/td><td>Red\u2212Green<\/td><td>Suivi sols nus ou oxyde de fer<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Palette_dindices_Sentinel\"><\/span>P<strong>alette d\u2019indices Sentinel<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Chaque indice est pr\u00e9sent\u00e9 avec :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>son <strong>nom et acronyme<\/strong>,<\/li>\n\n\n\n<li><strong>type de surface cibl\u00e9<\/strong> (v\u00e9g\u00e9tation, eau, sol, urbain),<\/li>\n\n\n\n<li><strong>valeurs typiques \/ \u00e9chelle<\/strong>,<\/li>\n\n\n\n<li><strong>couleur repr\u00e9sentative<\/strong> pour visualisation sur carte (par exemple NDVI \u2192 vert, NDWI \u2192 bleu, BSI \u2192 marron clair, etc.).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indice<\/th><th>Type<\/th><th>Valeurs<\/th><th>Couleur repr\u00e9sentative<\/th><\/tr><\/thead><tbody><tr><td>NDVI<\/td><td>V\u00e9g\u00e9tation<\/td><td>-1 \u2192 1 (vert fonc\u00e9 = dense, jaune = clairsem\u00e9)<\/td><td> Vert<\/td><\/tr><tr><td>EVI<\/td><td>V\u00e9g\u00e9tation<\/td><td>-1 \u2192 1 (similaire NDVI, plus sensible)<\/td><td>Vert clair<\/td><\/tr><tr><td>SAVI<\/td><td>V\u00e9g\u00e9tation<\/td><td>-1 \u2192 1 (corrig\u00e9 sol)<\/td><td>Vert-jaune<\/td><\/tr><tr><td>NDWI<\/td><td>Eau<\/td><td>-1 \u2192 1 (positif = eau)<\/td><td>Bleu clair<\/td><\/tr><tr><td>MNDWI<\/td><td>Eau modifi\u00e9<\/td><td>-1 \u2192 1<\/td><td>Bleu turquoise<\/td><\/tr><tr><td>BSI<\/td><td>Sol nu<\/td><td>-1 \u2192 1 (\u00e9lev\u00e9 = sol clair)<\/td><td>Beige \/ Marron<\/td><\/tr><tr><td>NDBI<\/td><td>Urbain<\/td><td>-1 \u2192 1 (positif = b\u00e2ti)<\/td><td>Gris clair<\/td><\/tr><tr><td>UI<\/td><td>Urbain<\/td><td>-1 \u2192 1<\/td><td>Gris moyen<\/td><\/tr><tr><td>RDI<\/td><td>Sol\/rouge<\/td><td>variable, plus \u00e9lev\u00e9 = rouge<\/td><td>Rouge brique<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pourquoi_utiliser_un_masque_nuages\"><\/span>Pourquoi utiliser un masque nuages ?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Les <strong>nuages et leurs ombres<\/strong> posent probl\u00e8me en imagerie satellite car :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Ils <strong>obscurcissent les surfaces<\/strong> : sol, v\u00e9g\u00e9tation, eau, coraux.<\/li>\n\n\n\n<li>Ils <strong>perturbent les indices<\/strong> (NDVI, NDWI\u2026) car les valeurs radiom\u00e9triques ne correspondent pas \u00e0 la surface r\u00e9elle.<\/li>\n\n\n\n<li>Les zones couvertes de nuages peuvent g\u00e9n\u00e9rer des <strong>valeurs aberrantes<\/strong> : tr\u00e8s hautes ou tr\u00e8s basses, rendant les calculs de tendances fauss\u00e9s.<\/li>\n<\/ol>\n\n\n\n<p>Donc, pour <strong>l\u2019analyse d\u2019indices et la d\u00e9tection de caract\u00e9ristiques au sol ou dans l\u2019eau<\/strong>, il est <strong>important de masquer ces pixels<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Masque_nuages_pour_Sentinel-2_a_10_m\"><\/span>Masque nuages pour Sentinel-2 \u00e0 10 m<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Sentinel-2 propose plusieurs options pour d\u00e9tecter les nuages \u00e0 sa r\u00e9solution native (10 m, 20 m ou 60 m selon la bande) :<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"a_Masque_officiel_fourni_par_ESA\"><\/span>a) Masque officiel fourni par ESA<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fichier <strong>QA60<\/strong> dans les produits Sentinel-2 L2A : masque binaire 10 m indiquant nuages et cirrus.<\/li>\n\n\n\n<li>Avantages : fiable et simple \u00e0 appliquer.<\/li>\n\n\n\n<li>Inconv\u00e9nients : masque grossier \u2192 ne diff\u00e9rencie pas toujours bien nuages fins ou ombres.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"b_Methodes_basees_sur_les_indices_spectrales\"><\/span>b) M\u00e9thodes bas\u00e9es sur les indices spectrales<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Bande SWIR et NIR<\/strong> : les nuages sont tr\u00e8s r\u00e9fl\u00e9chissants dans le visible mais moins dans le SWIR.<\/li>\n\n\n\n<li>Exemple d\u2019index simple :<\/li>\n<\/ul>\n\n\n\n<p>.<\/p>\n\n\n\n\\(<br>CI = \\frac{(B02 + B03 + B04)}{3} &#8211; B11<br>\\)\n\n\n\n<p>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pixels clairs dans le visible et faibles dans SWIR \u2192 probablement des nuages.<\/li>\n\n\n\n<li>Permet de cr\u00e9er un <strong>masque nuages adapt\u00e9 au contexte<\/strong>, utile si on veut d\u00e9tecter nuages et cirrus locaux.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"c_Algorithmes_automatiques\"><\/span>c) Algorithmes automatiques<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fmask ou s2cloudless : d\u00e9tection sophistiqu\u00e9e utilisant machine learning et spectres multispectraux.<\/li>\n\n\n\n<li>Pratique pour grandes s\u00e9ries temporelles.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Comment_on_a_procede_dans_le_script_Colab\"><\/span>Comment on a proc\u00e9d\u00e9 dans le script Colab<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Dans lescript, on <strong>n\u2019a pas utilis\u00e9 le QA60 officiel<\/strong>, mais plut\u00f4t une <strong>d\u00e9tection par indices spectral et texture locale<\/strong>, adapt\u00e9e aux zones c\u00f4ti\u00e8res et \u00e0 la super-r\u00e9solution 1 m :<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Etapes_principales\"><\/span>\u00c9tapes principales :<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Normalisation des bandes<\/strong> :<br> <code>blue_n = blue \/ max <\/code><br> <code>green_n = green \/ max <\/code><br> <code>red_n = red \/ max <\/code><br> <code>nir_n = nir \/ max<\/code><br><code>swir1_n = swir1 \/ max<\/code> \u2192 toutes les valeurs entre 0 et 1 pour homog\u00e9n\u00e9it\u00e9.<\/li>\n\n\n\n<li><strong>Condition \u201cnuage initial\u201d<\/strong> bas\u00e9e sur 4 crit\u00e8res :<ul><li>Tr\u00e8s clair dans le visible (<code>albedo_vis &gt; 0.35<\/code>)SWIR1 \u00e9lev\u00e9 (<code>swir1_n &gt; 0.15<\/code>)Ratio bleu\/rouge \u00e9lev\u00e9 (<code>blue_n \/ red_n &gt; 1.2<\/code>)NIR \u00e9lev\u00e9 (<code>nir_n &gt; 0.25<\/code>)<\/li><\/ul>\u2192 pixels respectant <strong>au moins 3\/4 crit\u00e8res<\/strong> sont consid\u00e9r\u00e9s comme nuages.<\/li>\n\n\n\n<li><strong>Masque \u201cfoam\u201d pour les zones marines<\/strong> :\n<ul class=\"wp-block-list\">\n<li>On d\u00e9tecte la <strong>mousse \/ d\u00e9ferlement des vagues<\/strong> via l\u2019<strong>\u00e9cart-type local<\/strong> sur la bande bleue et l\u2019<strong>alb\u00e9do visible<\/strong>.<\/li>\n\n\n\n<li>On retire ces pixels du masque nuages : <br><code>cloud_final = cloud_init &amp; (~foam_mask)<\/code><\/li>\n\n\n\n<li>Cela \u00e9vite de masquer la zone corallienne ou la mer agit\u00e9e.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Filtrage des petites composantes<\/strong> :\n<ul class=\"wp-block-list\">\n<li>Supprime les nuages tr\u00e8s petits qui pourraient \u00eatre bruit \u2192 on garde uniquement les objets &gt; 500 pixels.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>R\u00e9sultat final<\/strong> :\n<ul class=\"wp-block-list\">\n<li><code>cloud_mask<\/code> = masque nuages <strong>nettoy\u00e9<\/strong>, pr\u00eat \u00e0 \u00eatre utilis\u00e9 pour <strong>exclure les pixels nuageux lors du calcul des indices<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pourquoi_cette_methode\"><\/span>Pourquoi cette m\u00e9thode ?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>La sc\u00e8ne est <strong>super-r\u00e9solue (1 m)<\/strong> \u2192 le QA60 officiel n\u2019existe pas \u00e0 cette r\u00e9solution.<\/li>\n\n\n\n<li>La zone est <strong>c\u00f4ti\u00e8re \/ corallienne<\/strong> \u2192 mousse et d\u00e9ferlement doivent \u00eatre distingu\u00e9s des nuages.<\/li>\n\n\n\n<li>L\u2019approche spectral + texture locale permet :\n<ul class=\"wp-block-list\">\n<li>d\u00e9tecter les nuages<\/li>\n\n\n\n<li>ne pas masquer l\u2019eau ou la mousse<\/li>\n\n\n\n<li>travailler sur des images super-r\u00e9solues g\u00e9n\u00e9r\u00e9es par S2DR3<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mode_operatoire\"><\/span>Mode op\u00e9ratoire<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Ouvrez Google Colab: <a href=\"https:\/\/colab.research.google.com\">https:\/\/colab.research.google.com<\/a><\/p>\n\n\n\n<p>Dans Collab, liez votre notebook \u00e0 votre Google Drive<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"282\" data-attachment-id=\"15846\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/tutoriel-utiliser-s2dr3-dans-google-colab-pour-letude-des-coraux-a-maurice\/collab1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?fit=2474%2C1090&amp;ssl=1\" data-orig-size=\"2474,1090\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"collab1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?fit=640%2C282&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?resize=640%2C282&#038;ssl=1\" alt=\"\" class=\"wp-image-15846\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?resize=1024%2C451&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?resize=300%2C132&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?resize=768%2C338&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?resize=1536%2C677&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?resize=2048%2C902&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab1.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/figure>\n\n\n\n<p>Maintenant, pour que le traitement ne prenne pas trop de temps, vous devez activer un GPU dans l&rsquo;environnement d&rsquo;ex\u00e9cution. Regardez dans le coin inf\u00e9rieur droit de votre notebook, vous verrez quelque chose comme \u00ab Python 3 \u00bb avec une ic\u00f4ne de puce. Cliquez dessus et s\u00e9lectionnez Changer le type d&rsquo;environnement d&rsquo;ex\u00e9cution. Une fen\u00eatre s&rsquo;ouvrira dans laquelle vous devrez rechercher Acc\u00e9l\u00e9rateur mat\u00e9riel et s\u00e9lectionner GPU T4. Enregistrez les modifications et le notebook red\u00e9marrera automatiquement avec la nouvelle configuration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"615\" data-attachment-id=\"15847\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/tutoriel-utiliser-s2dr3-dans-google-colab-pour-letude-des-coraux-a-maurice\/collab3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?fit=1402%2C1347&amp;ssl=1\" data-orig-size=\"1402,1347\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"collab3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?fit=640%2C615&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?resize=640%2C615&#038;ssl=1\" alt=\"\" class=\"wp-image-15847\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?resize=1024%2C984&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?resize=300%2C288&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?resize=768%2C738&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?w=1402&amp;ssl=1 1402w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/10\/collab3.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/figure>\n\n\n\n<p>Copiez ce code dans une nouvelle cellule de votre bloc-notes et ex\u00e9cutez-le :<\/p>\n\n\n\n<p><strong><div class='stb-container stb-style-black stb-caption-box'><div class='stb-caption'><div class='stb-logo'><img class='stb-logo__image' src='data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN\/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz\/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH\/w\/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMD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wa566U81L4G8BPL\/A+R\/BgAzCInEE2+\/LgAAAABJRU5ErkJggg==' alt='img'\/><\/div><div class='stb-caption-content'>script Colab<\/div><div class='stb-tool'><\/div><\/div><div class='stb-content'><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># =========================================================\n#   S2DR3 + Calcul indices Sentinel-2 + Masque nuages\n#   \u00c9tude des coraux \u00e0 Blue Bay \/ \u00cele aux Aigrettes\n# =========================================================\n\n# --- 1. Monter Google Drive ---\nfrom google.colab import drive\ndrive.mount('\/content\/drive')\n\n# Cr\u00e9e un dossier pour les r\u00e9sultats\n!mkdir -p \/content\/drive\/MyDrive\/Sentinel2_Coraux_S2DR3\/output\n!ln -s \/content\/drive\/MyDrive\/Sentinel2_Coraux_S2DR3\/output \/content\/output\n\n# --- 2. Installer le paquet S2DR3 ---\n!pip -q install https:\/\/storage.googleapis.com\/0x7ff601307fa5\/s2dr3-20250905.1-cp312-cp312-linux_x86_64.whl\n\n# --- 3. Importer le module principal ---\nimport s2dr3.inferutils\nimport os, glob, numpy as np, rasterio, scipy.ndimage as ndi\nfrom skimage.transform import resize\n\n# --- 4. D\u00e9finir la zone d'int\u00e9r\u00eat et la date ---\nlonlat = (57.73, -20.44)\ndate = '2025-10-09'\n\n# --- 5. Lancer le traitement S2DR3 ---\ns2dr3.inferutils.test(lonlat, date)\n\n# =========================================================\n#   6. Lecture du fichier _MS.tif\n# =========================================================\nroot_dir = '\/content\/output'\nfiles = sorted(glob.glob(os.path.join(root_dir, '**\/*_MS.tif'), recursive=True),\n               key=os.path.getmtime, reverse=True)\nif not files:\n    raise FileNotFoundError(\"&#x274c; Aucun fichier *_MS.tif trouv\u00e9 dans \/content\/output\")\nms_path = files&#091;0]\noutdir = os.path.dirname(ms_path)\nprint(f\" Fichier trouv\u00e9 : {os.path.basename(ms_path)}\")\nprint(f\" Dossier : {outdir}\")\n\n# Lecture des bandes\nwith rasterio.open(ms_path) as <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/introduction-aux-systemes-de-reference\/\">src<\/a>:\n    profile = src.profile\n    n_bands = src.count\n    print(f\"Nombre de bandes d\u00e9tect\u00e9es : {n_bands}\")\n    bands = &#091;src.read(i).astype('float32') for i in range(1, n_bands+1)]\n\ndef get_band(index, name):\n    try:\n        return bands&#091;index-1]\n    except IndexError:\n        print(f\" Bande {name} manquante, remplac\u00e9e par z\u00e9ro.\")\n        return np.zeros_like(bands&#091;0])\n\n# Attribution bandes principales Sentinel-2\nblue  = get_band(1, \"B02\")\ngreen = get_band(2, \"B03\")\nred   = get_band(3, \"B04\")\nnir   = get_band(4, \"B08\")\nswir1 = get_band(9, \"B11\")\nswir2 = get_band(10, \"B12\")\n\n# =========================================================\n#   7. Calcul des indices\n# =========================================================\ndef safe_div(a, b, mask=None):\n    res = np.where((b!=0) &amp; (~np.isnan(a)) &amp; (~np.isnan(b)), a\/b, 0)\n    if mask is not None:\n        res&#091;mask] = np.nan\n    return res\n\nL = 0.5  # facteur SAVI\n\nindices = {\n    'NDVI' : safe_div(nir - red, nir + red),\n    'NDWI' : safe_div(green - nir, green + nir),\n    'MNDWI': safe_div(green - swir1, green + swir1),\n    'BSI'  : safe_div((swir1 + red) - (nir + blue), (swir1 + red) + (nir + blue)),\n    'NDBI' : safe_div(swir1 - nir, swir1 + nir),\n    'EVI'  : 2.5 * safe_div((nir - red), (nir + 6*red - 7.5*blue + 1)),\n    'SAVI' : safe_div((nir - red) * (1 + L), (nir + red + L)),\n    'UI'   : safe_div(swir1 - nir, swir1 + nir),\n    'RDI'  : safe_div(red - green, red + green)\n}\n\n# =========================================================\n#   8. Masque nuages l\u00e9ger adapt\u00e9 1 m\n# =========================================================\neps = 1e-8\nblue_n, green_n, red_n, nir_n, swir1_n = &#091;x\/(np.nanmax(x)+eps) for x in &#091;blue, green, red, nir, swir1]]\nalbedo_vis = (blue_n + green_n + red_n)\/3\n\ncond_bright = albedo_vis &gt; 0.35\ncond_swir = swir1_n &gt; 0.15\ncond_ratio = (blue_n\/(red_n+1e-6)) &gt; 1.2\ncond_nir = nir_n &gt; 0.25\ncloud_init = (cond_bright.astype(int) + cond_swir.astype(int) + cond_ratio.astype(int) + cond_nir.astype(int)) &gt;= 3\n\nMNDWI_calc = np.where((green + swir1)!=0, (green - swir1)\/(green + swir1), -1)\nwater_mask = MNDWI_calc &gt; 0\n\nsize = 7\nmean = ndi.uniform_filter(blue_n, size=size)\nmean_sq = ndi.uniform_filter(blue_n**2, size=size)\nlocal_std = np.sqrt(np.maximum(0, mean_sq - mean**2))\nfoam_mask = water_mask &amp; (albedo_vis&gt;0.25) &amp; (local_std&gt;0.03)\n\ncloud_mask = cloud_init &amp; (~foam_mask)\nlabel_im, nb = ndi.label(cloud_mask)\nsizes = ndi.sum(cloud_mask, label_im, range(1, nb+1))\nmask_keep = np.zeros(nb+1, dtype=bool)\nmask_keep&#091;1:] = sizes &gt;= 500\ncloud_mask = mask_keep&#091;label_im].astype(bool)\n\nprint(f\" Nuages finaux : {cloud_mask.sum()} pixels\")\n\n# =========================================================\n#   9. Sauvegarde indices individuels\n# =========================================================\nfor name, data in indices.items():\n    out_path = os.path.join(outdir, f\"{name}.tif\")\n    profile_idx = profile.copy()\n    profile_idx.update(dtype='float32', count=1, compress='lzw', nodata=None)\n    with rasterio.open(out_path, 'w', **profile_idx) as dst:\n        dst.write(data.astype('float32'), 1)\n    print(f\" {name} enregistr\u00e9 \u2192 {out_path}\")\n\n# =========================================================\n#   10. Cr\u00e9ation du stack multibande robuste\n# =========================================================\nall_layers = list(indices.values()) + &#091;cloud_mask.astype('float32')]\nband_names = list(indices.keys()) + &#091;'CLOUD_MASK']\n\nref_shape = indices&#091;'NDVI'].shape\nfor i, layer in enumerate(all_layers):\n    if layer.shape != ref_shape:\n        print(f\" Redimensionnement couche {band_names&#091;i]} de {layer.shape} \u2192 {ref_shape}\")\n        all_layers&#091;i] = resize(layer, ref_shape, order=0, preserve_range=True, anti_aliasing=False).astype('float32')\n\nprofile_stack = profile.copy()\nprofile_stack.update(\n    count=len(all_layers),\n    dtype='float32',\n    compress='lzw',\n    nodata=None,\n    height=ref_shape&#091;0],\n    width=ref_shape&#091;1]\n)\n\nstack_path = os.path.join(outdir, 'indices_stack.tif')\nwith rasterio.open(stack_path, 'w', **profile_stack) as dst:\n    for i, layer in enumerate(all_layers, start=1):\n        dst.write(layer.astype('float32'), i)\n        dst.set_band_description(i, band_names&#091;i-1])\n\nif os.path.exists(stack_path):\n    print(f\"\\n Fichier multibande cr\u00e9\u00e9 avec succ\u00e8s : {stack_path}\")\n    print(\" Bandes : \" + ', '.join(band_names))\nelse:\n    print(f\"\\n \u00c9chec de cr\u00e9ation de {stack_path}\")\n\nprint(\"\\n Traitement complet termin\u00e9.\")<\/code><\/pre>\n\n\n\n<p><\/div><\/div><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"326\" data-attachment-id=\"16029\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/sent2b\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?fit=2560%2C1302&amp;ssl=1\" data-orig-size=\"2560,1302\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"sent2B\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?fit=640%2C326&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B.jpg?resize=640%2C326&#038;ssl=1\" alt=\"\" class=\"wp-image-16029\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?resize=1024%2C521&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?resize=300%2C153&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?resize=768%2C391&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?resize=1536%2C781&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?resize=2048%2C1042&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2B-scaled.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/figure>\n\n\n\n<p>Une fois ex\u00e9cut\u00e9 vous aurez les fichiers .tif dans votre google drive<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"346\" data-attachment-id=\"16030\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/de-sentinel-2-a-1-m-de-resolution-vers-une-analyse-plus-fine-des-milieux-cotiers\/sent2a\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?fit=1754%2C948&amp;ssl=1\" data-orig-size=\"1754,948\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"sent2A\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?fit=640%2C346&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?resize=640%2C346&#038;ssl=1\" alt=\"\" class=\"wp-image-16030\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?resize=1024%2C553&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?resize=300%2C162&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?resize=768%2C415&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?resize=1536%2C830&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?w=1754&amp;ssl=1 1754w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sent2A.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion_vers_un_traitement_integre_des_images_Sentinel-2\"><\/span>Conclusion : vers un traitement int\u00e9gr\u00e9 des images Sentinel-2<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>L\u2019int\u00e9gration du calcul des indices spectraux directement dans le processus de super-r\u00e9solution repr\u00e9sente une \u00e9volution naturelle du traitement des donn\u00e9es Sentinel-2.<br>En automatisant \u00e0 la fois la g\u00e9n\u00e9ration de l\u2019image \u00e0 1 m et la production des indices, on obtient un jeu de donn\u00e9es <strong>homog\u00e8ne, complet et imm\u00e9diatement exploitable<\/strong> pour l\u2019analyse spatiale.<\/p>\n\n\n\n<p>Appliqu\u00e9e aux milieux c\u00f4tiers de Maurice et de Rodrigues, cette m\u00e9thode ouvre de nouvelles perspectives :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>suivi de la <strong>v\u00e9g\u00e9tation littorale et des mangroves<\/strong>,<\/li>\n\n\n\n<li>observation des <strong>platiers r\u00e9cifaux et des herbiers marins<\/strong>,<\/li>\n\n\n\n<li>d\u00e9tection des <strong>zones de turbidit\u00e9 ou d\u2019envasement<\/strong>,<\/li>\n\n\n\n<li>cartographie des <strong>changements d\u2019occupation du sol<\/strong> dans les zones c\u00f4ti\u00e8res sensibles.<\/li>\n<\/ul>\n\n\n\n<p>En r\u00e9unissant toutes ces \u00e9tapes dans un seul flux reproductible, ce script devient un outil de recherche et de suivi environnemental particuli\u00e8rement adapt\u00e9 aux \u00eeles tropicales.<br>Il d\u00e9montre aussi que les outils libres (Sentinel-2, Google Colab, QGIS) permettent aujourd\u2019hui d\u2019atteindre un niveau d\u2019analyse spatiale autrefois r\u00e9serv\u00e9 aux plateformes professionnelles.<\/p>\n\n\n\n<p>Prochaine \u00e9tape : int\u00e9grer ces indices dans une <strong>analyse chronologique multi-dates<\/strong>, afin de suivre l\u2019\u00e9volution saisonni\u00e8re ou post-cyclonique des habitats c\u00f4tiers.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dans deux articles pr\u00e9c\u00e9dents, nous avons explor\u00e9 comment passer des images Sentinel-2 standard (10 m de r\u00e9solution) \u00e0 une version super-r\u00e9solue \u00e0 1 m \u00e0 l\u2019aide du module S2DR3, d\u00e9velopp\u00e9 pour la recherche sur les coraux&hellip;<\/p>\n","protected":false},"author":1,"featured_media":16031,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3853,62],"tags":[3869,279,58,3787],"class_list":["post-16028","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iafr","category-qgis-2","tag-ia","tag-plugin","tag-qgis","tag-sentinel-2"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/Sentinel-2.jpg?fit=2126%2C1594&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-4aw","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/16028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=16028"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/16028\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media\/16031"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=16028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=16028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=16028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}