[GRASS-dev] Re: [GRASS GIS] #92: Could not set snapping threshold

2008-04-02 Thread GRASS GIS
#92: Could not set snapping threshold
---+
  Reporter:  zanollim  |   Owner:  martinl  
  Type:  defect|  Status:  closed   
  Priority:  minor |   Milestone:  6.4.0
 Component:  Python| Version:  svn-trunk
Resolution:  fixed |Keywords:  wxGUI, vdigit
---+
Changes (by martinl):

  * status:  assigned = closed
  * resolution:  = fixed

-- 
Ticket URL: http://trac.osgeo.org/grass/ticket/92#comment:2
GRASS GIS http://grass.osgeo.org
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Google Summer of Code Deadline extended

2008-04-02 Thread Markus Neteler
On Tue, Apr 1, 2008 at 3:32 PM, Hamish [EMAIL PROTECTED] wrote:
  Here's a flyer about it to post in the hallways of your local campus or
  to distribute to your students:
   http://svn.osgeo.org/osgeo/marketing/flyer/
(can someone with access update that with the new dates?)

I have updated all flyers for the extended deadline.

Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] New GRASS icons

2008-04-02 Thread Markus Neteler
Hi all,

(cc Marco Hugentobler for QGIS, refering to
  http://www.szczepanek.pl/icons.grass/
)

On Thu, Mar 27, 2008 at 10:31 AM, Robert Szczepanek [EMAIL PROTECTED] wrote:
  hamish_b wrote:
  
   (...)
   I guess eventually we can push compatible icons over to QGIS so the user
   only has to remember one icon per task and so using the QGIS toolbox
   becomes a familiar and natural experience ( vice versa).
   (...)
   Hamish
  

  I try to make it as universal as possible.
  At the beggining I looked at most the popular GIS systems (also QGIS), but
  sometimes true design pearls are hidden in almost unknown GIS (or related)
  systems.
  So all suggestions from you wil be very valuable.

  thanks,
  Robert


I would like to strongly recommend the colaboration with QGIS for the
plugins. Apparently (AFAIK) you can load different themes there, so
a common icon set would fit well. If users prefer the QGIS default set,
no problem. But at least they could switch...

Of course it would be more work.

Best
Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] G_exp_colors()?

2008-04-02 Thread Glynn Clements

Hamish wrote:

   I am working with MODIS Aqua imagery in HDF4 format. (level 3)
 ...
   I added a mini-tutorial here:
 http://grass.gdf-hannover.de/wiki/MODIS
 ...
   The Chlorophyll-a concentration data comes in log form, 0-65535.
 ...
   The metadata (available through gdalinfo) gives the formula and test
   points to convert to mg/m^3:
 r.mapcalc ${map}.chlor_a = 10^(($Slope * $map) + $Intercept)
  
   ie a histogram of that starts high and exponentially drops to 0. By
   2.0 there are few data cells left, but real data continues up to the
   max in areas having plankton blooms.
 ...
   So how to make nice color rules for that? 'r.colors -g' does the
   opposite of what I want,
 
 Glynn.
  Odd. Theoretically, it should do exactly what you want.
 
 You are right, -g is the right thing to use, it's just that the data is
 /so/ logarithmic that it only brings out a little more detail and it
 appears like nothing happened. (it became clear after displaying a
 legend, changing the color rules, then redrawing)

Strange. I would have expected to see exactly the same results from:

r.colors color=bcyr map=$map
and:
r.colors -g color=bcyr map=${map}.chlor_a

AFAICT, the -g flag should effectively undo the exponential
conversion. All of the constant factors (e.g. $Slope and $Intercept)
cancel out from the equations.

Maybe the colour table needs more samples? r.colors is hard-coded to
use 100 samples:

G_log_colors(colors_tmp, colors, 100);

Do you get better results if you increase that number?

-- 
Glynn Clements [EMAIL PROTECTED]
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] r.univar_main.c: Clean-up

2008-04-02 Thread Ivan Shmakov
Please consider the following patch.  (Thanks Glynn again for
taking a glance at the previous variant of this one.)

raster/r.univar2/r.univar_main.c (process_raster): Simplified handling
of different map types.

The next step would be to generalize the body of the inner loop
out into a stats.c procedure, like:

int stat_add_cell (univar_stat *stats, const void *cell);

and use it in r3.univar_main.c as well (thus saving from 40 more
lines of extra code.)

