[Qgis-developer] [Qgis-user] Raster Calculator and LN

George Silva georger.silva at gmail.com
Wed Mar 25 13:19:10 PDT 2015


This looks like a bug.

Even thought I'm programming with the raster calculator, there are strong
tells that this is a bug. I tested this programming and using the inteface:
same results.

In the attachment there is the file I'm working with. I tried this simple
math:

* radiance.tif

(raster * 0.03705882) + 3.2

It's output is all NODATA.

I've tried:

raster + 1

It's output is NODATA.

raster * 0.5

It's output is NODATA.

If that's not a bug I'm not sure what it is. It looks like on 2.6 it was
fine. I'm working on this for two days, and unless I'm doing something
really really wrong, it think it's a bug.

Please, see the TIF imagery attached (zip).

All the formulae is simple and should work without issues.

George

On Tue, Mar 24, 2015 at 1:28 PM, Nicolas Cadieux <
nicolas.cadieux at archeotec.ca> wrote:

> Hi,
> Could it be that for your layer, 0 = null?  In that case, could this be
> the source of the problem?  Try changing the null value to test... Just an
> idea.
>
> Nicolas Cadieux M.Sc.
> Les Entreprises Archéotec inc.
> 8548, rue Saint-Denis Montréal H2P 2H2
> Téléphone: 514.381.5112  Fax: 514.381.4995
> www.archeotec.ca
> Le 2015-03-24 10:24, "george-silva [via OSGeo.org]" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5195208&i=0>> a écrit :
>
> Hello everyone,
>
> It seems that we have a bug on raster calculator. I tried searching the
> web for this, but here's the story:
>
> I'm developing a plugin that makes extensive use of the raster calculator.
> So far so good. I can enter my custom expressions and it seems to be
> working fine.
>
> However one of my formulas contains a LN (natural log). So, to test this
> properly I've created a raster all with 1 value. The LN for 1 is 0, so the
> whole raster should be zeroed.
>
> The raster calculator, even while programming or using the software, tells
> me that the expression is valid.
>
> That's not the case.
>
> Questions:
>
> 1) Is LN not implemented in the raster calculator? Is implemented? What is
> the syntax? Is it documented?
>
> 2) Workarounds?
>
> Is it a bug? I'm trying to look my redmine password so I can file a bug or
> contribute with documents for testing.
>
> Thanks
>
> George
>
> --
> George R. C. Silva
> SIGMA Consultoria
> ----------------------------
> http://www.consultoriasigma.com.br/
>
> _______________________________________________
> Qgis-user mailing list
> <a
> href="/user/SendEmail.jtp?type=node&node=5195151&i=0">[hidden
> email]
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://osgeo-org.1560.x6.nabble.com/Raster-Calculator-and-LN-tp5195151.html
>  To start a new topic under Quantum GIS - User, email
> ml-node+s1560n4125267h38 at n6.nabble.com
> To unsubscribe from Quantum GIS - User, <a href="
> http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4125267&code=bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg==">click
> here.
> <a 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
> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id&%2361;instant_html%21nabble%3Aemail.naml&base&%2361;nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs&%2361;notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>"
> style="font:9px serif">NAML
>
>
> ------------------------------
> View this message in context: Re: Raster Calculator and LN
> <http://osgeo-org.1560.x6.nabble.com/Raster-Calculator-and-LN-tp5195151p5195208.html>
> Sent from the Quantum GIS - User mailing list archive
> <http://osgeo-org.1560.x6.nabble.com/Quantum-GIS-User-f4125267.html> at
> Nabble.com.
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



-- 
George R. C. Silva
SIGMA Consultoria
----------------------------
http://www.consultoriasigma.com.br/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150325/6a8e13d5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data.zip
Type: application/zip
Size: 27676 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150325/6a8e13d5/attachment-0001.zip>


More information about the Qgis-developer mailing list