Je sèche après une après-midi de recherche concernant un bug avec la fonction spTransform pour reprojeter des données de dataframe spatialisées dans un autre CRS. Je pense que c'est un problème avec le package rgdal (et son associé package sp?) et n'arrive pas à en venir à bout, malgré une mise à jour de toutes mes librairies et la réinstallation des packages.
Voilà l'opération:
Code : Tout sélectionner
all <- read.csv("JDD_GPS.csv")
coordinates(all) <- ~ longitude + latitude
proj4string(all) <- "+init=epsg:4326"
all2 <- spTransform(all, CRS("+init=epsg:2154"))
Et j'obtiens à cette dernière étape, le message d'erreur suivant:
Warning message: In showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) : Discarded datum Reseau_Geodesique_Francais_1993 in Proj4 definition
Aussi, quand j'installe la librairie rgdal, ce message s'affiche et attire mon attention:
rgdal: version: 1.5-23, (SVN revision 1121)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.2.1, released 2020/12/29
Path to GDAL shared files: C:/Users/home/Documents/R/win-library/4.0/rgdal/gdal
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 7.2.1, January 1st, 2021, [PJ_VERSION: 721]
Path to PROJ shared files: C:/Users/home/Documents/R/win-library/4.0/rgdal/proj
PROJ CDN enabled: FALSE
Linking to sp version:1.4-5
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
Overwritten PROJ_LIB was C:/Users/home/Documents/R/win-library/4.0/rgdal/proj
Warning message:
le package ‘rgdal’ a été compilé avec la version R 4.0.3
J''ai enquêté sur le web sans trop comprendre, mais ce lien m'a semblé pertinent: http://rgdal.r-forge.r-project.org/arti ... tml#proj-1
Avez-vous déjà été confronté à ce problème et comment l'avez-vous résolu?
En vous remerçiant d'avance