diff --git a/raster/r.univar2/r.univar_main.c b/raster/r.univar2/r.univar_main.c
index 454df33..be520c5 100644
--- a/raster/r.univar2/r.univar_main.c
+++ b/raster/r.univar2/r.univar_main.c
@@ -183,12 +183,17 @@ process_raster (univar_stat *stats, int fd,
 const int cols = region-cols;
 int first = (stats-n  1);
 
-RASTER_MAP_TYPE map_type;
+const RASTER_MAP_TYPE map_type = G_get_raster_map_type (fd);
+void *nextp
+   = ((! param.extended-answer) ? 0
+  : (map_type == DCELL_TYPE) ? stats-dcell_array
+  : (map_type == FCELL_TYPE) ? stats-fcell_array
+  : stats-cell_array);
+const size_t value_sz = G_raster_size (map_type);
 unsigned int row;
 void *raster_row;
 
-map_type = G_get_raster_map_type (fd);
-raster_row = G_calloc(cols, G_raster_size(map_type));
+raster_row = G_calloc (cols, value_sz);
 
 for (row = 0; row  rows; row++) {
void *ptr;
@@ -202,78 +207,37 @@ process_raster (univar_stat *stats, int fd,
for (col = 0; col  cols; col++) {
 
if (G_is_null_value(ptr, map_type)) {
-   ptr = G_incr_void_ptr(ptr, G_raster_size(map_type));
+   ptr = G_incr_void_ptr (ptr, value_sz);
continue;
}
 
-
-   if (map_type == CELL_TYPE) {
-   const int val_i = *((CELL *) ptr);
-
-   stats-sum += val_i;
-   stats-sumsq += (double) val_i * val_i;
-   stats-sum_abs += abs(val_i);
-
-   if (param.extended-answer)
-   stats-cell_array[stats-n] = val_i;
-
-   if (first) {
-   stats-max = val_i;
-   stats-min = val_i;
-   first = FALSE;
-   }
-   else {
-   if (val_i  stats-max)
-   stats-max = val_i;
-   if (val_i  stats-min)
-   stats-min = val_i;
-   }
+   if (nextp) {
+   /* put the value into stats-XXXcell_array */
+   memcpy (nextp, ptr, value_sz);
+   nextp = G_incr_void_ptr (nextp, value_sz);
}
-   else if (map_type == FCELL_TYPE) {
-   const float val_f = *((FCELL *) ptr);
 
-   stats-sum += val_f;
-   stats-sumsq += (double) val_f * val_f;
-   stats-sum_abs += fabs(val_f);
+   {
+   double val
+   = ((map_type   == DCELL_TYPE) ? *((DCELL *) ptr)
+  : (map_type == FCELL_TYPE) ? *((FCELL *) ptr)
+  : *((CELL *) ptr));
 
-   if (param.extended-answer)
-   stats-fcell_array[stats-n] = val_f;
+   stats-sum += val;
+   stats-sumsq += val * val;
+   stats-sum_abs += fabs (val);
 
if (first) {
-   stats-max = val_f;
-   stats-min = val_f;
+   stats-max = val;
+   stats-min = val;
first = FALSE;
-   }
-   else {
-   if (val_f  stats-max)
-   stats-max = val_f;
-   if (val_f  stats-min)
-   stats-min = val_f;
+   } else {
+   if (val  stats-max) stats-max = val;
+   if (val  stats-min) stats-min = val;
}
}
-   else if (map_type == DCELL_TYPE) {
-   const double val_d = *((DCELL *) ptr);
-
-   stats-sum += val_d;
-   stats-sumsq += val_d * val_d;
-   stats-sum_abs += fabs(val_d);
 
-   if (param.extended-answer)
-   stats-dcell_array[stats-n] = val_d;
-
-   if (first) {
-   stats-max = val_d;
-   stats-min = val_d;
-   first = FALSE;
-   }
-   else {
-   if (val_d  stats-max)
-   stats-max = val_d;
-   if (val_d  stats-min)
-   stats-min = val_d;
-   }
-   }
-   ptr = G_incr_void_ptr(ptr, G_raster_size(map_type));
+   ptr = G_incr_void_ptr (ptr, value_sz);
stats-n++;
}
if (!(param.shell_style-answer))

___
grass-dev mailing list
grass-dev@lists.osgeo.org

[GRASS-dev] [GRASS GIS] #114: wxPython GUI fails in Vista

2008-04-02 Thread GRASS GIS
#114: wxPython GUI fails in Vista
--+-
 Reporter:  jrobins   |   Owner:  grass-dev@lists.osgeo.org
 Type:  defect|  Status:  new  
 Priority:  major |   Milestone:  6.3.0
Component:  Python| Version:  6.3.0 RCs
 Keywords:  wxPython, Windows, Vista  |  
--+-
 I used the new Windows installer package to install GRASS 6.3.0RC6 on my
 PC.  I installed GRASS to c:\GRASS and tried running the startup script
 found in c:\GRASS\msys\home\users\john using the msys shell.  Here is a
 transcript:

 {{{
 [EMAIL PROTECTED] /home/users/john
 $ grass63 -wxpython

 WELCOME TO GRASS  Version 6.3.0RC6 2008

1) Have at your side all available GRASS tutorials

2) When working on your location, the following materials
   are extremely useful:
   - A topo map of your area
   - Current catalog of available computer maps

3) Check the GRASS webpages for feedback mailinglists and more:
   http://www.grass-gis.org
   http://grass.osgeo.org

 Hit RETURN to continue

 Starting GRASS ...
 Traceback (most recent call last):
   File c:/GRASS/etc/wxpython/gis_set.py, line 710, in module
 GRASSStartUp = StartUp(0)
   File c:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py,
 line 7836, in __init__
 self._BootstrapApp()
   File c:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py,
 line 7433, in _BootstrapApp
 return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File c:/GRASS/etc/wxpython/gis_set.py, line 694, in OnInit
 StartUp = GRASSStartup()
   File c:/GRASS/etc/wxpython/gis_set.py, line 154, in __init__
 self._set_properties()
   File c:/GRASS/etc/wxpython/gis_set.py, line 154, in __init__
 self._set_properties()
   File c:/GRASS/etc/wxpython/gis_set.py, line 193, in _set_properties
 self.OnSetDatabase(None)
   File c:/GRASS/etc/wxpython/gis_set.py, line 579, in OnSetDatabase
 self.OnSelectLocation(event)
   File c:/GRASS/etc/wxpython/gis_set.py, line 561, in OnSelectLocation
 self.lbmapsets.SetSelection(0)
   File c:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py,
 line 1325, in SetSelection
 return _controls_.ListBox_SetSelection(*args, **kwargs)
 wx._core.PyAssertionError: C++ assertion N == (-1) || IsValid(N) failed
 at ..\..\src\msw\listbox.cpp(390) in wxListBox::DoSetSelection(): invalid
 index in wxListBox::SetSelection
 Error in GUI startup. If necessary, please
 report this error to the GRASS developers.
 Switching to text mode now.
 Hit RETURN to continue...
 }}}

 I have Python 2.5, wxPython widgets, numPy, and the python extensions
 suggested on the installer download page.  These are installed in
 c:\Python25.  My computer uses Windows Vista.  What do I need to do to fix
 this?

-- 
Ticket URL: http://trac.osgeo.org/grass/ticket/114
GRASS GIS http://grass.osgeo.org
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] Re: [GRASS GIS] #104: saving display to tiff or ppm garbled when NVIZ is not top window

2008-04-02 Thread GRASS GIS
#104: saving display to tiff or ppm garbled when NVIZ is not top window
--+-
  Reporter:  dylan|   Owner:  grass-dev@lists.osgeo.org
  Type:  defect   |  Status:  new  
  Priority:  minor|   Milestone:  6.4.0
 Component:  default  | Version:  svn-trunk
Resolution:   |Keywords:  NVIZ openGL  
--+-
Comment (by glynn):

 Replying to [comment:14 msieczka]:

  Still after this change same crash, and still GRASS_NO_GLX_PIXMAPS=TRUE
 prevents it.

 Can you try the [http://trac.osgeo.org/grass/attachment/ticket/104/
 do_zoom-error.diff patch]. It installs an error handler which (hopefully)
 prevents the error from terminating the program.

-- 
Ticket URL: http://trac.osgeo.org/grass/ticket/104#comment:15
GRASS GIS http://grass.osgeo.org
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] r.cva output file missing

2008-04-02 Thread rmayer

More details on the problem described above: writing the output file is
failing because of a segmentation fault error.

var/log/messages reads

localhost kernel: r.cva[7511]: segfault at 0005 eip 00120040 esp
bfc5a464 error 4


-- 
View this message in context: 
http://www.nabble.com/r.cva-output-file-missing-tp16383178p16452226.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev