GRASS GIS | 23 Apr 20:06 2014

[GRASS GIS] #2264: t.rast.univar fails when r.univar fails

#2264: t.rast.univar fails when r.univar fails
-------------------------------------+--------------------------------------
 Reporter:  martinl                  |       Owner:  grass-dev <at> …              
     Type:  defect                   |      Status:  new                      
 Priority:  normal                   |   Milestone:  7.0.0                    
Component:  Temporal                 |     Version:  svn-trunk                
 Keywords:  t.rast.univar, r.univar  |    Platform:  Unspecified              
      Cpu:  Unspecified              |  
-------------------------------------+--------------------------------------
 t.rast.univar fails when called r.univar prints no output

 {{{
 Traceback (most recent call last):
   File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
 gnu/scripts/t.rast.univar", line 67, in <module>
     main()
   File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
 gnu/scripts/t.rast.univar", line 63, in main
     "strds", input, where, extended, header, fs)
   File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
 gnu/etc/python/grass/temporal/univar_statistics.py", line 86, in
 print_gridded_dataset_univar_statistics
     string += fs + str(stats["mean"]) + fs + str(stats["min"])
 KeyError: 'mean'
 }}}

 attachment:univar.diff prints a warning

 {{{
 WARNING: Unable to get statistics for raster map
(Continue reading)

GRASS GIS | 23 Apr 19:56 2014

[GRASS GIS] #2263: t.register use fp range for CELL maps

#2263: t.register use fp range for CELL maps
------------------------------+---------------------------------------------
 Reporter:  martinl           |       Owner:  grass-dev <at> …              
     Type:  defect            |      Status:  new                      
 Priority:  minor             |   Milestone:  7.0.0                    
Component:  Temporal          |     Version:  svn-trunk                
 Keywords:  t.register, CELL  |    Platform:  Unspecified              
      Cpu:  Unspecified       |  
------------------------------+---------------------------------------------
 When registering CELL maps by `t.register`, the command print warning

 {{{
 WARNING: Unable to read fp range file for
 }}}

--

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2263>
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 | 23 Apr 19:35 2014

[GRASS GIS] #2262: t.create fails when mapset name contains a dash

#2262: t.create fails when mapset name contains a dash
------------------------------+---------------------------------------------
 Reporter:  martinl           |       Owner:  grass-dev <at> …              
     Type:  defect            |      Status:  new                      
 Priority:  normal            |   Milestone:  7.0.0                    
Component:  Temporal          |     Version:  svn-trunk                
 Keywords:  t.create, mapset  |    Platform:  Unspecified              
      Cpu:  Unspecified       |  
------------------------------+---------------------------------------------
 Steps to reproduce:

 {{{
 g.mapset -c mapset-test
 }}}

 {{{
 t.connect database=/opt/grassdata/nc_spm_08_grass7/mapset-
 test/tgis/sqlite.db
 }}}

 {{{
 t.create output=test title="test" desc="test"

 CREATE TABLE  test_mapset-test_raster_register (
   id VARCHAR NOT NULL, -- This colum is a primary key storing the
 registered raster map.ids
   PRIMARY KEY (id)
 );
 CREATE INDEX test_mapset-test_raster_register_index ON test_mapset-
 test_raster_register (id);INSERT INTO strds_base ( name  ,creator  ,mapset
(Continue reading)

GRASS GIS | 23 Apr 18:08 2014

[GRASS GIS] #2261: failed pygrass doctest

#2261: failed pygrass doctest
-----------------------------+----------------------------------------------
 Reporter:  lucadelu         |       Owner:  grass-dev <at> …              
     Type:  defect           |      Status:  new                      
 Priority:  major            |   Milestone:  7.1.0                    
Component:  Python           |     Version:  svn-trunk                
 Keywords:  pygrass doctest  |    Platform:  All                      
      Cpu:  Unspecified      |  
-----------------------------+----------------------------------------------
 I spend a while to test the doctest of pygrass.

 I fixed several, but there are still some broken. Please check the
 following files

 {{{
 modules/shortcuts.py
 modules/grid/grid.py
 raster/__init__.py
 raster/abstract.py
 raster/category.py
 raster/history.py
 vector/__init__.py
 vector/find.py
 }}}

 When all the doctest will work we should backport to release branch 70

--

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2261>
GRASS GIS <http://grass.osgeo.org>
(Continue reading)

GRASS GIS | 23 Apr 11:30 2014

[GRASS GIS] #2260: wxGUI: encoding error in French locale when trying to delete layer with opacity level set

#2260: wxGUI: encoding error in French locale when trying to delete layer with
opacity level set
------------------------------------+---------------------------------------
 Reporter:  mlennert                |       Owner:  grass-dev <at> …              
     Type:  defect                  |      Status:  new                      
 Priority:  normal                  |   Milestone:  7.0.0                    
Component:  wxGUI                   |     Version:  unspecified              
 Keywords:  wxGUI opacity encoding  |    Platform:  Unspecified              
      Cpu:  Unspecified             |  
------------------------------------+---------------------------------------
 {{{
 > locale
 LANG=fr_BE
 LANGUAGE=fr_BE
 LC_CTYPE=fr_BE.UTF-8
 LC_NUMERIC=C
 LC_TIME=fr_BE.UTF-8
 LC_COLLATE=fr_BE.UTF-8
 LC_MONETARY=fr_BE.UTF-8
 LC_MESSAGES=fr_BE.UTF-8
 LC_PAPER=fr_BE.UTF-8
 LC_NAME=fr_BE.UTF-8
 LC_ADDRESS=fr_BE.UTF-8
 LC_TELEPHONE=fr_BE.UTF-8
 LC_MEASUREMENT=fr_BE.UTF-8
 LC_IDENTIFICATION=fr_BE.UTF-8
 LC_ALL=
 }}}


(Continue reading)

Markus Neteler | 23 Apr 09:18 2014

GRASS GIS 7.0.0beta2 released

We are pleased to announce the second beta release of a new version of
GRASS GIS 7.0.0.

See also our detailed announcement:
http://trac.osgeo.org/grass/wiki/Release/7.0.0beta-News

Source code package:
http://grass.osgeo.org/grass70/source/
-> grass-7.0.0beta2.tar.gz

SVN branch:
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0

SVN tag:
http://trac.osgeo.org/grass/browser/grass/tags/release_20140420_grass_7_0_0beta2

Please test on "any" platform.

The GRASS Development Team
GRASS GIS | 22 Apr 20:36 2014

[GRASS GIS] #2259: some temporal modules have empty manual page

#2259: some temporal modules have empty manual page
-------------------------+--------------------------------------------------
 Reporter:  martinl      |       Owner:  grass-dev <at> …              
     Type:  task         |      Status:  new                      
 Priority:  blocker      |   Milestone:  7.0.0                    
Component:  Docs         |     Version:  svn-trunk                
 Keywords:  temporal     |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 List of temporal modules with empty manual page:

 * t.rast.out.vtk
 * t.rast.to.rast3
 * t.rast3d.extract
 * t.rast3d.list
 * t.rast3d.mapcalc
 * t.rast3d.univar
 * t.remove
 * t.sample
 * t.support
 * t.topology
 * t.unregister
 * t.vect.db.select
 * t.vect.export
 * t.vect.extract
 * t.vect.import
 * t.vect.list
 * t.vect.observe.strds
 * t.vect.univar
 * t.vect.what.strds
(Continue reading)

GRASS GIS | 22 Apr 19:25 2014

[GRASS GIS] #2258: t.register creates DB always in the PERMANENT

#2258: t.register creates DB always in the PERMANENT
-------------------------+--------------------------------------------------
 Reporter:  martinl      |       Owner:  grass-dev <at> …              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Temporal     |     Version:  unspecified              
 Keywords:  t.register   |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 `t.register` creates DB not in the current mapset, but always in
 PERMANENT.

 {{{
 g.mapset -p
 modis2002lst_1
 }}}

 {{{
 t.create output=modis title="MODIS 2002" desc="Ukazkovy casoprostorovy
 dataset MODIS"
 Create temporal database:
 /opt/grassdata/nc_spm_08_grass7/PERMANENT/tgis/sqlite.db
 }}}

--

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

_______________________________________________
grass-dev mailing list
(Continue reading)

Martin Landa | 20 Apr 13:38 2014
Picon

Re: [GRASS-SVN] r59812 - in grass/branches/releasebranch_7_0: man tools

Hi Vaclav,

2014-04-19 23:26 GMT+02:00 Vaclav Petras <wenzeslaus <at> gmail.com>:

>> No problem to them come up with a different approach as suggested by
>> you and redo it again. But we don't know if JS will work while we have
>> tested things with <div> so far. Small steps...
>>
>> So, don't worry that anyone wants to stop anyone else from revisiting
>> the TOC mechanism completely :) But we need something now (and we have
>> it). Newer approaches may evolve of course.

I finished simple version of TOC and will be happy if you will work on
more fancy TOC in trunk...

> All right then. I was not asking because of my JS proposal, but mainly
> because it is an exception to no-new-features policy.

Well, we are probably too far from final release to ask for "feature
freeze". I would say that we shouldn't do any major changes in
relbr70, only bug fixes, simple changes and documentation
improvements. Strict "feature freeze" will start I guess with RC1. It
will be much more clear when have fixed release cycle of course.

Martin

--

-- 
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
Markus Neteler | 19 Apr 23:34 2014

Re: [GRASS-SVN] r59812 - in grass/branches/releasebranch_7_0: man tools

On Sat, Apr 19, 2014 at 11:26 PM, Vaclav Petras <wenzeslaus <at> gmail.com> wrote:
...
> All right then. I was not asking because of my JS proposal, but mainly
> because it is an exception to no-new-features policy.

I am not aware that we are in feature freeze mode.
We have a beta1 which some people even did not want to see and call it
"tech preview" (whatever that is). Due to the release history the word
"beta" was chosen as it existed since 4.2.1betaX (that was back in
1998 or so).
Some others even don't want the "releasebranch_7_0" at all...

Rather than freezing development altogether, especially keeping the
goodies away from the "normal" user I prefer to keep the ball rolling
and go on. We should really not discuss every minor backport, at least
I have no time for that.

> Anyway, I'm glad you work on manual now.

Yes, the scope is to de-ugly-fy it a bit. Much more could be done,
especially adding examples (hey power-users, please donate some, even
here in the list!).

Markus
Vaclav Petras | 19 Apr 22:55 2014
Picon

Re: [GRASS-SVN] r59812 - in grass/branches/releasebranch_7_0: man tools

Martin, I'm not sure if this [59812] is appropriate because it is not stabilized yet [59816] and overall, it is a new feature although it is just in documentation.




On Sat, Apr 19, 2014 at 2:38 PM, <svn_grass <at> osgeo.org> wrote:
Author: martinl
Date: 2014-04-19 11:38:08 -0700 (Sat, 19 Apr 2014)
New Revision: 59812

Modified:
   grass/branches/releasebranch_7_0/man/build_html.py
   grass/branches/releasebranch_7_0/man/grassdocs.css
   grass/branches/releasebranch_7_0/tools/mkhtml.py
Log:
Backport TOC manual generation from trunk


Modified: grass/branches/releasebranch_7_0/man/build_html.py
===================================================================
--- grass/branches/releasebranch_7_0/man/build_html.py  2014-04-19 18:33:48 UTC (rev 59811)
+++ grass/branches/releasebranch_7_0/man/build_html.py  2014-04-19 18:38:08 UTC (rev 59812)
<at> <at> -48,7 +48,7 <at> <at>
 header2_tmpl = string.Template(\
 r""" <link rel="stylesheet" href="grassdocs.css" type="text/css">
 </head>
-<body bgcolor="#FFFFFF">
+<body style="width: 99%">

 <!-- this file is generated by man/build_html.py -->

<at> <at> -249,7 +249,7 <at> <at>
 r"""
 <link rel="stylesheet" href="grassdocs.css" type="text/css">
 </head>
-<body bgcolor="white">
+<body style="width: 99%">

 <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
 <h2>Topics</h2>
<at> <at> -261,7 +261,7 <at> <at>
 r"""
 <link rel="stylesheet" href="grassdocs.css" type="text/css">
 </head>
-<body bgcolor="white">
+<body style="width: 99%">

 <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
 <h2>Keywords - Index of GRASS GIS modules</h2>

Modified: grass/branches/releasebranch_7_0/man/grassdocs.css
===================================================================
--- grass/branches/releasebranch_7_0/man/grassdocs.css  2014-04-19 18:33:48 UTC (rev 59811)
+++ grass/branches/releasebranch_7_0/man/grassdocs.css  2014-04-19 18:38:08 UTC (rev 59812)
<at> <at> -14,6 +14,7 <at> <at>
     background: white;
     color: black;
     font-family: arial,sans-serif;
+    width: 80%;
 }

 h1{
<at> <at> -49,7 +50,7 <at> <at>
 }

 div.code{
-    width: 95%;
+    width: 100%;
     color : black;
     background-color: rgb(90%, 90%, 90%);
     padding-left: 1em;
<at> <at> -86,3 +87,32 <at> <at>
 td {
     padding: 5px;
 }
+
+div.toc{
+    background-color: transparent;
+    position: fixed;
+    border: solid 1px rgb(25%, 60%, 25%);
+    top: 5px;
+    right: 5px;
+    width: 17%;
+    line-height: 120%;
+    font-weight: bold;
+    font-size: small;
+    font-family: arial,sans-serif;
+}
+
+li.toc {
+   margin-left: -15px;
+   padding: 3px 3px; 3px; 3px;
+   color: rgb(25%, 60%, 25%);
+}
+
+ul.toc {
+   margin-top: 3px;
+   margin-bottom: 3px;
+}
+
+a.toc {
+    color: rgb(25%, 60%, 25%);
+    text-decoration: none;
+}

Modified: grass/branches/releasebranch_7_0/tools/mkhtml.py
===================================================================
--- grass/branches/releasebranch_7_0/tools/mkhtml.py    2014-04-19 18:33:48 UTC (rev 59811)
+++ grass/branches/releasebranch_7_0/tools/mkhtml.py    2014-04-19 18:38:08 UTC (rev 59812)
<at> <at> -2,12 +2,12 <at> <at>

 ############################################################################
 #
-# MODULE:       mkhtml.py
+# MODULE:       Builds manual pages
 # AUTHOR(S):    Markus Neteler
 #               Glynn Clements
 #               Martin Landa <landa.martin gmail.com>
 # PURPOSE:      Create HTML manual page snippets
-# COPYRIGHT:    (C) 2007, 2009, 2011-2012 by Glynn Clements
+# COPYRIGHT:    (C) 2007-2014 by Glynn Clements
 #                and the GRASS Development Team
 #
 #               This program is free software under the GNU General
<at> <at> -21,6 +21,7 <at> <at>
 import string
 import re
 from datetime import datetime
+from HTMLParser import HTMLParser

 pgm = sys.argv[1]

<at> <at> -61,6 +62,7 <at> <at>
 </html>
 """)

+
 def read_file(name):
     try:
         f = open(name, 'rb')
<at> <at> -70,11 +72,101 <at> <at>
     except IOError:
         return ""

+
+def create_toc(src_data):
+    class MyHTMLParser(HTMLParser):
+        def __init__(self):
+            self.reset()
+            self.idx = 1
+            self.tag_curr = ''
+            self.tag_last = ''
+            self.process_text = False
+            self.data = []
+            self.tags_allowed = ('h1', 'h2', 'h3')
+            self.tags_ignored = ('img')
+            self.text = ''
+
+        def handle_starttag(self, tag, attrs):
+            if tag in self.tags_allowed:
+                self.process_text = True
+            self.tag_last = self.tag_curr
+            self.tag_curr = tag
+
+        def handle_endtag(self, tag):
+            if tag in self.tags_allowed:
+                self.data.append((tag, '%s_%d' % (tag, self.idx),
+                                  self.text))
+                self.idx += 1
+                self.process_text = False
+                self.text = ''
+
+            self.tag_curr = self.tag_last
+
+        def handle_data(self, data):
+            if not self.process_text:
+                return
+            if self.tag_curr in self.tags_allowed or self.tag_curr in self.tags_ignored:
+                self.text += data
+            else:
+                self.text += '<%s>%s</%s>' % (self.tag_curr, data, self.tag_curr)
+
+    # instantiate the parser and fed it some HTML
+    parser = MyHTMLParser()
+    parser.feed(src_data)
+
+    return parser.data
+
+
+def write_toc(data):
+    if not data:
+        return
+
+    fd = sys.stdout
+    fd.write('<div class="toc">\n')
+    fd.write('<ul class="toc">\n')
+    first = True
+    in_h3 = False
+    indent = 4
+    for tag, href, text in data:
+        if tag == 'h3' and not in_h3:
+            fd.write('\n%s<ul class="toc">\n' % (' ' * indent))
+            indent += 4
+            in_h3 = True
+        elif not first:
+            fd.write('</li>\n')
+
+        if tag == 'h2' and in_h3:
+            indent -= 4
+            fd.write('%s</ul></li>\n' % (' ' * indent))
+            in_h3 = False
+
+        fd.write('%s<li class="toc"><a href="#%s" class="toc">%s</a>' % \
+                     (' ' * indent, href, text))
+        first = False
+
+    fd.write('</li>\n</ul>\n')
+    fd.write('</div>\n')
+
+def update_toc(data):
+    ret_data = []
+    pat = re.compile(r'(<(h\d)>)(.+)(</h\d>)')
+    idx = 1
+    for line in data.splitlines():
+        if pat.search(line):
+            xline = pat.split(line)
+            line = xline[1] + '<a name="%s_%d">' % (xline[2], idx) + xline[3] + '</a>' + xline[4]
+            idx += 1
+        ret_data.append(line)
+
+    return '\n'.join(ret_data)
+
+# process header
 src_data = read_file(src_file)
 name = re.search('(<!-- meta page name:)(.*)(-->)', src_data, re.IGNORECASE)
 if name:
     pgm = name.group(2).strip().split('-', 1)[0].strip()
-desc = re.search('(<!-- meta page description:)(.*)(-->)', src_data, re.IGNORECASE)
+desc = re.search('(<!-- meta page description:)(.*)(-->)', src_data,
+                 re.IGNORECASE)
 if desc:
     pgm = desc.group(2).strip()
     header_tmpl = string.Template(header_base + header_nopgm)
<at> <at> -84,14 +176,18 <at> <at>
 if not re.search('<html>', src_data, re.IGNORECASE):
     tmp_data = read_file(tmp_file)
     if not re.search('<html>', tmp_data, re.IGNORECASE):
-        sys.stdout.write(header_tmpl.substitute(PGM = pgm))
+        sys.stdout.write(header_tmpl.substitute(PGM=pgm))
     if tmp_data:
         for line in tmp_data.splitlines(True):
             if not re.search('</body>|</html>', line, re.IGNORECASE):
                 sys.stdout.write(line)

-sys.stdout.write(src_data)
+# create TOC
+write_toc(create_toc(src_data))

+# process body
+sys.stdout.write(update_toc(src_data))
+
 # if </html> is found, suppose a complete html is provided.
 # otherwise, generate module class reference:
 if re.search('</html>', src_data, re.IGNORECASE):
<at> <at> -112,6 +208,7 <at> <at>
     'v' : 'vector'
     }

+# process footer
 index = re.search('(<!-- meta page index:)(.*)(-->)', src_data, re.IGNORECASE)
 if index:
     index_name_cap = index_name = index.group(2).strip()
<at> <at> -120,13 +217,16 <at> <at>
     index_name = index_names.get(mod_class, '')
     index_name_cap = index_name.title()

-grass_version = os.getenv("VERSION_NUMBER", "unknown")
+grass_version = os.getenv("VERSION_NUMBER", "unknown")
 year = os.getenv("VERSION_DATE")
 if not year:
     year = str(datetime.now().year)

 if index_name:
-    sys.stdout.write(footer_index.substitute(INDEXNAME = index_name, INDEXNAMECAP = index_name_cap,
-                                             YEAR = year, GRASS_VERSION = grass_version))
+    sys.stdout.write(footer_index.substitute(INDEXNAME=index_name,
+                                             INDEXNAMECAP=index_name_cap,
+                                             YEAR=year,
+                                             GRASS_VERSION=grass_version))
 else:
-    sys.stdout.write(footer_noindex.substitute(YEAR = year, GRASS_VERSION = grass_version))
+    sys.stdout.write(footer_noindex.substitute(YEAR=year,
+                                               GRASS_VERSION=grass_version))

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

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

Gmane