GRASS GIS | 31 Oct 15:54 2014

[GRASS GIS] #2466: r.param.scale slow on Windows when there is no data in raster

#2466: r.param.scale slow on Windows when there is no data in raster
--------------------------------+-------------------------------------------
 Reporter:  annakrat            |       Owner:  grass-dev <at> …              
     Type:  defect              |      Status:  new                      
 Priority:  normal              |   Milestone:  7.0.0                    
Component:  Raster              |     Version:  unspecified              
 Keywords:  r.param.scale, nan  |    Platform:  MSWindows 8              
      Cpu:  Unspecified         |  
--------------------------------+-------------------------------------------
 When I run r.param.scale on Windows with raster map with a lot of no data,
 the computation is significantly slower (90 s on Ubuntu, 50 min on
 Windows). r.param.scale doesn't propagate nulls. I read somewhere that
 computing with nan can be slower on some architectures, could this be the
 reason?

 I attached a patch to propagate nans. I also realized that at one point
 during preprocessing, there are large numbers computed (especially with
 big cell size and high window size), so I thought double would be more
 appropriate.

 If there are no objection, I would commit it to test it on Windows.

--

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2466>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
(Continue reading)

Artur Bercik | 30 Oct 22:59 2014
Picon

Is not it possible to use GRASS-GIS through command line access?

Dear GRASS-GIS developers:

I wanted to use GRASS-GIS through command line access in my Windows PC.

So, I have installed GRASS GIS 7.0.0beta3 in drive C of my PC.

But, when I enter the following command in the windows command prompt:

"C:\Program Files (x86)\GRASS GIS 7.0.0beta3\bin\i.cluster.exe"

I got the following error message:

The program can't start because libint-8.dll is missing from your computer. Try reinstalling the program...

Is not it possible to use GRASS-GIS through command line access?

Please help me what should I do to have the command line access to GRASS-GIS.

I hope someone can help me.
Your quick response is highly appreciated.

Thanks in the advance,

Artur
_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Michael Barton | 30 Oct 20:29 2014
Picon

Re: wxpython 3 and errors in grass

At least for me, it is possible to have multiple versions of wx installed. The important thing is which you use when you compile GRASS—determined by the path to wx_config

Michael
______________________________
C. Michael Barton 
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
Tempe, AZ  85287-2402
USA

voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax:          480-965-7671(SHESC), 480-727-0709 (CSDC)


From: Moritz Lennert <mlennert <at> club.worldonline.be>
Subject: [GRASS-dev] wxpython 3 and errors in grass
Date: October 30, 2014 at 10:57:46 AM MST


Hi,

I've recently started to see errors when trying to run gui tools such as the interactive color definition or when I try to add a legend to the map composer, and the windows do not open. The traceback is below.

I imagine that this is linked to the fact that I have now wx 3 installed next to wx 2. But what is the solution ?

Moritz

*********************************

Traceback (most recent call last):
 File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/lmgr/frame.py", line 1182,
in RulesCmd

ctable = RasterColorTable(self)
 File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
752, in __init__

title = _('Create new color table for raster map'),
**kwargs)
 File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
334, in __init__

self._doLayout()
 File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
780, in _doLayout

bodySizer = self._createBody(parent = self.panel)
 File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
469, in _createBody

bodySizer.AddGrowableCol(2)
 File "/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/_core.py", line 15364, in
AddGrowableCol

return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
wx._core
.
PyAssertionError
:
C++ assertion "!m_cols || idx < (size_t)m_cols" failed at
../src/common/sizer.cpp(1980) in AddGrowableCol(): invalid
column index



_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Moritz Lennert | 30 Oct 18:57 2014
Picon

wxpython 3 and errors in grass

Hi,

I've recently started to see errors when trying to run gui tools such as 
the interactive color definition or when I try to add a legend to the 
map composer, and the windows do not open. The traceback is below.

I imagine that this is linked to the fact that I have now wx 3 installed 
next to wx 2. But what is the solution ?

Moritz

*********************************

Traceback (most recent call last):
   File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/lmgr/frame.py", line 1182,
in RulesCmd

ctable = RasterColorTable(self)
   File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
752, in __init__

title = _('Create new color table for raster map'),
**kwargs)
   File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
334, in __init__

self._doLayout()
   File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
780, in _doLayout

bodySizer = self._createBody(parent = self.panel)
   File
"/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py", line
469, in _createBody

bodySizer.AddGrowableCol(2)
   File "/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/_core.py", line 15364, in
