<meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  
  
    Hi,<br>
    Why... I am not sure.  You could always use the -tr xres yres switch
    in gdalwarp.<br>
    <br>
<a class="moz-txt-link-freetext" href="http://www.geos.ed.ac.uk/~smudd/TopoTutorials/html/tutorial_raster_conversion.html" target="_top" rel="nofollow" link="external">http://www.geos.ed.ac.uk/~smudd/TopoTutorials/html/tutorial_raster_conversion.html</a><br>
    <br>
    -tr will set the pixel size. (ex -tr 200 200)  I don't think it work
    with gdal_translate (clipper) yet.  (Needs gdal version2)
    <a class="moz-txt-link-freetext" href="http://www.gdal.org/gdal_translate.html" target="_top" rel="nofollow" link="external">http://www.gdal.org/gdal_translate.html</a><br>
    <br>
    Should work.<br>
    Nicolas<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Le 2015-05-19 21:12, Luciano La Sala
      [via OSGeo.org] a écrit :<br>
    </div>
    <blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' cite="mid:555BE012.4070709@yahoo.com.ar" type="cite">
      Dear QGIS users,
      <br>
      <br>
      I am using QGIS V 2.2.0 (OS-Windows 8), and need to prepare raster
      files <br>
      (ESRI ArcInfo Grids) to be later used in a species distribucion
      model <br>
      using MaxEnt. Each of the original raster files (environmental
      variables <br>
      for Guadalquivir, Spain) has a different spatial extension (but
      all <br>
      share the same pixel size of 200, -200). However, to be able to
      use <br>
      these layers in MaxEnt, all of them need to have the exact same
      spatial <br>
      extent. Therefore, I clipped every raster using a polygon of <br>
      Guadalquivir. After clipping, I save as GeoTIFF but the new
      rasters have <br>
      their original pixel size (200,-200) slightly altered <br>
      (200.001,-199.942). I wouldn't bother too much about this menial <br>
      difference in cell size if it weren't for the warning message that
      I get <br>
      (see below) when trying to convert the GeoTIFF rasters to ASCII (a
      <br>
      requirement for MaxEnt to work):
      <br>
      <br>
      Warning 1: Producing a Golden Surfer style file with DX and DY
      instead
      <br>
      of CELLSIZE since the input pixels are non-square. Use the
      <br>
      FORCE_CELLSIZE=TRUE creation option to force use of DX for
      <br>
      even though this will be distorted. Most ASCII Grid readers
      <br>
      (ArcGIS included) do not support the DX and DY parameters. .
      <br>
      <br>
      The Layer Spatial Reference System for Guadalquivir is:
      <br>
      <br>
      +proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m
      +no_defs <br>
      <br>
      <br>
      The Layer Spatial Reference System for the raster layers is:
      <br>
      <br>
      +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs
      <br>
      <br>
      When clipping, I'm using the function raster >> Extraction
      >> Clipper <br>
      followed by the options...
      <br>
      <br>
      No data value = 0
      <br>
      Mask layer: Guadalquivir
      <br>
      Following, I save the new raster as GeoTIFF.
      <br>
      <br>
      Questions:
      <br>
      <br>
      Should the clipping be done using a polygon with the exact same <br>
      projection? I am not sure to what extent the projections differ
      between <br>
      the layers above.
      <br>
      <br>
      In case response to question is "Yes" (same projections needed), I
      did <br>
      the clipping using both options: first by saving Guadalquivir as
      .shp <br>
      with the raster's projection, and later the other way around, that
      is <br>
      saving raster files with Guadalquivir's projection. Regardless of
      the <br>
      option, pixel size remains altered/uneven.
      <br>
      <br>
      How can I keep the original pixel size of 200,-200?
      <br>
      <br>
      Thank you in advance.
      <br>
      <br>
      Luciano
      <br>
      _______________________________________________
      <br>
      Qgis-user mailing list
      <br>
      <a moz-do-not-send="true"
        href="/user/SendEmail.jtp?type=node&node=5206541&i=0"
        target="_top" rel="nofollow" link="external">[hidden email]</a>
      <br>
      <a moz-do-not-send="true"
        href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
        target="_top" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
      <br>
      <br>
      <hr color="#cccccc" noshade="noshade" size="1">
      <div style="color:#444; font: 12px
        tahoma,geneva,helvetica,arial,sans-serif;">
        <div style="font-weight:bold">If you reply to this email, your
          message will be added to the discussion below:</div>
        <a moz-do-not-send="true"
href="http://osgeo-org.1560.x6.nabble.com/Why-does-clipping-a-raster-alters-cell-size-tp5206541.html" target="_top" rel="nofollow" link="external">http://osgeo-org.1560.x6.nabble.com/Why-does-clipping-a-raster-alters-cell-size-tp5206541.html</a>
      </div>
      <div style="color:#666; font: 11px
tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
        To start a new topic under Quantum GIS - User, email
        <a href="/user/SendEmail.jtp?type=node&node=5206550&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
        To unsubscribe from Quantum GIS - User, <a
          moz-do-not-send="true"
href="" target="_top" rel="nofollow" link="external">click
          here</a>.<br>
        <a moz-do-not-send="true"
href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_top" link="external">NAML</a> </div>
    </blockquote>
    <br>
  



        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Why-does-clipping-a-raster-alters-cell-size-tp5206541p5206550.html">Re: Why does clipping a raster alters cell size?</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/Quantum-GIS-User-f4125267.html">Quantum GIS - User mailing list archive</a> at Nabble.com.<br/>