<div dir="ltr">Hi Micha,<br><br>No worries, thanks for the headsup re: creating subsets. I noticed that resolution thing also, and just thought that it was because that scene is from a different path/row and the g.region command actually sets the region on the edge of this scene, so there are null values from this scene in the processing region. I have since gotten rid of this scene, but I figure that might explain it?<br><br>JDC</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 12, 2015 at 1:52 PM, Micha Silver <span dir="ltr"><<a href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
    
  
  <div style="direction:ltr" bgcolor="#FFFFFF" text="#000000">
    Hi Jake<br>
    Excuse for butting in...<span class=""><br>
    <br>
    <div>On 05/12/2015 05:23 PM, Jake Chila
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Moritz,<br>
        <br>
        I definitely did mean 'g.region -p', sorry for that. I ended up
        getting it to work using 'r.mapcalc' after setting the region. I
        saw someone online had used it with the simple expression
        newmap=oldmap. Then, when I export the newmap it is only of the
        subset. This small workaround was easy to set up, but I don't
        have any idea why it didn't work in the first place. <br>
        <br>
      </div>
    </blockquote>
    <br></span>
    It's not a "workaround". The correct way to clip a section of a
    raster is two steps: define the new region with g.region, then run
    r.mapcalc (which honors the region settings) to get a new raster, at
    the new region settings, with values equal to the original.<br>
    <br>
    However, in your <a href="http://r.info" target="_blank">r.info</a> output below, something seems wrong with the
    resolution. The landsat imagery is at 30 meters resolution. WHere
    did the (very small) values below come from? And why is the N-S 6
    times smaller than the E-W ??<div><div class="h5"><br>
       <br>
    <blockquote type="cite">
      <div dir="ltr"><a href="http://r.info" target="_blank">r.info</a>
        returns:
        <div><br>
          <div>(Tue May 12 11:19:01 2015)                              
                                   </div>
          <div><a href="http://r.info" target="_blank">r.info</a>
            map=L5_2007_ATCOR_COMP@Jacob                                
                        </div>
          <div> +----------------------------------------------------------------------------+</div>
          <div> | Map:      L5_2007_ATCOR_COMP@Jacob       Date: Mon May
            04 14:31:43 2015    |</div>
          <div> | Mapset:   Jacob                          Login of
            Creator: Jacob           |</div>
          <div> | Location: FordingRiver                                
                                |</div>
          <div> | DataBase: C:\Users\Jacob\Documents\grassdata          
                                |</div>
          <div> | Title:     ( L5_2007_ATCOR_COMP )                    
                                 |</div>
          <div> | Timestamp: none                                      
                                 |</div>
          <div> |----------------------------------------------------------------------------|</div>
          <div> |                                                      
                                 |</div>
          <div> |   Type of Map:  raster               Number of
            Categories: 0               |</div>
          <div> |   Data Type:    CELL                                  
                                |</div>
          <div> |   Rows:         11374                                
                                 |</div>
          <div> |   Columns:      12191                                
                                 |</div>
          <div> |   Total Cells:  138660434                            
                                 |</div>
          <div> |        Projection: UTM (zone 11)                      
                                |</div>
          <div> |            N:     557000    S:     554300   Res:
            0.23738351                |</div>
          <div> |            E:     659000    W:     642200   Res:
            1.37806579                |</div>
          <div> |   Range of data:    min = 0  max = 32767              
                                |</div>
          <div> |                                                      
                                 |</div>
          <div> |   Data Description:                                  
                                 |</div>
          <div> |    generated by r.composite                          
                                 |</div>
          <div> |                                                      
                                 |</div>
          <div> |   Comments:                                          
                                 |</div>
          <div> |    r.composite red="GRASS_ATCOR_2007_B3@Jacob"
            green="GRASS_ATCOR_2007_\   |</div>
          <div> |    B2@Jacob" blue="GRASS_ATCOR_2007_B1@Jacob"
            levels=32 output="L5_2007\   |</div>
          <div> |    _ATCOR_COMP"                                      
                                 |</div>
          <div> |                                                      
                                 |</div>
          <div> +----------------------------------------------------------------------------+</div>
          <div>(Tue May 12 11:19:02 2015) Command finished (0 sec)</div>
          <br>
          <br>
          However, I have encountered a new problem. On one of my ETM+
          images, the subset is returned as an empty raster. The process
          runs fine on the other ETM+ image from one year earlier but
          for some reason, the subset from the scene one year later has
          a min and max data range of 'NULL'. This range appears to be
          constant across all the other scenes, so is there a way for me
          to quickly edit this scene so it has the correct data? <br>
          <br>
        </div>
      </div>
    </blockquote>
    <br></div></div>
    As before, I would double check "g.region -p", and "<a href="http://r.info" target="_blank">r.info</a>" for both
    the original Landsat image, and the clipped image that comes out
    NULL.<br>
    <br>
    <br>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>Thanks,<br>
          <br>
          JDC</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, May 12, 2015 at 3:33 AM, Moritz
          Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 08/05/15 19:13, Jake Chila wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                Hey all,<br>
                <br>
                I am currently working with some landsat data in Grass
                7.0.0 on windows<br>
                7, and am trying to hone in on my study area (much
                smaller than the<br>
                whole scene). From what I can tell, the best way to do
                this is through<br>
                the 'g.region' command however, I am having significant
                problems getting<br>
                this module to run correctly.<br>
                <br>
                my input is:<br>
                <br>
                g.region n=5572425 s=5536865 e=655050 w=626350 res=30<br>
                <br>
                One thing is that it runs in '0 seconds' so I think that
                is a little odd.<br>
              </blockquote>
              <br>
            </span>
            It's normal as the command just changes a few entries in a
            text file, so it is really fast.<span><br>
              <br>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <br>
                When I use the 'g.region -d' command I can see that
                everything is set<br>
                properly,<br>
              </blockquote>
              <br>
            </span>
            Did you maybe mean g.region -p ? At least this is the
            command you should use to check current region settings.<span><br>
              <br>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                however when I update the map display nothing changes.
                Also,<br>
                when I export the file using 'r.out.gdal' it exports
                nothing.<br>
                <br>
                <br>
                ('r.out.gdal -t -f --overwrite
                input=LT5_2007_ATCORRCOMP@May_Project<br>
                output=C:\Users\Jacob\Desktop\GRASS_Trials\exportattempt5
                format=GTiff<br>
                type=Uint16 nodata=0)<br>
              </blockquote>
              <br>
            </span>
            That should normally respect the region settings.<br>
            <br>
            What does<br>
            <br>
            <a href="http://r.info" target="_blank">r.info</a> LT5_2007_ATCORRCOMP<br>
            <br>
            give you ?<span><font color="#888888"><br>
                <br>
                Moritz<br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
      <br></div></div>
      This mail was received via Mail-SeCure System.<br>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
grass-user mailing list
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.


</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>