Re: [GRASS-dev] Re: big region r.watershed

2008-10-11 Thread Glynn Clements

Hamish wrote:

 and other modules like r.in.xyz have percent= (0-100) for how much of the
 map to keep in memory at once.

I'm wondering if it would be worth adding a switch to r.in.xyz to
indicate that the points have been pre-sorted in descending order of
their Y coordinate (which can be done with sort -nr). In that
situation, you would be able to import the data in a single pass while
only holding a single row in memory.

I would expect implementing such a feature to be relatively
straightforward. Set rows=1, npasses=region.rows, skip the rewind() at
the beginning of each pass, and terminate each pass at the first point
below the current row. The only slight complication is that you need
to retain that point for the next pass.

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


[GRASS-dev] Re: [GRASS GIS] #329: Typo in i.oif.html and wording

2008-10-11 Thread GRASS GIS
#329: Typo in i.oif.html and wording
--+-
  Reporter:  nikos|   Owner:  grass-dev@lists.osgeo.org
  Type:  enhancement  |  Status:  new  
  Priority:  minor|   Milestone:  6.4.0
 Component:  Docs | Version:  unspecified  
Resolution:   |Keywords:   
  Platform:  Unspecified  | Cpu:  Unspecified  
--+-
Comment (by nikos):

 Hamish,

 let me try out the svn diff first (if nobody has corrected already the
 typo).

-- 
Ticket URL: http://trac.osgeo.org/grass/ticket/329#comment:5
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] #329: Typo in i.oif.html and wording

2008-10-11 Thread GRASS GIS
#329: Typo in i.oif.html and wording
--+-
  Reporter:  nikos|   Owner:  grass-dev@lists.osgeo.org
  Type:  enhancement  |  Status:  new  
  Priority:  minor|   Milestone:  6.4.0
 Component:  Docs | Version:  unspecified  
Resolution:   |Keywords:   
  Platform:  Unspecified  | Cpu:  Unspecified  
--+-
Comment (by nikos):

 #check if up-to-date
 svn up scripts/i.oif/

 # edit
 nano scripts/i.oif/description.html

 # review changes first
 svn diff scripts/i.oif/

 # save as a .diff file
 svn diff scripts/i.oif/  typo_composites.diff

 # attach here (or commit back in the repository)

 ...

 Man, I like it :-) Maybe it's just a typo but it gives me the feeling that
 I am doing something useful.

-- 
Ticket URL: http://trac.osgeo.org/grass/ticket/329#comment:6
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] #329: Typo in i.oif.html and wording

2008-10-11 Thread GRASS GIS
#329: Typo in i.oif.html and wording
--+-
  Reporter:  nikos|   Owner:  grass-dev@lists.osgeo.org
  Type:  enhancement  |  Status:  new  
  Priority:  minor|   Milestone:  6.4.0
 Component:  Docs | Version:  unspecified  
Resolution:   |Keywords:   
  Platform:  Unspecified  | Cpu:  Unspecified  
--+-
Comment (by nikos):

 Apologies for the noise here.

 Hmmm... ? Why can't I attach the file and continue editing my post? Why do
 the commands appear in the same line with the comments...? Can I
 edit/remove ny own posts?



 # testing
 command

 # testing2
 command2

-- 
Ticket URL: http://trac.osgeo.org/grass/ticket/329#comment:7
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] how to find out current working db driver and database?

2008-10-11 Thread Michael Barton
As a start to fixing the currently broken table and column select  
combo boxes in the wxPython GUI, is there some way to find out what  
the current working setting is for the database driver and database  
(i.e., path)?


Michael

C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution  Social Change
Center for Social Dynamics  Complexity
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: www.public.asu.edu/~cmbarton



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

[GRASS-dev] GRASS 7: renaming of some modules

2008-10-11 Thread Markus Neteler
Hi,

I would like to rename a set of modules as outlined in
http://grass.osgeo.org/wiki/GRASS_7_ideas_collection#rename

Raster:
* rename r.in.gdal to r.import
* rename r.out.gdal to r.export

Vector:
* rename v.in.ogr to v.import
* rename v.out.ogr to v.export
* rename v.mkgrid to v.grid

