Recherche de données

Objet

Rechercher de la donnée

Quel type de donnée ?

Parcourir le cours du groupe 3 et donner les 3 types de plateforme de données présentées.

  • copernic hub => raster

  • lidar => raster

  • data.gouv => vecteur

Le présent cours ne portera que sur des données vectorielles.

Code
data <- read.csv("data/data.csv", fileEncoding = "UTF-8")
knitr::kable(data)
nom date projection format poids étendue lien
cadastre dpt (limites communes dpt) 2025 NA shape 500 K° dpt https://cadastre.data.gouv.fr/data/etalab-cadastre/2025-12-01/shp/departements/93/
limite commune 2025 NA geojson 26 K° bondy rqt assistant overpass : admin_level=8 in bondy
carreaux filosofi 2018 NA gpkg 207 M° france https://www.insee.fr/fr/statistiques/7655475?sommaire=7655515
parcelles commune 2025 NA geojson 4 M° bondy https://cadastre.data.gouv.fr/data/etalab-cadastre/2025-12-01/geojson/communes/93/93010/

Pour trouver la projection dans Arcgis Pro

clic droit sur couche / propriétés de la couche / source / référence spatiale

Donnée OSM

  • notion de tag

Donnée filosofi

  • Visionner le carroyage

https://www.insee.fr/fr/outil-interactif/7737357/map.html

pas de requêteur

Voir 200 m ou 1 km (en cours télécharger le 1 km, à la maison le 200 m)

  • carroyage

  • date

https://www.data.gouv.fr/datasets/revenus-pauvrete-et-niveau-de-vie-donnees-carroyees/discussions

Chercher le carroyage de 2018 à partir de : data.gouv / insee / le moteur de recherche

On doit tomber sur :

https://www.insee.fr/fr/statistiques/7655475?sommaire=7655515

Cadastre

A partir de data.gouv, on tombe sur le cadastre etalab

On prend les parcelles de sa commune ET les limites des communes de son département.

Intégrer la donnée dans Arcgis

Télécharger votre donnée et la mettre dans un répertoire par exemple dataCours1

Utiliser la fenêtre Catalogue pour connecter votre répertoire

Tout dépend du format de votre donnée.

  • shapefile (cliquer / glisser)

  • gpkg (cliquer / glisser)

  • geojson (json dans la zone de recherche de commandes Alt + Q)

Sous R

Lecture des fichiers

Code
library(sf)
Linking to GEOS 3.13.1, GDAL 3.11.4, PROJ 9.7.0; sf_use_s2() is TRUE
Code
parcelle <- st_read ("data/dataCours1/cadastre-93010-parcelles.json")
Reading layer `cadastre-93010-parcelles' from data source 
  `C:\Users\bmaranget\L6ECSIG\data\dataCours1\cadastre-93010-parcelles.json' 
  using driver `GeoJSON'
Simple feature collection with 7157 features and 9 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 2.469086 ymin: 48.88696 xmax: 2.500038 ymax: 48.92025
Geodetic CRS:  WGS 84
Code
dpt <- st_read("data/dataCours1/communes.shp")
Reading layer `communes' from data source 
  `C:\Users\bmaranget\L6ECSIG\data\dataCours1\communes.shp' using driver `ESRI Shapefile'
Simple feature collection with 39 features and 4 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 647882.1 ymin: 6856430 xmax: 670939.7 ymax: 6879246
Projected CRS: RGF93 v1 / Lambert-93
Code
bondy <- st_read("data/dataCours1/export.geojson")
Reading layer `export' from data source 
  `C:\Users\bmaranget\L6ECSIG\data\dataCours1\export.geojson' 
  using driver `GeoJSON'
Simple feature collection with 2 features and 16 fields
Geometry type: GEOMETRY
Dimension:     XY
Bounding box:  xmin: 2.469086 ymin: 48.88697 xmax: 2.500121 ymax: 48.92025
Geodetic CRS:  WGS 84
Code
car <- st_read("data/gros/carreaux_200m_met.gpkg")
Reading layer `carreaux_200m_met' from data source 
  `C:\Users\bmaranget\L6ECSIG\data\gros\carreaux_200m_met.gpkg' 
  using driver `GPKG'
