Introduction

Objet

L6ECSIG Construction et utilisation des SIG 2025/26

(Gr. 6 et , Jeudi 16h30 - 19h30 Salle 217 sur le campus de Clignancourt)

L’idée du cours est de consolider les acquis de la L2 et de familiariser les étudiants à Arcgis pro et au codage avec R (une plateforme de versioning très utilisée.)

La thématique utilisée est Commune pauvre et/ou riche ?

Données

  • limites communes dans OSM

  • carreaux filosofi 200 m (données infra communales)

  • données ofgl (données communales)

Déroulé

Code
data <- read.csv("data/deroule.csv", header = T, fileEncoding = "UTF-8")
knitr::kable(data)
num date détail.prévu exercice.pts
TD1 29.01.26 Recherches de données 3
TD2 05.02.26 Géoréférencement 1
TD3 12.02.26 Traitements vectoriels 2
TD4 19.02.26 traitements rasters 1
TD5 26.02.26 MNS et MNT 1
TD6 12.03.26 Jointures attributaires et spatiales 2
TD7 19.03.26 Réseaux NA
TD8 26.03.26 Markdown + structure projet ET objets dans R : vecteurs et dataframe NA
TD9 02.04.26 intégrer des données spatiales : format gpkg NA
TD10 09.04.26 Géotraitement NA
TD11 16.04.26 Résultat (affichage carte) + oral de présentation des projets (5 mn par groupe) NA
TD12 07.05.26 Rendu de projet (aucun retard toléré) + révisions partiel NA

Evaluation

régime du contrôle continu,

Deux notes :

  • une partiel

  • une note maison (+ les exercices pour moitié de la note maison)

Le partiel sera sur machine d’une durée de 1h30 : - un exercice sous Arcgis Pro (10 pt) - et un autre sous R(10 pt) (avec un rendu en .pdf)

Données

Il s’agit de vos données pour la commune choisie. Principalement :

  • OFGL

  • Filosofi

  • communes choisies

Code
choix <- read.csv("data/codeINSEEetudiant.csv")
choix <- c(choix$choix.de.la.commune..code.INSEE., choix$choix.de.la.commune..code.INSEE..1)
# on enlève les NA et les villes identiques
choix <- unique(choix[!is.na(choix)])
choix <- c(choix,93010)
write.table(choix, "data/choix.csv", fileEncoding = "UTF-8", row.names = F, col.names = F)

35 communes

Récupération des carreaux 200 m pour les communes

Code
library(sf)
filosofi <- st_read("data/gros/carreaux_200m_met.gpkg", quiet=T)
filosofi$dpt <- substring(filosofi$lcog_geo,1,2) 
dpt <- unique(substring(choix, 1,2)) 
choisir <- function(dpt){
  data <- filosofi [grep(dpt, filosofi$dpt),]
  st_write(data  , "data/gros/construction.gpkg", dpt, delete_layer = T, quiet=T)
}
res <- lapply(dpt, choisir)

Attention au 97, il faut prendre un autre fichier filosofi

Code
library(sf)
Linking to GEOS 3.13.1, GDAL 3.11.4, PROJ 9.7.0; sf_use_s2() is TRUE
Code
mart <- st_read("data/gros/carreaux_200m_mart.gpkg", quiet=T)
mart <- mart [mart$lcog_geo == choix [2],]
st_write(mart,"data/gros/construction.gpkg", "97", delete_layer = T)
Deleting layer `97' using driver `GPKG'
Writing layer `97' to data source `data/gros/construction.gpkg' using driver `GPKG'
Writing 515 features with 34 fields and geometry type Polygon.

Cartographie

Code
library(sf)
library(mapsf)
st_layers("data/gros/construction.gpkg")
Driver: GPKG 
Available layers:
   layer_name geometry_type features fields              crs_name
1          73       Polygon    16387     35 RGF93 v1 / Lambert-93
2          93       Polygon     4238     35 RGF93 v1 / Lambert-93
3          31       Polygon    42359     35 RGF93 v1 / Lambert-93
4          95       Polygon     8763     35 RGF93 v1 / Lambert-93
5          64       Polygon    38211     35 RGF93 v1 / Lambert-93
6          44       Polygon    45780     35 RGF93 v1 / Lambert-93
7          69       Polygon    28758     35 RGF93 v1 / Lambert-93
8          92       Polygon     3288     35 RGF93 v1 / Lambert-93
9          28       Polygon    17735     35 RGF93 v1 / Lambert-93
10         78       Polygon    15076     35 RGF93 v1 / Lambert-93
11         33       Polygon    54580     35 RGF93 v1 / Lambert-93
12         50       Polygon    41602     35 RGF93 v1 / Lambert-93
13         49       Polygon    38684     35 RGF93 v1 / Lambert-93
14         72       Polygon    36668     35 RGF93 v1 / Lambert-93
15         63       Polygon    29873     35 RGF93 v1 / Lambert-93
16         94       Polygon     4207     35 RGF93 v1 / Lambert-93
17         13       Polygon    32947     35 RGF93 v1 / Lambert-93
18         60       Polygon    20282     35 RGF93 v1 / Lambert-93
19         59       Polygon    45594     35 RGF93 v1 / Lambert-93
20         91       Polygon    12033     35 RGF93 v1 / Lambert-93
21         75       Polygon     2036     35 RGF93 v1 / Lambert-93
22    commune       Polygon       34      2 RGF93 v1 / Lambert-93
23         97       Polygon      515     34 RGAF09 / UTM zone 20N
Code
couches <- st_layers("data/gros/construction.gpkg")
# 23
couches <- couches$name
couches <- couches [couches != '97']
couches <- couches [couches != 'commune']
union <- NULL
for (c in couches){
  tmp <- st_read("data/gros/construction.gpkg", c, quiet=T)
  tmp <- st_union(tmp$geom)
  tmp <- st_as_sf(tmp)
  union <- rbind(tmp,union)
}
union <- st_convex_hull(union)
dpt <- st_read("data/departements.geojson", quiet=T)
dpt <- st_transform(dpt, 2154)
dptSel <- dpt [dpt$code %in% couches,]
Code
mf_map(dpt, col = "wheat", border="grey")
mf_map(union, col = "pink", border = NA, add = T)
mf_label(dptSel, var = "nom", cex = 0.6, overlap = F, col ="red")
mf_layout("Choix étudiants hors Martinique", "Insee 2019\nCours L6ECSIG")

Ressources

Argis, learn arcgis

R la base

Données communales

Requeteur de carreaux sur site IDF

data.gouv

insee