On Sun, 31 May 2015 14:23:13 +0200, Giacomo Fontanelli <giacomofontanell...@gmail.com> wrote:
> Dear folks > Fernando was right. > > as I lounch LC_ALL=C qgis > I find a correct result. > > > Now I have to find the way to set point as decimal separator on my OS > set with Italian settings. Sorry for the long delay. There are a number of options, I think that the worse of all is block the i18n (internationalization) and l10n (localization) in your computer. You can just for qgis alter the driver script (/usr/bin/qgis in my machine) and inser a line : export LC_ALL=C But this would cripple your qgis for Italian language. I would suggest you to try first to call qgis as: LC_NUMERIC=en_US.UTF-8 qgis If it results, you can change the drive script inserting a line: export LC_NUMERIC=en_US.UTF-8 in some place at the start of the script. If you use a launcher somewhere, for example an icon in desktop or on a panel, you can customise it changing the the launch command, as above, to: bash -c "LC_NUMERIC=en_US.UTF-8 /usr/bin/qgis %F" Hope this helps. > > Thanx > > On Sun, May 31, 2015 at 2:19 PM, Giacomo Fontanelli < > giacomofontanell...@gmail.com> wrote: > > > Dear Fernando it works > > > > as I lounch LC_ALL=C qgis > > I find a correct result. > > > > Now the question is: How can set the point as decimal separator as > > default on my PC? > > > > Thank you very much > > > > Giacomo > > > > On Fri, May 29, 2015 at 11:16 PM, Fernando M. Roxo da Motta < > > pe...@roxo.org> wrote: > > > >> On Fri, 29 May 2015 16:42:15 -0300, George Silva > >> <georger.si...@gmail.com> wrote: > >> > >> > >> > No this is not a localization problem. I just tested this. > >> > > >> > Raster calculator makes expressions with ',' invalid. At least, > >> > on my machine (Mint 14) > >> > > >> > This is the output of my locales: > >> > >> Pretty much like mine, except that I don't have any > >> "en_US.UTF-8". ;) > >> > >> > > >> > LANG=en_US.UTF-8 > >> > LANGUAGE= > >> > LC_CTYPE="en_US.UTF-8" > >> > LC_NUMERIC=pt_BR.UTF-8 > >> > LC_TIME="en_US.UTF-8" > >> > LC_COLLATE="en_US.UTF-8" > >> > LC_MONETARY=pt_BR.UTF-8 > >> > LC_MESSAGES="en_US.UTF-8" > >> > LC_PAPER=pt_BR.UTF-8 > >> > LC_NAME=pt_BR.UTF-8 > >> > LC_ADDRESS=pt_BR.UTF-8 > >> > LC_TELEPHONE=pt_BR.UTF-8 > >> > LC_MEASUREMENT=pt_BR.UTF-8 > >> > LC_IDENTIFICATION=pt_BR.UTF-8 > >> > LC_ALL= > >> > > >> > I just retried this. Grabbed a raster with floating point values > >> > and added 1.1 - the result is just an add by 1, without the 0.1. > >> > Giovanni was right about this, something is truncating these > >> > values in Raster Calculator to integers, and my input was 3.1, > >> > and the output 4.1 (added just 1, instead of 1.1) when it should > >> > be 4.2. > >> > >> I still think it can have some relation with locale, perhaps in > >> another sense. I don't know if I will be able to explain myself > >> here. > >> > >> I have noticed some inconsistency in qgis on this aspect. I > >> already stumbled on at least one situation where the comma > >> separator weren't accepted and I tried to divide by the inverse. > >> It was with qgis 2.6 (I am using 2.8.2 in [Xu|U]buntu), at the > >> time I was trying to convert the line length from meters to > >> kilometres multiplying by 0.001, IIRC everything turned into > >> zero. After that, just in case, I tried to divide by 1000 and I > >> got the amount of meters I expected. > >> > >> There seems to exist some dark place between the keyboard (Qt?) > >> and the code where the localization seems to be mixed up and > >> completely screwed up. > >> > >> If I can suggest a test to Giacomo and George, in your Linux > >> installation open a terminal emulator (don't matter which one) and > >> try to execute qgis the following way: > >> > >> LC_ALL=C qgis > >> > >> This should "remove" the localization support and work with dot as > >> the decimal separator. If it still gets the wrong result with the > >> expression "band@map" * 0.1, I think that the problem can be > >> intrinsic to the code. If it works correctly I think the problem > >> is somewhat related to the interface with Qt. > >> > >> I don't normally work with raster layers, but if you have a > >> (very) small example with floating point attribute I can try it > >> here. > >> > >> > >> Best regards. > >> > >> > >> > >> > >> > > >> > George > >> > > >> > On Fri, May 29, 2015 at 4:27 PM, Fernando M. Roxo da Motta > >> > <pe...@roxo.org> wrote: > >> > > >> > > On Fri, 29 May 2015 10:20:05 +0200, Giacomo Fontanelli > >> > > <giacomofontanell...@gmail.com> wrote: > >> > > > >> > > > >> > > > I used to work with qgis 2.8.1 in Lubuntu and in windows7. > >> > > > > >> > > > Each time I try to multiplicate a map for a number comprise > >> > > > between 0 and 1 (i.e. 0.1) I get a good results on windows > >> > > > OS, but I get a map with only 0 and NaN on Linux. > >> > > > > >> > > > Further, I get a correct result on Lubuntu if I divide by 10 > >> > > > instead of multiplicate by 0.1. > >> > > > >> > > It looks very much like a localization problem. I guess > >> > > that with this name you are using a platform with Italian > >> > > language. I think that the standard there is the same I have > >> > > in Brazil, that is the decimal separator is comma (,) instead > >> > > of dot (.). Try to use: > >> > > > >> > > > >> > > "band@map" * 0,1 > >> > > > >> > > > >> > > Hope this helps. > >> > > > >> > > > >> > > > > >> > > > Conclusion > >> > > > > >> > > > "band@map" * 0.1 on windows = OK "band@map" * 0.1 on lubuntu > >> > > > = only 0 and NaN "band@map" / 10 on lubuntu = ok. > >> > > > > >> > > > I use the same gdal version and I always get a correct > >> > > > Float32 map. > >> > > > > >> > > > Canyou help me? > >> > > > > >> > > > Thanx > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > Roxo > >> > > > >> > > -- > >> > > ---------------- Non luctari, ludare -------------------+ > >> > > WYSIWYG Fernando M. Roxo da Motta > >> > > <pe...@roxo.org> | Editor? Except where > >> > > explicitly stated I speak on my own behalf.| VI !! ( Usuário > >> > > Linux registrado #39505 ) | I see text, > >> > > ------------ Quis custodiet ipsos custodes?-------------+ I > >> > > get text! > >> > > > >> > > _______________________________________________ > >> > > Qgis-user mailing list > >> > > Qgis-user@lists.osgeo.org > >> > > http://lists.osgeo.org/mailman/listinfo/qgis-user > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > >> > >> > >> > >> > >> Roxo > >> > >> -- > >> ---------------- Non luctari, ludare -------------------+ WYSIWYG > >> Fernando M. Roxo da Motta <pe...@roxo.org> | Editor? > >> Except where explicitly stated I speak on my own behalf.| VI !! > >> ( Usuário Linux registrado #39505 ) | I see > >> text, ------------ Quis custodiet ipsos custodes?-------------+ I > >> get text! > >> > >> _______________________________________________ > >> Qgis-user mailing list > >> Qgis-user@lists.osgeo.org > >> http://lists.osgeo.org/mailman/listinfo/qgis-user > >> > > > > Roxo -- ---------------- Non luctari, ludare -------------------+ WYSIWYG Fernando M. Roxo da Motta <pe...@roxo.org> | Editor? Except where explicitly stated I speak on my own behalf.| VI !! ( Usuário Linux registrado #39505 ) | I see text, ------------ Quis custodiet ipsos custodes?-------------+ I get text! _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user