[Qgis-user] Why does clipping a raster alters cell size? (Luciano La Sala)

Michael Treglia mtreglia at gmail.com
Wed May 20 08:50:25 PDT 2015


Hi Luciano,

the file that can be opened in notepad is probably has a header of
something like:
ncols
nrows
xllcorner
yllcorner
cellsize
NODATA_value

Followed by the values from your raster next, right?

If so, that is the .asc file that you want - when I export the .asc file
(running QGIS 2.8.1 x64 on Win 7), it exports these files correctly, with
the appropriate extension. (Though in the file Explorer, if you are viewing
the

On Windows [not sure about other OSs], the file extension (.asc) is not
shown by default, for files that Windows knows how to open.  To change
this, you would go to Control Panel -> [view by icons] ->Folder Options ->
View Tab, and un-check the box next to 'Hide extensions for known file
types'.  Also, if when you are looking at the available files in Windows
Explorer, if you change to the detail view (which has file size, date
modified, etc.), there should be a field "Type", for which this file should
be specified as a "ASC" file

Hope this helps and works for you.

Best
mike


On Wed, May 20, 2015 at 10:21 AM, Luciano La Sala <
lucianolasala at yahoo.com.ar> wrote:

> Thank you very much Nicolas for your response. I have no idea how to use
> use the -tr xres yres switch in gdalwarp.
> However, I solved the problem using GDAL's algorithm "Clip raster by mask
> layer" and by seting the option "Keep resolution of output raster" to
> "Yes". That produced a .tif file with equal pixel size (200, -200).
>
> Following, I convert this GeoTIFF to .ASC format using: "Raster >
> Conversion > Translate (Convert format)" and the setting the Output file to
> [GDAL] Arc/Info ASCII Grid (*.asc *.ASC).
>
> The result is three files: the auxiliary file .aux, the coordinate system
> file .prj, and one more filename of File type FILE that can be opened with
> Notepad. Disappointingly, no .asc file was created. What am I doing wrong?
> I need .asc files of my environmental variables to be later processed using
> other software.
>
> Thanks!
>
>
>
> El 5/20/2015 a las 6:02 AM, qgis-user-request at lists.osgeo.org escribió:
>
>> Send Qgis-user mailing list submissions to
>>         qgis-user at lists.osgeo.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://lists.osgeo.org/mailman/listinfo/qgis-user
>> or, via email, send a message with subject or body 'help' to
>>         qgis-user-request at lists.osgeo.org
>>
>> You can reach the person managing the list at
>>         qgis-user-owner at lists.osgeo.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Qgis-user digest..."
>>
>>
>> Today's Topics:
>>
>>     1. Re: Error installing QGIS 2.8.2-1 on Mac (Jacopo Tonetti)
>>     2. Draw square or line and see meters (elmalle)
>>     3. Re: Error installing QGIS 2.8.2-1 on Mac (Jes?s)
>>     4. Re: Error installing QGIS 2.8.2-1 on Mac (William Kyngesburye)
>>     5. Why does clipping a raster alters cell size? (Luciano La Sala)
>>     6. Re: Why does clipping a raster alters cell size? (Nicolas Cadieux)
>>     7. How I create web gis through Qgis (Debajyoti Ghosh)
>>     8. Re: new issue with raster calculator (Bernd Vogelgesang)
>>     9. Re: How I create web gis through Qgis (McDonaldR)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Tue, 19 May 2015 22:23:33 +0200
>> From: Jacopo Tonetti <jacopotonetti at gmail.com>
>> To: Jes?s <jesusl.temez at gmail.com>
>> Cc: qgis-user at lists.osgeo.org
>> Subject: Re: [Qgis-user] Error installing QGIS 2.8.2-1 on Mac
>> Message-ID:
>>         <
>> CAJnh74mJHzhAJEnXJ6PmQ_UQf_n04p5OnMZONg8UJMwYREaN2Q at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi, seems that you have an older version of PROJ library. Did you download
>> the package or install via homebrew? I recommend the latter (but you
>> should
>> use command line), I followed this
>> <
>> https://github.com/OSGeo/homebrew-osgeo4mac/wiki/Developing-on-QGIS-using-OSGeo4Mac
>> >
>> guide and everything is fine, same OS and version of QGIS.
>> j
>>
>> 2015-05-19 19:38 GMT+02:00 Jes?s <jesusl.temez at gmail.com>:
>>
>>  Trying to install 2.8.2-1 on a Mac (10.9.5) I find this error:
>>>
>>> Dyld Error Message:
>>>    Library not loaded: /Library/Frameworks/PROJ.framework/Versions/4/PROJ
>>>    Referenced from: /Applications/QGIS.app/Contents/MacOS/QGIS
>>>    Reason: Incompatible library version: QGIS requires version 10.0.0 or
>>> later, but PROJ provides version 8.0.0
>>>
>>> Binary Images:
>>>      0x7fff6810f000 -     0x7fff68142817  dyld (239.4)
>>> <7AD43B9B-5CEA-3C7E-9836-A06909F9CA56> /usr/lib/dyld
>>>      0x7fff8bc7f000 -     0x7fff8bc7ffff  com.apple.ApplicationServices
>>> (48
>>> -
>>> 48) <3E3F01A8-314D-378F-835E-9CC4F8820031>
>>>
>>>
>>> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat
>>> ionServices
>>>      0x7fff8bc9f000 -     0x7fff8bd0bfff  com.apple.framework.IOKit
>>> (2.0.1 -
>>> 907.100.14) <10932113-9F7E-38A0-A158-A019A555CAC3>
>>> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
>>>      0x7fff8dd59000 -     0x7fff8df3efff  com.apple.CoreFoundation (6.9 -
>>> 855.17) <729BD6DA-1F63-3E72-A148-26F21EBF52BB>
>>>
>>>
>>> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio
>>> n
>>>
>>> I delete old version first but I can't open new version when finishing
>>> the
>>> installation. I got this message: Qgis can't be open due to a problem.
>>>
>>> Any idea? Thanks
>>> Jesus
>>>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>>
>>
>>
>>
> --
> Luciano F. La Sala
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> Cátedra de Epidemiología
> Departamento de Biología, Bioquímica y Farmacia
> Universidad Nacional del Sur
> San Juan 670
> Bahía Blanca (8000)
> Argentina
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150520/8a0dacea/attachment.html>


More information about the Qgis-user mailing list