AddGrowableCol

return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
wx._core
.
PyAssertionError
:
C++ assertion "!m_cols || idx < (size_t)m_cols" failed at
../src/common/sizer.cpp(1980) in AddGrowableCol(): invalid
column index
Luca Delucchi | 30 Oct 10:27 2014
Picon

python raster_history function broken?

Hi everybody,

The raster_history function on my computer is not working.

In [5]: raster.raster_history('elevation')
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-2ee82b501872> in <module>()
----> 1 raster.raster_history('elevation')

/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/raster.pyc
in raster_history(map)
     40     current_mapset = gisenv()['MAPSET']
     41     if find_file(name=map)['mapset'] == current_mapset:
---> 42         run_command('r.support', map=map, history=os.environ['CMDLINE'])
     43         return True
     44

/usr/lib/python2.7/UserDict.pyc in __getitem__(self, key)
     21         if hasattr(self.__class__, "__missing__"):
     22             return self.__class__.__missing__(self, key)
---> 23         raise KeyError(key)
     24     def __setitem__(self, key, item): self.data[key] = item
     25     def __delitem__(self, key): del self.data[key]

In [8]: 'CMDLINE' in os.environ.keys()
Out[8]: False

What should CMDLINE environment variable do?

--

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
Moritz Lennert | 29 Oct 16:32 2014
Picon

selection of subgroup in i.* modules

Hi,

Before posting a bug report I just wanted to make sure, as I have a 
vague memory that this has been discussed before:

Is it normal that I do not get a dropdown list of subgroups in i.* 
modules (i.gensig, i.maxlik, i.gensigset, ...) after having selected a 
group ?

In g.gui.iclass I get the choice of subgroups after having selected a group.

Moritz
GRASS GIS | 29 Oct 16:25 2014

[GRASS GIS] #2465: g.gui.iclass: allow to save the class definitions

#2465: g.gui.iclass: allow to save the class definitions
--------------------------------------------+-------------------------------
 Reporter:  mlennert                        |       Owner:  grass-dev <at> …              
     Type:  enhancement                     |      Status:  new                      
 Priority:  normal                          |   Milestone:  7.1.0                    
Component:  Default                         |     Version:  svn-releasebranch70      
 Keywords:  g.gui.iclass class definitions  |    Platform:  Unspecified              
      Cpu:  Unspecified                     |  
--------------------------------------------+-------------------------------
 It would be great if g.gui.iclass allowed to save class definitions, even
 without exporting to a vector map.

--

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2465>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 29 Oct 16:24 2014

[GRASS GIS] #2464: g.gui.iclass: show output of signature creation

#2464: g.gui.iclass: show output of signature creation
------------------------------------+---------------------------------------
 Reporter:  mlennert                |       Owner:  grass-dev <at> …              
     Type:  enhancement             |      Status:  new                      
 Priority:  normal                  |   Milestone:  7.1.0                    
Component:  wxGUI                   |     Version:  svn-releasebranch70      
 Keywords:  g.gui.iclass signature  |    Platform:  Unspecified              
      Cpu:  Unspecified             |  
------------------------------------+---------------------------------------
 Sometimes, when training areas are not good enough, trying to create a
 maxlik signature file provokes messages such as "Signature X not
 invertible". Then trying to run i.maxlik on that signature file, you get
 the message "Unable to read signature file" (why that has to be so is a
 different question). So when you see the "not invertible" message, you
 know that you have to improve the training areas (or use a different image
 group).

 However when you use g.gui.iclass, you never see the output of i.gensig
 and so you just go on and then get the i.maxlik message without
 understanging why. g.gui.iclass should allow the user to see the i.gensig
 output.

 Moritz

--

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2464>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Markus Neteler | 29 Oct 14:31 2014

Fwd: New Defects reported by Coverity Scan for grass

Hi,

I have uploaded the current trunk (r62476), some improvements achieved!
    Analysis Summary:
       New defects found: 4
       Defects eliminated: 19

Below the 4 newly introduced issues, hoping for comments/fixes.

Markus

The results are available at http://scan.coverity.com/projects/1038

---------- Forwarded message ----------
From:  <scan-admin <at> coverity.com>
Date: Wed, Oct 29, 2014 at 2:19 PM
Subject: New Defects reported by Coverity Scan for grass
To: neteler <at> osgeo.org

Hi,

Please find the latest report on new defect(s) introduced to grass
found with Coverity Scan.

