New answers tagged

1

you can simply crop one crop to another and end up with the intersection of all of them. try r.all <- list(r1,r2,r3,r4,r5) # your 5 rasters for (r in r.all) { xmin <- c(NA,extent(r)[1]) xmax <- c(NA,extent(r)[2]) ymin <- c(NA,extent(r)[3]) ymax <- c(NA,extent(r)[4]) } #bounding box of the intersection of all rasters b.box &...


2

You can do this in raster by unioning extents. You don't need st_bbox. This way you get back an extent object ready for use in the raster package functions you might need: > r1 = raster(matrix(1:12,3,4),xmn=.3,xmx=.5,ymn=.2,ymx=.8) > r2 = raster(matrix(1:12,3,4),xmn=.4,xmx=.5,ymn=.3,ymx=.9) > union(extent(r1), extent(r2)) class : Extent xmin ...


0

I was able to re-project OSCAR data with this command: gdalwarp \ -s_srs "+proj=longlat +datum=WGS84 +lon_wrap=200" \ -t_srs EPSG:4326 \ -te -180 -90 180 90 \ -wo SOURCE_EXTRA=1000 \ NETCDF:oscar_vel10126.nc:u \ u.tif Because of the longitude extent, PROJ lon_wrap param can be anything between 200 and 240.


0

Here's the way I do this, it doesn't require using ogr or shapely or anything outside of the core json library. This script is set up to crawl geojson with mixed geometries (point, linestring, polygon) but will work on single feature types too. It abstracts all coordinate pairs from their features, sticks them in a list, and then uses python's built-in ...


Top 50 recent answers are included