<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.10570.1001"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial>Hi Rosalia,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial>ok possibly the trouble comes from some a software bug and
your procedure was not working correctly with the vrt file as
input.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial>Possibly the easiest work around for you would be to clip each
tif individually and then assemble again to a vrt afterwards
...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial>Note that the SCP plug-in might support pretty well your task
in regards to classifying different types of
vegetation ...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial>Cheers</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834150220-25032021><FONT color=#000080
size=2 face=Arial>Karsten</FONT></SPAN></DIV><BR>
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Rosalia Agioutanti
[mailto:ragioutanti@gmail.com] <BR><B>Sent:</B> Thursday, March 25, 2021
12:57<BR><B>To:</B> karsten<BR><B>Subject:</B> Re: [Qgis-us-user] Clipping
multispectral data<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Hey Karsten,
<DIV><BR></DIV>
<DIV>Thank you for getting back to me so quickly!! I really appreciate
it!!</DIV>
<DIV><BR></DIV>
<DIV>I merged all of my five multispectral bands (which are GeoTifs) to a single
multispectral image and its format is a virtual raster.</DIV>
<DIV><BR></DIV>
<DIV>I will try out everything you proposed and get back to you!</DIV>
<DIV><BR></DIV>
<DIV>Thanks again for all your help, it was much needed!</DIV>
<DIV>Rozalia</DIV></DIV><BR>
<DIV class=gmail_quote>
<DIV class=gmail_attr dir=ltr>On Thu, 25 Mar 2021 at 15:51, karsten <<A
href="mailto:karsten@terragis.net">karsten@terragis.net</A>> wrote:<BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex"><U></U>
<DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>Hi
Rozalia,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>what
format is your imagery in ? Are those tif files with multiple (5) bands each
?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>One way
you could go do about it would be to use the SCP plug-in with QGIS
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial><A
href="https://fromgistors.blogspot.com/p/semi-automatic-classification-plugin.html"
target=_blank>https://fromgistors.blogspot.com/p/semi-automatic-classification-plugin.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>to create
a band set and clip the images there as individual raster (one band for each
tiff).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>Another
way to work around the trouble could be to use gdal utilities (on windows
installed via the OSGEO4w installer <A
href="http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe"
target=_blank>http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe</A> )</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>Both
gdal_translate and gdalwarp can work</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial><A
href="https://gdal.org/programs/gdal_translate.html"
target=_blank>https://gdal.org/programs/gdal_translate.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial><A
href="https://gdal.org/programs/gdalwarp.html"
target=_blank>https://gdal.org/programs/gdalwarp.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>to cut the
tif. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>One
example for gdal_translate on the osgeo4w command line
below: </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><SPAN><FONT color=#0000ff size=2
face=Arial><STRONG>gdal_translate <FONT color=#800000>-co COMPRESS=DEFLATE -co
PREDICTOR=2 -co ZLEVEL=9</FONT> -ot Int32 <FONT color=#800000>-of GTiff</FONT>
-a_nodata -1 <FONT color=#800000>-a_ullr 32.9530027131047 0.0482477475516659
36.0558767381047 -2.048247747551673</FONT> inputscene1.tif <FONT
color=#800000>outinputscene1_cut_and_compressed.tif</FONT></STRONG></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT size=2><FONT color=#000080 face=Arial>The
extent to extract above is set in the tag <FONT
color=#ff0000><STRONG>-a_ullr</STRONG></FONT> </FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>with upper
left coordinate as 32.9530027131047 0.0482477475516659 </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>and lower
right coordinate as 36.0558767381047 -2.048247747551673</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2 face=Arial>In theory
this should maintain the bands</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN></SPAN><FONT color=#000080 size=2 face=Arial>Cheers</FONT></DIV>
<DIV><SPAN></SPAN><SPAN></SPAN><FONT size=2><FONT face=Arial><FONT
color=#000080>K<SPAN>arsten</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN><A
href="http://www.terragis.net"
target=_blank>www.terragis.net</A></SPAN></FONT></DIV>
<DIV><BR></DIV>
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT size=2 face=Tahoma><B>From:</B> Qgis-us-user [mailto:<A
href="mailto:qgis-us-user-bounces@lists.osgeo.org"
target=_blank>qgis-us-user-bounces@lists.osgeo.org</A>] <B>On Behalf Of
</B>Rosalia Agioutanti<BR><B>Sent:</B> Thursday, March 25, 2021
12:36<BR><B>To:</B> <A href="mailto:qgis-us-user@lists.osgeo.org"
target=_blank>qgis-us-user@lists.osgeo.org</A><BR><B>Subject:</B>
[Qgis-us-user] Clipping multispectral data<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr> Hi,
<DIV><BR></DIV>
<DIV>My name is Rozalia Agioutanti and I am a master's student at the
University of Kentucky. For my thesis, I have to process multispectral images
of a stream and classify the different types of vegetation that are
existing.</DIV>
<DIV><BR></DIV>
<DIV>However, when I try to clip the multispectral image I am losing some of
the multispectral bands, and I end up with a raster with only three bands
(where my original file had five bands). I have tried many different ways to
address this problem, like creating a shapefile and clipping the raster
to it or drawing the boundaries of my clip on the image but nothing seems to
be working.</DIV>
<DIV><BR></DIV>
<DIV>I would really appreciate any input that you have!</DIV>
<DIV>Thank you very much for your help in advance,</DIV>
<DIV>Rozalia</DIV></DIV></DIV></BLOCKQUOTE></DIV></BODY></HTML>