Database:
* rename db.in.ogr to db.import

Any objections (the motivation is obvious)? I would also update
gui/wxpython/gui_modules/menudata.py

to reflect the change as well as the manual pages.

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


Re: [GRASS-dev] xgettext grasswxpy issue

2008-10-11 Thread Glynn Clements

Markus Neteler wrote:

 just found this one while running make pot (GRASs 6.4.svn):
 
 Generating grasswxpy...
 xgettext -k_ -o ./templates/grasswxpy.pot `find ../gui/wxpython -name
 '*.py' | xargs grep -l _(\`
 ../gui/wxpython/gui_modules/colorrules.py:391: warning: 'msgid' format string 
 with unnamed arguments cannot be properly localized:
 The translator cannot 
 reorder the arguments.
 Please consider using 
 a format string with named arguments,

391self.cr_label.SetLabel(_('Enter raster cat values or percents 
(range = %d-%d)' %
392 (self.rast['min'], self.rast['max'])))

Note that this issue also arises in C: the use of e.g. %1$d in
format strings isn't part of C89, although it is in C99 and SUS.

It's almost invariably possible to come up with a form of wording
which preserves the original order, e.g. (min=%d, max=%d).

I would guess that this specific case might be an issue for
right-to-left languages (we do have a partial Arabic translation for
grassmods and grasslibs, but not grasswxpy).

If we want to eliminate the warning, the solution is:

self.cr_label.SetLabel(_('Enter raster cat values or percents 
(range = %(min)d-%(min)d)' %
 dict(min = self.rast['min'], max = 
self.rast['max'])))

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


[GRASS-dev] Re: [GRASS GIS] #329: Typo in i.oif.html and wording

2008-10-11 Thread GRASS GIS
#329: Typo in i.oif.html and wording
--+-
  Reporter:  nikos|   Owner:  grass-dev@lists.osgeo.org
  Type:  enhancement  |  Status:  new  
  Priority:  minor|   Milestone:  6.4.0
 Component:  Docs | Version:  unspecified  
Resolution:   |Keywords:   
  Platform:  Unspecified  | Cpu:  Unspecified  
--+-
Comment (by glynn):

 Replying to [comment:7 nikos]:
  Apologies for the noise here.
 
  Hmmm... ? Why can't I attach the file and continue editing my post?

 You should be able to use the back button after submitting the file. At
 least Firefox remembers the state of any form elements if you go back to
 the page.

  Why do the commands appear in the same line with the comments...?

 Single line breaks are ignored; groups of adjacent lines are considered to
 form a single paragraph. You can force a line break with ![[BR]]; for
 large amounts of pre-formatted text, use !{{{...}}}. See the
 WikiFormatting link above the comment entry box for more details.

  Can I edit/remove ny own posts?

 No.

-- 
Ticket URL: http://trac.osgeo.org/grass/ticket/329#comment:8
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] how to find out current working db driver and database?

2008-10-11 Thread Glynn Clements

Michael Barton wrote:

 As a start to fixing the currently broken table and column select  
 combo boxes in the wxPython GUI, is there some way to find out what  
 the current working setting is for the database driver and database  
 (i.e., path)?

The defaults can be obtained with db.connect -p, while the
parameters used by a specific vector map can be obtained with
v.db.connect -g.

lib/python/grass.py has interfaces to both of these:

def db_connection():
Return the current database connection parameters
(interface to `db.connect -p').


returns a dictionary:

kv = grass.db_connection()
database = kv['database']
driver = kv['driver']

while:

def vector_db(map, layer = None, **args):
Return the database connection details for a vector map
(interface to `v.db.connect -g').


returns either a list:

f = grass.vector_db(map, layer)
if not f:
grass.fatal(An error occured while running v.db.connect)
layr = f[0]
table = f[1]
keycol = f[2]
database = f[3]
driver = f[4]

or a list of such lists if the layer argument is omitted.

Note: if you intend to parse the output from v.db.connect -g
yourself, use the (recently-added) fs= option. The default field
separator is a space, but the database may be a pathname, which might
contain spaces, particularly on Windows.

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