R-script voor het downloaden en georefereren van een OpenStreetMap tile
✓ Published0🌍 Public
FFrieseWoudloper
Last edited Nov 27, 2015
Created on Nov 27, 2015
This R script downloads a single OpenStreetMap tile centered on the Martinitoren in Groningen and georeferences it by generating a World file. It first converts latitude and longitude coordinates to tile coordinates using the slippy map tilenames algorithm, then fetches the PNG from the `tile.openstreetmap.org` server. The script calculates the tile’s bounding box from the zoom level and writes a six-line `.pgw` file with pixel-to-world transformation parameters, enabling the image to be overlaid with geographic data in GIS software. The code uses base R functions like `download.file`, `paste0`, and `writeLines` without external libraries.
AI-generated description