0

I've successfully plotted some points. See code and output. I now want to save this as a .tif in order to add a base map like OpenStreetMap or Google Maps. How to?

pspcoord<-spTransform(plotcoord, CRS('+proj=utm +zone=21'))
plot(pspcoord)

SpatialPoints

3
  • 1
    writeRaster(r,'test.tif',options=c('TFW=YES')) > gis.stackexchange.com/questions/257204/saving-geotiff-from-r
    – Mapperz
    Commented Jul 23, 2020 at 3:52
  • Why not save the points as a GeoPackage and load that into QGIS? Or use one of the mapping packages in R to add a basemap?
    – Spacedman
    Commented Jul 23, 2020 at 6:14
  • 1
    It looks like "plotcoord" is vector data. As tif is for raster data, something like a GeoPackage, KML, Shapefile would be more much more appropriate in that case. writeOGR() from the rgdal package can do that. Commented Jul 23, 2020 at 11:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.