[Qgis-user] Raster calculator

Wesley Roberts jwesroberts at gmail.com
Wed Feb 20 22:58:05 PST 2013


Hi Hanlie,

I too have found "interesting" results returned by the raster calculator
and usually default to loading the data into GRASS and processing it there.
I suspect you may need to convert your input data to *.tif format for the
equation to work in QGIS. This is easily done using gdal_translate or the
gdal_translate implementation in QGIS -> Raster/Conversion/Translate


Not sure why you are having trouble with the ASC files, perhaps the
conversion will do the trick
Regards,
Wesley


On Wed, Feb 20, 2013 at 10:24 PM, Hanlie Pretorius <
hanlie.pretorius at gmail.com> wrote:

> Hi,
>
> If there's a way to search the whole archive of this list in one go,
> please let me know.
>
> Otherwise, can someone perhaps help me with this problem?
>
> I'm using the raster calculator in QGIS 1.8.0 on Windows 7 to find the
> difference between two rasters. The two input rasters (ASC files) both have
> float32 datatypes and they have exactly the same spatial extent. The
> expression I use in the calculator is:
>
> med input at 1 - low input at 1
>
> *med input* has a range from 0 to 5.5
> *low input* has a range from 0 to 2.5
>
> The result I get is a float32 output raster with zero everywhere. I have
> tried two different output formats - TIFF and IMG with the same result.
>
> I have also tried to add the two rasters, with the same result - zero
> everywhere.
>
> I imported the input rasters into GRASS, performed the calculation, got
> the correct result, and exported the output successfully to a TIFF file.
>
> Can anyone help me figure out why the raster calculator in QGIS is not
> giving the expected result?
>
> Thanks
> Hanlie
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>


-- 
Dr Wesley Roberts
jwesroberts at gmail.com
Cell: +27(0)83 5355 646
skype: roberts-w
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130221/f29381b1/attachment.html>


More information about the Qgis-user mailing list