Luca Delucchi | 25 May 13:42 2015
Picon

Dr. Memory

Hi devs,

maybe could be useful for debug

http://www.drmemory.org/

--

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
Markus Neteler | 24 May 14:36 2015

Re: Fwd: [SAC] OSGeo "tracsvn" VM down

FYI

Thanks to Martin Spott's many extra hours yesterday, the SVN server is
back online.

Markus
Markus Neteler | 23 May 12:56 2015

Fwd: [SAC] OSGeo "tracsvn" VM down

FYI - work in progress but it probably depends on the sysadmins who
host the OSGeo infrastructure.

Anyone with Gentoo and KVM is welcome to help Martin Spott.

Markus

---------- Forwarded message ----------
From: Martin Spott <Martin.Spott <at> mgras.net>
Date: Sat, May 23, 2015 at 12:34 PM
Subject: [SAC] OSGeo "tracsvn" VM down
To: support <at> osuosl.org
Cc: System Administration Committee Discussion/OSGeo <sac <at> lists.osgeo.org>

Hi,
I wonder how to restart the "tracsvn.osgeo.osuosl.org" VM on the
"osgeo3" from command line.

We found out that the VM is down but the Ganeti Web Manager told me it
was running. But apparently it was unavailable (no HTTP, no SSH, no
ping).
I called an "immediate shutdown" of the VM in order to get into a
consistent state. After calling a subsequent "start" in the Ganetí Web
Manager I was told:

"Error checking bridges on destination node 'osgeo3.osuosl.bak': Error
60: SSL certificate problem: certificate has expired"

