Hot answers tagged

6

That URL is not a WMS server, its a web page. The web page has a Javascript application running that produces the map. The map contains several layers, including the base map (land/sea) and a rainfall overlay. The rainfall overlay appears to be coming from nowcoast.noaa.org, as an ESRI API map via leaflet. However nowcoast.noaa.org do have some WMS services: ...


2

To save a QGIS layer in a format suitable for reading into R, right-click on the polygon layer and choose "Export..." "Save Features as...", or with the Layer selected in the Layers dialog, choose "Layer" "Save As..." from the menu. Change the format to GeoPackage, choose a file name and a layer name (a single ...


2

Right, I'll attempt to provide an answer. This is just a slight elaboration on the answer given by @markusN that you linked to, as the issue does seem to be the same and related to the GRASS GIS environmental variables. (Here is the link given by @markusN again, which should help you set the necessary environmental variables correctly: https://github.com/...


2

The raster package is very strict about names, it seems, and really doesn't want you to have two layers in a stack with the same names. Weirdly you can make a plain R list with two elements with the same name: > L = list(a=1, a=2) > L$a [1] 1 > names(L) [1] "a" "a" but the only way to get the second one is with L[[2]]. But the ...


2

This all works for me: > library(sf) > plot(input$geom, col=input$colour) > plot(clip$geom, col=NA, border="red", add=TRUE) > output = st_intersection(input, clip) > plot(output$geom, col=output$colour) The output object has the attributes from the underlying input object: > output Simple feature collection with 3 features and ...


2

I am not clear on what you are getting at in saying that the results differ between a loop and overlapping geometries. There is obviously something amiss there and I cannot reproduce it. By default, st_buffer does not dissolve buffer polygons like rgeos::gBuffer does. You do have to take care when operating on multipart geometries as you can inadvertently ...


1

Probably easier to use another pattern, eg special treatment of the first item: first=TRUE for(shp in shapefiles){ # this function reads in a shapefile from shp and returns sp object: shpdata = read_in_and_check(shp) if(first){ output=shpdata first=FALSE } else { output=bind(output, shpdata) } } or get your shapes into a ...


1

This is more of an R question than a ascii or even {raster} issue. You wrote a badly defined pattern just as the error message responded. You should have checked that you got a vector of filenames as a result for the second line of code. This code should fix the pattern issue: library(raster) list_file <- list.files ("C:\\Users\\Areej\\Documents\\...


1

You can use scale_fill_gradientn to specify the fill, and facet_wrap should pick the colours from there: If you have rasterVis package installed, you can use gplot function to create the ggplot object library(rasterVis) gplot(ndvi) + geom_tile(aes(fill = value)) + facet_wrap(~ variable) + scale_fill_gradientn(colours = rev(terrain.colors(225))) + ...


Only top voted, non community-wiki answers of a minimum length are eligible