[RS-ecology] RS-ecology Digest, Vol 7, Issue 1

Paulo Eduardo Cardoso pauloeducardoso at gmail.com
Wed Mar 23 16:23:08 CET 2016


How is your white frames coded?

Paulo Eduardo Cardoso
linkedin <http://pt.linkedin.com/pub/paulo-e-cardoso/65/291/b99> | github
<https://github.com/PauloEduardoCardoso> | stackoverflow
<http://stackoverflow.com/users/640783/paulo-cardoso> | researchgate
<https://www.researchgate.net/profile/Paulo_Cardoso9>
_______________________


2016-03-23 15:06 GMT+00:00 <rs-ecology-request at lists.uni-wuerzburg.de>:

> Send RS-ecology mailing list submissions to
>         rs-ecology at lists.uni-wuerzburg.de
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.uni-wuerzburg.de/mailman/listinfo/rs-ecology
> or, via email, send a message with subject or body 'help' to
>         rs-ecology-request at lists.uni-wuerzburg.de
>
> You can reach the person managing the list at
>         rs-ecology-owner at lists.uni-wuerzburg.de
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of RS-ecology digest..."
>
>
> Today's Topics:
>
>    1. Problem with merging raster objects (Henrike StB)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 23 Mar 2016 15:26:32 +0100
> From: Henrike StB <henrikestb at gmail.com>
> To: rs-ecology at lists.uni-wuerzburg.de
> Subject: [RS-ecology] Problem with merging raster objects
> Message-ID:
>         <CAO1AbmQGUhj3EhX7m1ctDvMDqNs+tSU7jv+vPY_=
> NqPZ9HYw2Q at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear all,
>
> I'm having trouble merging Landsat scenes using the "merge" function in the
> raster package. No warnings are raised, but the merged scene looks as if
> overlap=FALSE - basically as though someone had taken a bunch of polaroids
> and placed them so they overlapped (if that does not make sense, please see
> attachment).
> I'd like to get rid of the white "frames" around the individual scenes
> before further processing. Does anyone happen to know what the problem with
> my code might be, or has anyone had similar problems?
>
> Thank you in advance for any hints you might be able to give!
>
> My code looks as follows:
>
> # I load adjacent scenes as multi-layer objects:
>
> scene1 <- stack(...) # multi-layer raster object; contains all 7 bands of
> the first scene
> scene2 <- stack(...)
> ....
> scene10<- stack(...)
>
> # Then I try merging these raster objects using a for-loop:
>
> all_scenes <-as.list(print(c(scene1, scene2, ..., scene10)))
>
> for(i in 1:length(all_scenes))
> {
>   if (i == 1) {
>     merged_scenes <- all_scenes[[i]][[1:7]]
>   }
> else if (i > 1) {
>     merged_scenes <- merge(merged_scenes, all_scenes[[i]][[1:7]], tolerance
> = 0.05, overlap=TRUE)
>   }
> }
>
> writeRaster(merged_scenes, "filename", format = "GTiff", overwrite = TRUE)
>
>
> Best wishes,
> Henrike
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.uni-wuerzburg.de/pipermail/rs-ecology/attachments/20160323/a8347751/attachment.html
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Failed scene merge.PNG
> Type: image/png
> Size: 56926 bytes
> Desc: not available
> URL: <
> http://lists.uni-wuerzburg.de/pipermail/rs-ecology/attachments/20160323/a8347751/attachment.png
> >
>
> ------------------------------
>
> _______________________________________________
> RS-ecology mailing list
> RS-ecology at lists.uni-wuerzburg.de
> https://lists.uni-wuerzburg.de/mailman/listinfo/rs-ecology
>
>
> End of RS-ecology Digest, Vol 7, Issue 1
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-wuerzburg.de/pipermail/rs-ecology/attachments/20160323/049c5a24/attachment.html>


More information about the RS-ecology mailing list