I do have access to the physical "osgeo3" machine but I have no idea on
how to start KVM guests on Gentoo (many KVM support pages recommend
(Continue reading)

Laurent C. | 22 May 22:54 2015
Picon

Temporal GIS: best practice to access a map at a specific time?

Hi all,

I'm working on a python module which compute superficial flows using simplified shallow water equations. It already works quite well and export results as temporal data sets.
But I'd like to add the possibility to work with temporal data sets as input (typically rainfall or other input flows).
I've looked at the documentation of the temporal module, but I haven't figure out what would be the best way to access a strds at a specified time.
There might be something with get_registered_maps, but I don't know how to select the map when the simulation time is between 'start-time' and 'end-time'. I don't know is SQL would be of any help here.

currently my program looks like this:

************
load grass maps as numpy arrays

while not sim_clock >= sim_duration:
    calculate time-step duration
    calculate flow and water depth
    write results

register produced maps in space-time dataset
************

I was thinking of checking at the beginning of the while loop if there is the current input map is still valid for the current time-step, and ielse loading the new one. Does this approach make sense and how could I do that?

Thanks for your time.

Regards,
Laurent
_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 22 May 11:40 2015

[GRASS GIS] #2684: i.segment do not recycle IDnumbers (categories)

#2684: i.segment do not recycle IDnumbers (categories)
---------------------------+-------------------------
 Reporter:  franziskabeau  |      Owner:  grass-dev <at> …
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:  7.0.1
Component:  Default        |    Version:  7.0.0
 Keywords:                 |        CPU:  x86-64
 Platform:  MSWindows 7    |
---------------------------+-------------------------
 Hello,
 I have the problem, that I can't export segmentationresults into geotiff.
 The following ERROR occurs:

 ERROR 6: SetColorTable() only supported for Byte or UInt16
 bands in TIFF format.
 Warning 1: Lost metadata writing to GeoTIFF ... too large to
 fit in tag.
 Using GDAL data type <Int32>
 Exporting raster data to GTiff format...
 WARNING: Too many values, color table cut to 65535 entries

 The problem is, that I only had created like 28.502 segments with
 i.segment. When I assign new IDs with r.clump I can export the segmentated
 raster picture, but it doesn't work stabil. It seems like during the
 i.segment algorithm the IDs of the segments are mulitplied by themselves
 or something like this.

 If you have questions be free to contact me. I really want to use the
 i.segment algorithm an export my results. Thank you.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2684>
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 | 21 May 15:18 2015

[GRASS GIS] #2683: grass 7 doesn't start in text mode on CentOS 7

#2683: grass 7 doesn't start in text mode on CentOS 7
---------------------------+-------------------------
 Reporter:  morenocomelli  |      Owner:  grass-dev <at> …
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:  7.0.1
Component:  Default        |    Version:  unspecified
 Keywords:                 |        CPU:  Unspecified
 Platform:  Unspecified    |
---------------------------+-------------------------
 I'm trying to start grass 7 on CentOS 7 in text mode (Grass 6.4.4
 installed via yum works correctly).
 On Centos with GUI:

 {{{
 # grass70 -text
 ERROR: Unable to start GRASS. You can:
  - Launch GRASS with '-gui' switch (`grass70 -gui`)
  - Create manually GISRC file (/root/.grass7/rc)
  - Launch GRASS with path to the location/mapset as an argument (`grass70
 /path/to/location/mapset`)
 Exiting...
 }}}

 On CentOS without GUI:
 {{{
 # grass70 -text
 WARNING: Searched for a web browser, but none found
 ERROR: Unable to start GRASS. You can:
  - Launch GRASS with '-gui' switch (`grass70 -gui`)
  - Create manually GISRC file (/root/.grass7/rc)
  - Launch GRASS with path to the location/mapset as an argument (`grass70
 /path/to/location/mapset`)
 Exiting...
 }}}

 {{{
 #grass70
 WARNING: Searched for a web browser, but none found
 Starting GRASS GIS...
 WARNING: It appears that the X Windows system is not active.
 A graphical based user interface is not supported.
 Switching to text based interface mode.

 Hit RETURN to continue

 ERROR: Path '/home/download/grass-7.0.0/<UNKNOWN>/<UNKNOWN>' doesn't exist
 Exiting...
 }}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2683>
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 | 21 May 15:05 2015

[GRASS GIS] #2682: Gtk critical message starting grass

#2682: Gtk critical message starting grass
---------------------------+-------------------------
 Reporter:  morenocomelli  |      Owner:  grass-dev <at> …
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:  7.0.1
Component:  Default        |    Version:  7.0.0
 Keywords:                 |        CPU:  Unspecified
 Platform:  Linux          |
---------------------------+-------------------------
 When starting grass 7.0.0 or grass 6.4.4 in CentOS 7 (GUI), the program
 works, but I get messages like:

 **`(python:4464): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion
 'GTK_IS_WIDGET (widget)' failed`**

 where the error code **python:####** varies every time.

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

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Vaclav Petras | 21 May 05:31 2015
Picon

Setting of GRASS_ADDON_PATH in grass.py has a "code smell"

Hi,


when analyzed with Pylint [1, 2] the function set_paths() in grass.py [3] triggers an unused variable warning in the following block of code:


addon_path = os.getenv('GRASS_ADDON_PATH')

if addon_path:

    for path in addon_path.split(os.pathsep):

        path_prepend(addon_path, 'PATH')


Is this an intention or a mistake?


I would say that a mistake but since I don't remember any complains about not working addons with multiple paths (which, I think, happens when you run script from GUI). Actually, now I remember that I might have seen addon paths duplicated in the PATH variable which is exactly what the code does.


Thanks,

Vaclav


[1] http://grasswiki.osgeo.org/wiki/Tools_for_Python_programming

[2] http://trac.osgeo.org/grass/browser/grass/trunk/tools/pylintrc.txt

[3] https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L503

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Vaclav Petras | 21 May 05:26 2015
Picon

clean_temp.c versus deleting mapset's .tmp

Hi,

when I was working on grass.py I saw there usage of clean_temp function which calls clean_temp program and deletion of the whole .tmp directory and I can't make sense out of it.

It seems to me that clean_temp (lib/init/clean_temp.c) executable called in grass.py is not necessary because the whole .tmp directory is anyway deleted at the beginning and at the end of the session. clean_temp is doing some special cleaning according to pids but whole directory is deleted anyway at the end. Can the whole lib/init/clean_temp.c can be safely removed? Or maybe it has some meaning when executed before the session starts because at that point .tmp is not deleted. Can someone please clarify this for me here or in the source code?

Also, the clean_temp function is called manually while other cleanups are called using at exit mechanism. Supposing we need the clean up at all, I'm not sure if there is any reason to keep it explicit. Perhaps this was just inconsistency, not an intention.

Thanks for your opinions,
Vaclav

Related code:
http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1486
http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1741
http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1801
http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1702
https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/clean_temp.c
_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Markus Neteler | 20 May 11:41 2015

wxGUI: g.mapsets -s broken after removal of GuiModuleMain()

Hi,

in r65286 I have removed the non-existing GuiModuleMain() (see also
r65163), now the GUI variant of g.mapsets which is launched with
g.mapsets -s no longer completes after hitting the "OK" or "Cancel"
buttons.

How to solve this?

thanks
Markus
Pietro | 20 May 11:14 2015
Picon

replace G_debug C function with a python one only for the Module class (pygrass)

Dear all,

I would like to remove the line 680:

{{{
get_msgr().debug(1, self.get_bash())
}}}

from the run method of the Module class.

I would like to remove it because the get_msgr is using ctypes (grass.lib.gis),
this it means that all the LD_LIBRARY_PATH must be set correctly.

Set the LD_LIBRARY_PATH could be a problem, for example if you try to use
the class from QGIS, because it require to launch QGIS with something like;

{{{
#!/usr/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GISBASE/lib \
PATH=$PATH:$GISBASE/bin:$GISBASE/scripts:$HOME/.grass7/addons/bin:$HOME/.grass7/addons/scripts
\
PYTHONPATH=$PYTHONPATH:$GISBASE/etc/python:$GISBASE/gui/wxpython \
GRASS_ADDON_BASE=$HOME/.grass7/addons qgis
}}}

On the other hand, I understand that we need the debug. therefore I
was thinking to provide the same functionalities but avoiding to call
directly the G_debug functions, G_debug is define as follow:

{{{
int G_debug(int level, const char *msg, ...)
{
    char *filen;
    va_list ap;
    FILE *fd;

    G_init_debug();

    if (grass_debug_level >= level) {
va_start(ap, msg);

filen = getenv("GRASS_DEBUG_FILE");
if (filen != NULL) {
   fd = fopen(filen, "a");
   if (!fd) {
G_warning(_("Cannot open debug file '%s'"), filen);
return 0;
   }
}
else {
   fd = stderr;
}

fprintf(fd, "D%d/%d: ", level, grass_debug_level);
vfprintf(fd, msg, ap);
fprintf(fd, "\n");
fflush(fd);

if (filen != NULL)
   fclose(fd);

va_end(ap);
    }

    return 1;
}
}}}

and I'm defining a function (probably is still too simple) such as:

{{{
from __future__ import print_function
import os
import sys

def get_env():
    gisrc = os.environ.get('GISRC')
    if gisrc is None:
        raise RunError('You are not in a GRASS session')
    with open(gisrc, mode='r') as grc:
        env = {k.strip(): v.strip() for k, v in [row.split(':') for
row in grc if row]}
    return env

def get_debug_level():
    debug = get_env().get('DEBUG')
    return int(debug) if debug else 0

def G_debug(level, *msg):
    debug_level = get_debug_level()
    if debug_level >= level:
        dfile = os.environ.get("GRASS_DEBUG_FILE")
        fd = sys.stderr if dfile is None else open(dfile, mode='a')
        print("D%d/%d: " % (level, debug_level), *msg, end='\n', file=fd)
}}}

Concerning the performance of course the python version is slower but
only 6 times:

{{{
%timeit G_debug_python(5, 'provami...')
The slowest run took 9.75 times longer than the fastest. This could
mean that an intermediate result is being cached
100000 loops, best of 3: 13.8 µs per loop

In [25]: %timeit G_debug_grass(5, 'provami...')
The slowest run took 32.00 times longer than the fastest. This could
mean that an intermediate result is being cached
100000 loops, best of 3: 2.35 µs per loop
}}}

But in this way the ctypes are not required by the pygrass.modules
classes and functions.

What do you think?
Other ideas and/or solutions?

Best regards

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

Gmane