Hot answers tagged

10

If your point is located here: it's encoded as WKB which stands for Well Known Binary. The exact same point, expressed as WKT (for Well Know Text, which is more human readable) is: 'POINT (30.3504317999999991 50.4503695000000008)' Please see https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry and https://portal.ogc.org/files/?...


3

You need to create a bivariate partial dependency plot first. I believe the function you are after to create the object to pass to plot3D::surf3D is ggRandomForests::partial.rfsrc, ggRandomForests::gg_partial_coplot or ggRandomForests::gg_partial and you can actually call the plot object using the plot generic but, probably not a 3D object. I would honestly ...


3

I don't understand you problem because it is unclear and your question is messy. Why are you using as.raster on an object that is already a RasterLayer? Where the errors occurred? Which data did you used? So, I made an example that seems to be what you are looking for but without any explanation because I don't know what your problem is: library(lidR) ...


2

The library spatstats have a smallest-circle fitting function that handles sp objects if maptools is loaded. library(sp) library(maptools) library(spatstat) pol <- rbind(c(0,0), c(1,0), c(3,2), c(2,4), c(1,4), c(0,0)) pol <- Polygon(pol) pol <- Polygons(list(pol), ID = "1") pol <- SpatialPolygons(list(pol)) pol <- as.owin(pol) plot(...


1

At least one row of your roads is causing this error when SpatialLinesNetwork tries to get its length: > SpatialLinesLengths(l[65403,]) Error in FUN(X[[i]], ...) : non-finite line lengths This row appears to have zero length, which is messing up the length calculation when it is using lat-long coordinates: > l[65403,] class : ...


1

Michael Dorman's answer looks quite similar to this PostGIS question, which was answered in more detail at this blog post. R's sf and PostGIS are similar in that they both build on the GEOS library, but don't have quite the same set of functions. Unfortunately I don't think the n.overlaps column in the result of sf::st_intersection() is counting what was ...


1

One way to define an "average polygon" could be the area covered by at least 50% of simulated polygons. Here is how this can be calculated using sf: library(sf) # Combine pol = kernel.poly.all pol = do.call(rbind, pol) pol = st_as_sf(pol) # Calculate average polygon pol_avg = st_intersection(pol) pol_avg = pol_avg[pol_avg$n.overlaps >= nrow(...


1

Yes there is a way and it is documented here: https://sen2r.ranghetti.info/articles/sen2r_cmd.html I haven't used this myself, so I can't be of much more help I'm afraid.


1

It is unclear if you are working with an RGB multiband composite or a single raster with 3 classes that you are calling red, green, blue. Please edit your question to clarify. Here I address a single band multi-class raster. The workflow would be somewhat different if multivariate and I would ask what are you after using distance across bands? In this case, ...


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