[R-sig-Geo] Importing layers from Google My Maps

Mathias Moser m@tmo@er @end|ng |rom wu@@c@@t
Fri Feb 12 17:39:02 CET 2021


If your maps have their sharing links active you can just use download.file() by
adapting the sharing link like this:

https://www.google.com/maps/d/kml?mid=__MAPID__

If your maps are not public this will require authentication first (e.g.,
through RCurl:
https://developers.google.com/gdata/articles/using_cURL#authenticating ).

HTH, //m

On Fri, 2021-02-12 at 15:10 +0100, Thierry Onkelinx via R-sig-Geo wrote:
> Dear all,
> 
> Can I import the layers from a Google My Maps based on it's link? I know I
> can go to the link, export the layers as KML and import that in R using
> rgdal. But that is tedious when you have a lot of links.
> 
> Any suggestions?
> 
> Best regards,
> 
> ir. Thierry Onkelinx
> Statisticus / Statistician
> 
> Vlaamse Overheid / Government of Flanders
> INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
> FOREST
> Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
> thierry.onkelinx using inbo.be
> Havenlaan 88 bus 73, 1000 Brussel
> www.inbo.be
> 
> ////////////////////////////////////////////////////////////////////////////////
> ///////////
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
> ////////////////////////////////////////////////////////////////////////////////
> ///////////
> 
> <https://www.inbo.be>
> 
>         [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list