4 new defect(s) introduced to grass found with Coverity Scan.
19 defect(s), reported by Coverity Scan earlier, were marked fixed in
the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)

** CID 1249942:  Resource leak  (RESOURCE_LEAK)
/raster/r.viewshed/grass.cpp: 661 in save_grid_to_GRASS(grid_ *, char
*, int, outputMode_)()

** CID 1249941:  Untrusted value as argument  (TAINTED_SCALAR)

** CID 1249940:  Untrusted value as argument  (TAINTED_SCALAR)

** CID 1249939:  Uninitialized pointer read  (UNINIT)
/ps/ps.map/ps_vpoints.c: 272 in PS_vpoints_plot()

________________________________________________________________________________________________________
*** CID 1249942:  Resource leak  (RESOURCE_LEAK)
/raster/r.viewshed/grass.cpp: 661 in save_grid_to_GRASS(grid_ *, char
*, int, outputMode_)()
655             }                       /* for j */
656             Rast_put_row(outfd, outrast, type);
657         }                           /* for i */
658         G_percent(1, 1, 1);
659
660         Rast_close(outfd);
>>>     CID 1249942:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "outrast" going out of scope leaks the storage it points to.
661         return;
662     }
663
664
665
666

________________________________________________________________________________________________________
*** CID 1249941:  Untrusted value as argument  (TAINTED_SCALAR)
/lib/segment/open.c: 89 in Segment_open()
83         close(SEG->fd);
84         if (-1 == (SEG->fd = open(SEG->fname, 2))) {
85      unlink(SEG->fname);
86      G_warning(_("Unable to re-open segment file"));
87      return -4;
88         }
>>>     CID 1249941:  Untrusted value as argument  (TAINTED_SCALAR)
>>>     Passing tainted variable "SEG->srows" to a tainted sink.
89         if (0 > (ret = Segment_init(SEG, SEG->fd, nseg))) {
90      close(SEG->fd);
91      unlink(SEG->fname);
92      if (ret == -1) {
93          G_warning(_("Could not read segment file"));
94          return -5;

________________________________________________________________________________________________________
*** CID 1249940:  Untrusted value as argument  (TAINTED_SCALAR)
/lib/segment/init.c: 78 in Segment_init()
72      || !read_off_t(fd, &SEG->ncols)
73      || !read_int(fd, &SEG->srows)
74      || !read_int(fd, &SEG->scols)
75      || !read_int(fd, &SEG->len))
76      return -1;
77
>>>     CID 1249940:  Untrusted value as argument  (TAINTED_SCALAR)
>>>     Passing tainted variable "SEG->srows" to a tainted sink.
78         return seg_setup(SEG);
79     }
80
81
82     static int read_int(int fd, int *n)
83     {

________________________________________________________________________________________________________
*** CID 1249939:  Uninitialized pointer read  (UNINIT)
/ps/ps.map/ps_vpoints.c: 272 in PS_vpoints_plot()
266                 }
267             }
268
269             /* draw the icon */
270             if ((vector.layer[vec].epstype == 0) ||
271                 (vector.layer[vec].epstype == 2 && !eps_exist)) {
>>>     CID 1249939:  Uninitialized pointer read  (UNINIT)
>>>     Using uninitialized value "Symb".
272                 if (Symb != NULL) {
273                     symbol_draw(sname, x, y, size, rotate,
274                                 vector.layer[vec].width);
275                 }
276             }
277         }                           /* for (line) */
278
279         fprintf(PS.fp, "\n");
280         return 0;

________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
http://scan.coverity.com/projects/1038?tab=overview
Markus Neteler | 28 Oct 15:49 2014

How to check if a vector map is multi-layer?

Hi,

it would be nice to have in v.info or v.category the possibility to
check if a vector map comes with multiple layers.
I didn't figure out how to add that in these or one of these modules.
Perhaps I am missing something.

This test is needed e.g. in g.gui.rlisetup.

thanks
Markus
Martin Landa | 27 Oct 21:01 2014
Picon

g.list in G71

Hi,

`g.list` in G71 prints unqualified map names, why?

$ g.list vect
Praha
silnice
BazinyARaseliniste
Hranice
KladyZakladnichMap

The user need to use `-m` flag to understand from which mapset the map is.

$ g.list vect -m
Praha <at> martin
silnice <at> martin
BazinyARaseliniste <at> PERMANENT

I would suggest to print fully-qualified names by default. Any opinion? Martin

--

-- 
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa *
http://www.gismentors.eu/mentors/landa

Gmane