Simple feature collection with 2287884 features and 34 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 99854.56 ymin: 6049629 xmax: 1242300 ymax: 7109901
Projected CRS: RGF93 v1 / Lambert-93

Problèmes éventuels de géométries

Attention extraction uniquement du polygone et des polygones valides

Code
# le geojson a des géométries différentes
summary(bondy$geometry)
        POINT       POLYGON     epsg:4326 +proj=long... 
            1             1             0             0 
Code
bondy <- st_collection_extract(bondy, "POLYGON")
# verif des autres géométries
summary(dpt$geometry)
      POLYGON     epsg:2154 +proj=lcc ... 
           39             0             0 
Code
summary(parcelle$geometry)
      POLYGON     epsg:4326 +proj=long... 
         7157             0             0 
Code
table(st_is_valid(parcelle$geometry))

TRUE 
7157 

Intersections

Code
# Systèmes de projection
st_crs(bondy)
Coordinate Reference System:
  User input: WGS 84 
  wkt:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Code
st_crs(car)
Coordinate Reference System:
  User input: RGF93 v1 / Lambert-93 
  wkt:
PROJCRS["RGF93 v1 / Lambert-93",
    BASEGEOGCRS["RGF93 v1",
        DATUM["Reseau Geodesique Francais 1993 v1",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4171]],
    CONVERSION["Lambert-93",
        METHOD["Lambert Conic Conformal (2SP)",
            ID["EPSG",9802]],
        PARAMETER["Latitude of false origin",46.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",3,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",49,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",44,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",700000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",6600000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["easting (X)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["northing (Y)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["Engineering survey, topographic mapping."],
        AREA["France - onshore and offshore, mainland and Corsica (France métropolitaine including Corsica)."],
        BBOX[41.15,-9.86,51.56,10.38]],
    ID["EPSG",2154]]
Code
st_crs(parcelle)
Coordinate Reference System:
  User input: WGS 84 
  wkt:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Code
# Transformations de projection
bondy <- st_transform(bondy, 2154)
parcelle <- st_transform(parcelle, 2154)
# Intersections
inter1 <- st_intersection(car, bondy)
inter2 <- st_intersection(car, dpt)
# Enregistrement dans un gpkg
st_write(inter2,"data/dataCours1/car.gpkg", "dpt", delete_layer = T)
Deleting layer `dpt' using driver `GPKG'
Writing layer `dpt' to data source `data/dataCours1/car.gpkg' using driver `GPKG'
Writing 5360 features with 38 fields and geometry type Unknown (any).
Code
st_write(inter1,"data/dataCours1/car.gpkg", "bondy", delete_layer = T)
Deleting layer `bondy' using driver `GPKG'
Writing layer `bondy' to data source `data/dataCours1/car.gpkg' using driver `GPKG'
Writing 164 features with 50 fields and geometry type Unknown (any).
Code
st_write(bondy [, c("name", "population", "ref.INSEE")], "data/bondy.gpkg", "commune", delete_layer = T)
Deleting layer `commune' using driver `GPKG'
Writing layer `commune' to data source `data/bondy.gpkg' using driver `GPKG'
Writing 1 features with 3 fields and geometry type Polygon.

Carto

Code
library(mapsf)
mf_map(parcelle, col= "wheat", border = NA)
mf_map(inter1, col = NA, border = "cadetblue1", lwd = 2 ,add = T)
mf_layout("parcelles cadastre Bondy et ses carreaux filosofi","filosofi 2018, osm\nJanvier 2026")

Code
mf_map(inter2)
mf_map(bondy, col = NA, border = "wheat", lwd=2,add = T)
mf_layout("carreaux filosofi dpt et limites ville Bondy","filosofi 2018, osm\nJanvier 2026")