Re: [GRASS-user] Using non-ASCII chartacters in r.reclass rules file

2011-08-01 Thread Luisa Peña
Hi
Sorry for not being clear.
When I try to display the legend, in Map Display Window, those characters
are not displayed. Shall I add a print screen?
Luisa

2011/7/30 Glynn Clements gl...@gclements.plus.com


 Luisa Peña wrote:

Question: It seems that it is not possible to use non-ascii
 characters. Is
it true? Is there any way to add labels to the classes and use
 characters
(such as á;à;ó; â)
  
   I don't know; what error (or other unexpected behaviour) are you
   getting?
 
  Those characters are not displayed (they are replaced by blank spaces)

 Displayed where? In a terminal? wxGUI?

 Are they present in the cats file when viewed in a text editor?

 --
  Glynn Clements gl...@gclements.plus.com

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


[GRASS-user] Re: How to extract one single contour.

2011-08-01 Thread Marcello Gorini
Also, even when I zoom in to extract only one contour, the exported points
are not always in order in the file, in a way that when I use it to plot in
another program as a line, it connects the points in a wrong way.

How can I export contours in an amenable way to use in other programs, such
as Matlab, for instance?

Thanks in advance.

Marcello.





Marcello Gorini wrote:
 
 Dear all,
 
 I am interested in extracting the longest -1,000 meter contour from a
 bathymetric DEM and to save it in a text file as points.
 
 By doing:
 
 r.contour in=my_dem out=contour levels=-1000
 v.to.points in=contour out=contour_points dmax=my_resolution
 v.out.ascii in=contour_points out=contour_points.txt fs=  dp=4
 
 ... I get a text file with the contour points, however, it includes many
 different isolated contours, all with the same category (1).
 
 Since I need only the longest, I believe I need to separate the different
 contours, maybe assigning different categories somehow, then maybe
 updating the database with v.to.db using option=length and then
 v.db.select the longest contour.
 
 But I am not very used to working with vectors, so I don't know if that's
 the correct approach (nor how to accomplish it), so I would appreciate
 very much any help.
 
 Many thanks.
 
 Marcello.
 


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-one-single-contour-tp6639491p6641376.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Grass on macos 10.7 aka Lion

2011-08-01 Thread Agustín Diez Castillo
Hi there,
Latest William's binary (6.4.1) is working in Lion. In an upgraded machine 
there is no major problems to run it both with tcltk and wxpython. In a fresh 
installation, I got problems to point to the correct GISBASE directory, the 
terminal ended in the text gui and once I pointed to where grass data was, it 
starts with the following warnings:

CFURLCreateWithString was passed this invalid URL string: 
'/System/Library/CoreServices/CommonCocoaPanels.bundle' (a file system path 
instead of an URL string). The URL created will not work with most file URL 
functions. CFURLCreateWithFileSystemPath or 
CFURLCreateWithFileSystemPathRelativeToBase should be used instead.

wish warning:

Wish[3284] Error: kCGErrorInvalidConnection: CGSGetWindowTags: Invalid 
connection
Aug  1 19:04:51 vpn1-22.vpn.uv.es Wish[3284] Error: kCGErrorFailure: Set a 
breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.


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


[GRASS-user] Error in r.basin

2011-08-01 Thread Rosca Bogdan
Hello! I am trying to run r.basin for some analysis and it start promising
but it end badly:
##
r.basin.py map=dem_fill@harta prefix=a easting=491896.20 northing=659955.69
threshold=900
Removing raster MASK
Raster map MASK not found
MASK nothing removed
SECTION 1a (of 5): Initiating Memory.
SECTION 1b (of 5): Determining Offmap Flow.
SECTION 2: A * Search.
SECTION 3: Accumulating Surface Flow with SFD.
SECTION 4: Watershed determination.
SECTION 5: Closing Maps.
Writing out only positive flow accumulation values.
Cells with a likely underestimate for flow accumulation can no longer be
identified.
Traceback (most recent call last):
  File /usr/lib/grass64/scripts/r.basin.py, line 427, in
module
sys.exit(main())
  File /usr/lib/grass64/scripts/r.basin.py, line 133, in
main
grass.run_command('r.stream.extract', elevation =
r_elevation, accumulation = r_accumulation, threshold = th,
d8cut = 'infinity', mexp = 0, stream_rast = r_stream_e,
stream_vect = v_stream_e, direction = r_drainage_e, flags
='-o')
  File /usr/lib/grass64/etc/python/grass/script/core.py,
line 186, in run_command
ps = start_command(*args, **kwargs)
  File /usr/lib/grass64/etc/python/grass/script/core.py,
line 167, in start_command
args = make_command(prog, flags, overwrite, quiet,
verbose, **options)
  File /usr/lib/grass64/etc/python/grass/script/core.py,
line 124, in make_command
raise ScriptError('-' is not a valid flag)
grass.script.core.ScriptError: '-' is not a valid flag
(Mon Aug  1 21:19:09 2011) Command finished (2 sec)

I must mention that I have Grass64 installed from
https://launchpad.net/~grass/+archive/grass-stable on Ubuntu Maverick and
all dependencies needed ( I have managed to run separately almost every
command but I have in total  22 basins)
Please could someone point me in the right direction ?
Bogdan Rosca
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error in r.basin

2011-08-01 Thread Martin Landa
Hi,

2011/8/1 Rosca Bogdan ros...@gmail.com:
     grass.run_command('r.stream.extract', elevation =
 r_elevation, accumulation = r_accumulation, threshold = th,
 d8cut = 'infinity', mexp = 0, stream_rast = r_stream_e,
 stream_vect = v_stream_e, direction = r_drainage_e, flags
 ='-o')

replace `flags = '-o'` with `overwrite = True`

Martin
-- 
Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: Import vector: illegal filename

2011-08-01 Thread Glynn Clements

deagon wrote:

 v.in.ogr -o dsn=C:/GIS/NL/NL1980s.shp output=NL1980s snap=-1 min_area=0.0001
 Illegal filename. Character  not allowed.
 
 Over-riding projection check
 Illegal filename. Character  not allowed.
 Illegal filename. Character  not allowed.
 Illegal filename. Character  not allowed.

This error comes from G_legal_filename():

if (*s == '/' || *s == '' || *s == '\'' || *s = ' ' ||
*s == '@' || *s == ',' || *s == '=' || *s == '*' || *s  0176) {
G_warning(_(Illegal filename %s. Character %c not 
allowed.\n), name, *s);
return -1;
}

It appears that an invalid (and non-printable) character has crept in
to the value of the output= option.

Unfortunately, I don't have any ideas as to how to track this down.

How is the command being entered? In QGIS? the wxGUI? bash? cmd.exe? 
If it's QGIS, I can only suggest taking it up with the QGIS
developers. If you can reproduce the error within GRASS itself, please
provide details.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Using non-ASCII chartacters in r.reclass rules file

2011-08-01 Thread Glynn Clements

Luisa Peña wrote:

   Those characters are not displayed (they are replaced by blank spaces)
 
  Displayed where? In a terminal? wxGUI?
 
  Are they present in the cats file when viewed in a text editor?
 
 When I try to display the legend, in Map Display Window, those characters
 are not displayed. Shall I add a print screen?

You'll need to select a font which has those characters (I don't think
that the default stroke fonts have accented characters), and also
select the correct encoding (presumably either ISO-8859-1 or UTF-8).

AFAICT, this has to be done globally, in the preferences. There
doesn't appear to be a way to set the font or encoding for an
individual layer.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user