Comments (4)
Perfect, thanks, it works.
from rstoolbox.
Unfortunately we cannot reproduce your issue since we are not in the posession of the .tif
files that you are reading in.
With the last
example data (as Raster stack,) ggRGB
works with the hist
stretch:
library(RStoolbox)
library(terra)
library(raster)
s <- as(lsat, "Raster")
ggRGB(s, r = 1, g = 2, b = 3, stretch = "hist")
Please provide a reproducible example so that we can test the issue.
from rstoolbox.
Thanks, yes sorry, i crop my rasters (because it is for a publication but the problem remains).
Here the three rasters
Best
from rstoolbox.
This should be solved by forcing ggRGB
to not use annotation_raster
with setting geom_raster = TRUE
:
library(RStoolbox)
library(raster)
r1 = raster("rgbr.tif")
r2 = raster("rgbg.tif")
r3 = raster("rgbb.tif")
s = stack(r1, r2, r3)
ggRGB(s, r = 1, g = 2, b = 3, stretch = "hist", geom_raster = T)
In general, consider switching to terra
since raster
is deprecated:
library(RStoolbox)
library(terra)
r1 = rast("rgbr.tif")
r2 = rast("rgbg.tif")
r3 = rast("rgbb.tif")
s = c(r1, r2, r3)
ggRGB(s, r = 1, g = 2, b = 3, stretch = "hist", geom_raster = T)
from rstoolbox.
Related Issues (20)
- Duplicate row.names are not allowed. HOT 4
- Allow fitting models on raster stacks of differing extents HOT 3
- Training data error superClass HOT 1
- MTL file error HOT 2
- Please attend to retirement of rgdal, rgeos and maptools HOT 1
- No plot with ggRGB(rlogo, ggLayer = TRUE)
- Problems with readMeta
- Stale CRS in stored objects
- Please remove dependencies on **rgdal**, **rgeos**, and/or **maptools** HOT 3
- topCor
- Error: rasterCVA
- ggR with classified raster HOT 1
- CRAN Archival 2023-02-12 HOT 8
- error in evaluating the argument 'y' in selecting a method for function 'intersect': non-character object(s)
- R fatal error when using unsuperClass from RStoolbox HOT 4
- `superClass` unable to predict when there is NA in raster data HOT 3
- Fails to run `superClass` when one of the raster layer is factor HOT 3
- Fails to run superClass when providing the `model` parameter
- Implementation of Sentenel-2 Tasseled Cap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rstoolbox.