Re: [GRASS-user] v.net.path problem(output seem to be airline distances instead of rout distances with multiple input points)

2010-10-14 Thread Markus Metz
Stefan Neumeier wrote:
  Dear all,

 I am relatively new to GRASS so maybe I am just missing some important step
 in between.
 What I want to do is to calculate a simple distance matrix from x start
 points (polygon-raster centroids)
 to x end points (specific locations e.g. hospitals) based on a route
 network.

 In a first step I prepared the network so that every start- and end point
 lies on the network (via v.net, option connect).
 In a second step I created a point input textfile to use in v.net.path (ID
 startX startY endX endY) wit several thousand records.

 Testing the shortest path calculation for one, two or three coordinate pairs
 read in from the point input file works
 as one would expect and I get a new vector layer depicting the pathes from
 the start points to the end-points based on the
 road network.

 But if the number of points in the input point file exceeds 4 coordinate
 pairs GRASS  calculates all consecutive
 distances seemingly as airline distances instead of road based distances (In
 the output vector layer the pairs of points
 are connected with a straight line only).

This should be fixed in recent versions of GRASS [1,2]

Markus M

[1] http://josef.fsv.cvut.cz/wingrass/grass64/
[2] http://josef.fsv.cvut.cz/wingrass/grass65/
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Error while exporting a raster in Windows

2010-10-14 Thread Luisa Peña
I'm trying to export a raster from GRASS using this command
r.out.gdal -f input=...@permanent output=C:\b10.tif
nodata=0
and I get this error:
Exporting to GDAL data type: Byte
Checking GDAl data type and nodata value
ERROR 1: TIFFOpen:C:\b10: Permission denied
ERROR: Unable to create C:\b10 dataset using GTiff driver

I'm running in WinGRASS in Windows7 with snapshot 4/9/2010.

That is happening?

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


[GRASS-user] Python Script is not able to find a file in a different Drive

2010-10-14 Thread Jenny Turner
Greetings

I have a python script that needs to get a file (import a raster). I have
tried in Ubuntu and also in Windows and it works but, When I have that file
in a different hard drive (D: instead of C: where WinGRASS is installed)
os.path.isfile(input) is false... Why? is it some limitation of GRASS?

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


[GRASS-user] r.sun command

2010-10-14 Thread Pascal Obstetar
Hi all,

in the command r.sun, the latin raster must be in WGS84 ?



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


[GRASS-user] Error running g.mapset

2010-10-14 Thread katrin eggert
Greetings

I'm running WinGRASS and I'm obtaining a weird error when I run g.mapset:
ERROR: Unable to read GIS_LOCK environment variable

How can I fix this in Win GRASS?

Thanks

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


[GRASS-user] Addapting i.gensig GRASS to perform outlier detection

2010-10-14 Thread katrin eggert
Greetings Mr. Neteler

I'm implementing a methodology in GRASS to eliminate training_areas
outliers. What I do?
1- first I pick up the current training areas for a class and I calculate
mean vector and covariance matrix
2- Invert the covariance matrix
3- Compare each pixel, that is included in a training_area, with a defined
threshold and if it's OK, It's still labeled as 1 or, otherwise, it's
eliminated.

It would be pointless in developing this function from scratch in GRASS so I
used i.gensig that is used to calculate mean vector and covariance matrix
for training areas. (This means that step 1 and 2 (by a simple
implementation) is covered. (Do anyone suggest other function instead of
this?)
My problem is with the third step (I'm still not very familiar with some
GRASS programming functions/functionalities)
I have created a cycle that goes for each row and col and I get the correct
raster pixel value from group but I'm not being able to retrieve the
classification. This is an overview of the approach:
for row=0, rownrows, row++
for col=0, colncols, cols++
   Check in training area if the pixel value is -1 (this is the
problem I'm not being able to get thiS)
for band=0, pbandnbands, pband++
  pband[band]=cell_value for band band, in row=row,
col=col and that is included in the training area.
- Then apply the compare (easy)
- write (I think it's not a problem)
}
   }
}
In what am I a bit lost:
1- How can I get the value from training areas raster?
2- How can I only apply this rule only to the  pixels that are included in a
training_area?


Can anyone give me a few tips?


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


Re: [GRASS-user] Error while exporting a raster in Windows

2010-10-14 Thread Glynn Clements

Luisa Peña wrote:

 I'm trying to export a raster from GRASS using this command
 r.out.gdal -f input=...@permanent output=C:\b10.tif
 nodata=0
 and I get this error:

 ERROR 1: TIFFOpen:C:\b10: Permission denied

That seems fairly self explanatory: you don't have permission to
create files in the root directory of the C: drive.

By default, normal users only have permission to create files in their
My Documents directory. In Windows XP, you can change the
permissions via the Sharing tab (or the Security tab if simple file
sharing is disabled) in the properties dialog; I don't know about
Windows 7.

-- 
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] cut raster

2010-10-14 Thread Sofina Natalia
Hi everybody! http://www.dict.cc/englisch-deutsch/Hi+everybody.html 
I'm a beginner with GRASS... I have a lot of questions. Now I need to 
cut out an area from a satellite image according a relevant vector 
object from digital map. I need to cut out a building from satellite 
image, that I have as a vector object, and save it to the new raster map 
(only one building). Or may be it's possible to cut out an area from a 
satellite image using coordinates from vector object.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread Stuart Edwards
Hi -

OSX 10.6.4

I have installed 6.4.1svn and get the following startup error:

'/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
SEsMacPro:~ stu$ '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Python 2.6.1 found.
Cleaning up temporary files ...
Starting GRASS ...
ERROR: wxGUI requires wxPython. 
dlopen(/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so,
 2): Symbol not found: __ZN10wxListCtrl19GetBackgroundColourEv
  Referenced from: 
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
  Expected in: 
/Applications/GRASS-6.4.app/Contents/MacOS/lib/libwx_macud-2.8.0.dylib
 in 
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
Error in GUI startup. If necessary, please
report this error to the GRASS developers.
Switching to text mode now.
Hit RETURN to continue...

I was using 6.4.0 immediately prior with the wxpython gui so it's there 

Thanks for any assistance -

Stu

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


Re: [GRASS-user] cut raster

2010-10-14 Thread Daniel Victoria
Hi Sofina,

The way I normally do this is first, convert the vetor to raster
(v.to.rast). Then I transform the converted newlly created raster to a
mask (r.mask) and, using r.mapcalc, clip the satellite image. Don't
forget to latter remove the raster mask.

The commands performed would be something like this:
v.to.rast input=building_vector output=build_raster
r.mask build_raster
r.mapcalc
clipped_sat = satellite_image
r.mask -r

@ Grass List.
I can't recall if there is an easier way to do this... Maybe a script?
Such a simple procedure should be done easily in one step...

Cheers
Daniel

On Thu, Oct 14, 2010 at 10:16 AM, Sofina Natalia nsof...@gmx.de wrote:
 Hi everybody! I'm a beginner with GRASS... I have a lot of questions. Now I
 need to cut out an area from a satellite image according a relevant vector
 object from digital map. I need to cut out a building from satellite image,
 that I have as a vector object, and save it to the new raster map (only one
 building). Or may be it's possible to cut out an area from a satellite image
 using coordinates from vector object.

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


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


Re: [GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread William Kyngesburye
The GRASS package seems to be incomplete - it's running the system wxpython, 
but linking the bundled wx libraries, which are probably much newer and 
incompatible with the system.  If both wxpython and wx libraries are bundled, 
then maybe the bundled wxpython is not in the python path (it should be in 
etc/python in the GRASS app package).

Did you build from source?  Or install a binary (I think Michael Barton has a 
svn binary available)?

On Oct 14, 2010, at 8:42 AM, Stuart Edwards wrote:

 Hi -
 
 OSX 10.6.4
 
 I have installed 6.4.1svn and get the following startup error:
 
 '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
 SEsMacPro:~ stu$ '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
 Rebuilding Addon HTML manual pages index...
 Rebuilding Addon menu...
 Python 2.6.1 found.
 Cleaning up temporary files ...
 Starting GRASS ...
 ERROR: wxGUI requires wxPython. 
 dlopen(/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so,
  2): Symbol not found: __ZN10wxListCtrl19GetBackgroundColourEv
  Referenced from: 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
  Expected in: 
 /Applications/GRASS-6.4.app/Contents/MacOS/lib/libwx_macud-2.8.0.dylib
 in 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
 Error in GUI startup. If necessary, please
 report this error to the GRASS developers.
 Switching to text mode now.
 Hit RETURN to continue...
 
 I was using 6.4.0 immediately prior with the wxpython gui so it's there 
 
 
 Thanks for any assistance -
 
 Stu
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

This is a question about the past, is it? ... How can I tell that the past 
isn't a fiction designed to account for the discrepancy between my immediate 
physical sensations and my state of mind?

- The Ruler of the Universe


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


Re: [GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread Stuart Edwards

On Oct 14, 2010, at 11:00 AM, William Kyngesburye wrote:

 The GRASS package seems to be incomplete - it's running the system wxpython, 
 but linking the bundled wx libraries, which are probably much newer and 
 incompatible with the system.  If both wxpython and wx libraries are bundled, 
 then maybe the bundled wxpython is not in the python path (it should be in 
 etc/python in the GRASS app package).
 
 Did you build from source?  Or install a binary (I think Michael Barton has a 
 svn binary available)?

Yes, from source.  

 
 On Oct 14, 2010, at 8:42 AM, Stuart Edwards wrote:
 
 Hi -
 
 OSX 10.6.4
 
 I have installed 6.4.1svn and get the following startup error:
 
 '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
 SEsMacPro:~ stu$ '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
 Rebuilding Addon HTML manual pages index...
 Rebuilding Addon menu...
 Python 2.6.1 found.
 Cleaning up temporary files ...
 Starting GRASS ...
 ERROR: wxGUI requires wxPython. 
 dlopen(/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so,
  2): Symbol not found: __ZN10wxListCtrl19GetBackgroundColourEv
 Referenced from: 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
 Expected in: 
 /Applications/GRASS-6.4.app/Contents/MacOS/lib/libwx_macud-2.8.0.dylib
 in 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
 Error in GUI startup. If necessary, please
 report this error to the GRASS developers.
 Switching to text mode now.
 Hit RETURN to continue...
 
 I was using 6.4.0 immediately prior with the wxpython gui so it's there 
 
 
 Thanks for any assistance -
 
 Stu
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user
 
 -
 William Kyngesburye kyngchaos*at*kyngchaos*dot*com
 http://www.kyngchaos.com/
 
 This is a question about the past, is it? ... How can I tell that the past 
 isn't a fiction designed to account for the discrepancy between my immediate 
 physical sensations and my state of mind?
 
 - The Ruler of the Universe
 
 

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


Re: [GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread William Kyngesburye
On Oct 14, 2010, at 10:13 AM, Stuart Edwards wrote:

 
 On Oct 14, 2010, at 11:00 AM, William Kyngesburye wrote:
 
 The GRASS package seems to be incomplete - it's running the system wxpython, 
 but linking the bundled wx libraries, which are probably much newer and 
 incompatible with the system.  If both wxpython and wx libraries are 
 bundled, then maybe the bundled wxpython is not in the python path (it 
 should be in etc/python in the GRASS app package).
 
 Did you build from source?  Or install a binary (I think Michael Barton has 
 a svn binary available)?
 
 Yes, from source.  

Are you using the system wxpython or did you install a binary from 
wxpython.org? (note: the system wxpython is a bit old, though it fits the 
minimum needed for GRASS)

Are you explicitly bundling wxpython?  If not, it's odd that it thinks the wx 
libraries are bundled (the expected in... part of the error).

 
 On Oct 14, 2010, at 8:42 AM, Stuart Edwards wrote:
 
 Hi -
 
 OSX 10.6.4
 
 I have installed 6.4.1svn and get the following startup error:
 
 '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
 SEsMacPro:~ stu$ '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
 Rebuilding Addon HTML manual pages index...
 Rebuilding Addon menu...
 Python 2.6.1 found.
 Cleaning up temporary files ...
 Starting GRASS ...
 ERROR: wxGUI requires wxPython. 
 dlopen(/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so,
  2): Symbol not found: __ZN10wxListCtrl19GetBackgroundColourEv
 Referenced from: 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
 Expected in: 
 /Applications/GRASS-6.4.app/Contents/MacOS/lib/libwx_macud-2.8.0.dylib
 in 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
 Error in GUI startup. If necessary, please
 report this error to the GRASS developers.
 Switching to text mode now.
 Hit RETURN to continue...
 
 I was using 6.4.0 immediately prior with the wxpython gui so it's there 
 
 
 Thanks for any assistance -
 
 Stu


-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

We are at war with them. Neither in hatred nor revenge and with no particular 
pleasure I shall kill every ___ I can until the war is over. That is my duty.

Don't you even hate 'em?

What good would it do if I did? If all the many millions of people of the 
allied nations devoted an entire year exclusively to hating the  it 
wouldn't kill one ___ nor shorten the war one day.

Ha, ha And it might give 'em all stomach ulcers.

- Tarzan, on war

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


Re: [GRASS-user] cut raster

2010-10-14 Thread Markus Metz
Daniel Victoria wrote:
 Hi Sofina,

 The way I normally do this is first, convert the vetor to raster
 (v.to.rast). Then I transform the converted newlly created raster to a
 mask (r.mask) and, using r.mapcalc, clip the satellite image. Don't
 forget to latter remove the raster mask.

 The commands performed would be something like this:

I would add some g.region commands:

# set region to extends and grid cell geometry of satellite raster
g.region rast=satellite_image
 v.to.rast input=building_vector output=build_raster
# reduce region to non-NULL part of build_raster to reduce clipped raster size
g.region zoom=build_raster
 r.mask build_raster
 r.mapcalc clipped_sat = satellite_image
 r.mask -r

Markus M

 @ Grass List.
 I can't recall if there is an easier way to do this... Maybe a script?
 Such a simple procedure should be done easily in one step...

 Cheers
 Daniel

 On Thu, Oct 14, 2010 at 10:16 AM, Sofina Natalia nsof...@gmx.de wrote:
 Hi everybody! I'm a beginner with GRASS... I have a lot of questions. Now I
 need to cut out an area from a satellite image according a relevant vector
 object from digital map. I need to cut out a building from satellite image,
 that I have as a vector object, and save it to the new raster map (only one
 building). Or may be it's possible to cut out an area from a satellite image
 using coordinates from vector object.

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


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

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


Re: [GRASS-user] Error when running a scrip in Windows-WinGRASS

2010-10-14 Thread M.Onur Kurum
 I completely removed the Python25 bundled with GRASS and changed the 
startup bat file to not look for the bundled python so this is how it goes:


C:\GRASS-70-SVNset_shell_start_grass70svn.bat
Cleaning up temporary files...
Starting GRASS GIS...
Traceback (most recent call last):
  File C:\GRASS-70-SVN\etc\gui\wxpython\gis_set.py, line 38, in module
import gui_modules.goutput
  File C:\GRASS-70-SVN\etc\gui\wxpython\gui_modules\goutput.py, line 
35, in module

import gcmd
  File C:\GRASS-70-SVN\etc\gui\wxpython\gui_modules\gcmd.py, line 44, 
in module

from win32file import ReadFile, WriteFile
ImportError: No module named win32file
Error in GUI startup. If necessary, please report this error to the 
GRASS developers.

Switching to text mode now.

Hit RETURN to continue...

Traceback (most recent call last):
  File C:\GRASS-70-SVN\grass70.py, line 956, in module
set_data()
  File C:\GRASS-70-SVN\grass70.py, line 497, in set_data
gui_startup()
  File C:\GRASS-70-SVN\grass70.py, line 519, in gui_startup
os.execlp(cmd_name, -text)
  File C:\Python26\lib\os.py, line 327, in execlp
execvp(file, args)
  File C:\Python26\lib\os.py, line 344, in execvp
_execvpe(file, args)
  File C:\Python26\lib\os.py, line 380, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory

I guess this is what you meant with
The only thing which may be problematic is the wxPython digitiser module. 

for windows grass 7 comes bundled with python25 and now I use python26 
installed separately.

Could you be more specific about how to remove the module ? I am lost there.

in the bundled \Python25\Lib\site-packages\wx-2.8-msw-unicode I see that 
wxpython is

Metadata-Version: 1.0
Name: wxPython
Version: 2.8.9.1 for python 2.5

and the one in \Python26\Lib\site-packages\wx-2.8-msw-unicode is version 
2.8.11.0 for python 2.6


thanks
Onur


On 10/14/2010 2:44 AM, Glynn Clements wrote:

M.Onur Kurum wrote:


Any ideas, suggestions ?
I just want to be able to launch the GUI when I have a .py of my own
under /scripts in grass6.4 or 7.0

For 7.0, remove any version of Python which is bundled with GRASS, and
remove any reference to it from the startup scripts. Just use the
installed version of Python.

The only thing which may be problematic is the wxPython digitiser
module. That includes a binary component which will only work with the
exact versions of Python and wxPython for which it was compiled. If
this module is present, you may need to remove it in order to start
the GUI.



--

M.Onur Kurum
Graduate Research Assistant
Dept. of Civil, Construction, and Environmental Engineering
North Carolina State University
Campus Box 7908
2501 Stinson Drive, 428 Mann Hall
Raleigh, NC  27695-7908
Office: (919) 515-1340
Mobile: (919) 200-0665
Email: moku...@ncsu.edu
Email: m.onur.ku...@gmail.com

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


Re: [GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread Stuart Edwards

On Oct 14, 2010, at 11:36 AM, William Kyngesburye wrote:

 The GRASS package seems to be incomplete - it's running the system 
 wxpython, but linking the bundled wx libraries, which are probably much 
 newer and incompatible with the system.  If both wxpython and wx libraries 
 are bundled, then maybe the bundled wxpython is not in the python path (it 
 should be in etc/python in the GRASS app package).
 
 Did you build from source?  Or install a binary (I think Michael Barton has 
 a svn binary available)?
 
 Yes, from source.  
 
 Are you using the system wxpython or did you install a binary from 
 wxpython.org? (note: the system wxpython is a bit old, though it fits the 
 minimum needed for GRASS)

It's the system wxpython

 Are you explicitly bundling wxpython?  If not, it's odd that it thinks the wx 
 libraries are bundled (the expected in... part of the error).

No, I did the export nad2bin line and then configured with the given (long) 
./configure  (which doesn't appear to mention python or wxpython)

I did not do the '--with-python  
--with-wxwidgets=/usr/local/lib/wxPython-unicode-x.x.x.x/bin/wx-config 
modification

 
 
 
 On Oct 14, 2010, at 8:42 AM, Stuart Edwards wrote:
 
 Hi -
 
 OSX 10.6.4
 
 I have installed 6.4.1svn and get the following startup error:
 
 '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
 SEsMacPro:~ stu$ '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; 
 exit
 Rebuilding Addon HTML manual pages index...
 Rebuilding Addon menu...
 Python 2.6.1 found.
 Cleaning up temporary files ...
 Starting GRASS ...
 ERROR: wxGUI requires wxPython. 
 dlopen(/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so,
  2): Symbol not found: __ZN10wxListCtrl19GetBackgroundColourEv
 Referenced from: 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
 Expected in: 
 /Applications/GRASS-6.4.app/Contents/MacOS/lib/libwx_macud-2.8.0.dylib
 in 
 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_controls_.so
 Error in GUI startup. If necessary, please
 report this error to the GRASS developers.
 Switching to text mode now.
 Hit RETURN to continue...
 
 I was using 6.4.0 immediately prior with the wxpython gui so it's there 
 
 
 Thanks for any assistance -
 
 Stu
 
 
 -
 William Kyngesburye kyngchaos*at*kyngchaos*dot*com
 http://www.kyngchaos.com/
 
 We are at war with them. Neither in hatred nor revenge and with no 
 particular pleasure I shall kill every ___ I can until the war is over. That 
 is my duty.
 
 Don't you even hate 'em?
 
 What good would it do if I did? If all the many millions of people of the 
 allied nations devoted an entire year exclusively to hating the  it 
 wouldn't kill one ___ nor shorten the war one day.
 
 Ha, ha And it might give 'em all stomach ulcers.
 
 - Tarzan, on war
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

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


Re: [GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread William Kyngesburye
... Oh!  You say you used 6.4.0 before - was this my package?  When you install 
6.4.1 from source, it's installing on top of my 6.4.0.  And probably leaving 
the bundled wx libraries already there, but removing the bundled wxpython, so 
when it tried to use the system wxpython it found the leftover bundled wx 
libraries.

Try deleting the old GRASS application before installing your GRASS compiled 
from source.

On Oct 14, 2010, at 1:41 PM, Stuart Edwards wrote:

 
 On Oct 14, 2010, at 11:36 AM, William Kyngesburye wrote:
 
 The GRASS package seems to be incomplete - it's running the system 
 wxpython, but linking the bundled wx libraries, which are probably much 
 newer and incompatible with the system.  If both wxpython and wx libraries 
 are bundled, then maybe the bundled wxpython is not in the python path (it 
 should be in etc/python in the GRASS app package).
 
 Did you build from source?  Or install a binary (I think Michael Barton 
 has a svn binary available)?
 
 Yes, from source.  
 
 Are you using the system wxpython or did you install a binary from 
 wxpython.org? (note: the system wxpython is a bit old, though it fits the 
 minimum needed for GRASS)
 
 It's the system wxpython
 
 Are you explicitly bundling wxpython?  If not, it's odd that it thinks the 
 wx libraries are bundled (the expected in... part of the error).
 
 No, I did the export nad2bin line and then configured with the given (long) 
 ./configure  (which doesn't appear to mention python or wxpython)
 
 I did not do the '--with-python  
 --with-wxwidgets=/usr/local/lib/wxPython-unicode-x.x.x.x/bin/wx-config 
 modification

-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

Those people who most want to rule people are, ipso-facto, those least suited 
to do it.

- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread Stuart Edwards

On Oct 14, 2010, at 2:51 PM, William Kyngesburye wrote:

 ... Oh!  You say you used 6.4.0 before - was this my package?

Indeed

  When you install 6.4.1 from source, it's installing on top of my 6.4.0.

And quite a mess I made ; -(

  And probably leaving the bundled wx libraries already there, but removing 
 the bundled wxpython, so when it tried to use the system wxpython it found 
 the leftover bundled wx libraries.
 
 Try deleting the old GRASS application before installing your GRASS compiled 
 from source.

Actually, I've had to download and reinstall your binaries just to get a 
working version going again - so I'm not inclined to risk losing my production 
setup.  Can I give the current 6.4.0 a different name or does it have to be 
completely gone?  I may well put this project on hold for a while.

BTW, thank you for maintaining such a fine repository of reliable binaries 
..

 
 On Oct 14, 2010, at 1:41 PM, Stuart Edwards wrote:
 
 
 On Oct 14, 2010, at 11:36 AM, William Kyngesburye wrote:
 
 The GRASS package seems to be incomplete - it's running the system 
 wxpython, but linking the bundled wx libraries, which are probably much 
 newer and incompatible with the system.  If both wxpython and wx 
 libraries are bundled, then maybe the bundled wxpython is not in the 
 python path (it should be in etc/python in the GRASS app package).
 
 Did you build from source?  Or install a binary (I think Michael Barton 
 has a svn binary available)?
 
 Yes, from source.  
 
 Are you using the system wxpython or did you install a binary from 
 wxpython.org? (note: the system wxpython is a bit old, though it fits the 
 minimum needed for GRASS)
 
 It's the system wxpython
 
 Are you explicitly bundling wxpython?  If not, it's odd that it thinks the 
 wx libraries are bundled (the expected in... part of the error).
 
 No, I did the export nad2bin line and then configured with the given (long) 
 ./configure  (which doesn't appear to mention python or wxpython)
 
 I did not do the '--with-python  
 --with-wxwidgets=/usr/local/lib/wxPython-unicode-x.x.x.x/bin/wx-config 
 modification
 
 -
 William Kyngesburye kyngchaos*at*kyngchaos*dot*com
 http://www.kyngchaos.com/
 
 Those people who most want to rule people are, ipso-facto, those least 
 suited to do it.
 
 - A rule of the universe, from the HitchHiker's Guide to the Galaxy
 
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

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


Re: [GRASS-user] r.sun command

2010-10-14 Thread Hamish
Pascal:
 in the command r.sun, the latin raster must be in WGS84 ?

probably, but my best advice is: don't use latin=.
Run r.sun from a non-simply XY location instead.
Even if it was in the current location's ellipsoid instead of
WGS84, the difference (maybe ~100m) wouldn't really affect the
position of the sun in the sky much.


if you have a reason to run from a ungeoreferenced location, I'd
be keen to hear it. I never remember if I've already removed that
option from trunk, but I mean to. The overhead of reading the map
is more or at least equal to the time saved by doing the
reprojection calc, and keeping it just confuses things for the
user and programmer alike.


Hamish



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


Re: [GRASS-user] Startup error with 6.4.1svn on OSX 10.6.4

2010-10-14 Thread William Kyngesburye
On Oct 14, 2010, at 3:01 PM, Stuart Edwards wrote:

 And probably leaving the bundled wx libraries already there, but removing 
 the bundled wxpython, so when it tried to use the system wxpython it found 
 the leftover bundled wx libraries.
 
 Try deleting the old GRASS application before installing your GRASS compiled 
 from source.
 
 Actually, I've had to download and reinstall your binaries just to get a 
 working version going again - so I'm not inclined to risk losing my 
 production setup.  Can I give the current 6.4.0 a different name or does it 
 have to be completely gone?  I may well put this project on hold for a while.

You can rename the existing GRASS, say GRASS-6.4.0.app.

Once you compile and install 6.4.1 (as GRASS-6.4.app), if you use Qgis it 
should continue to work using the new GRASS.

-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [GRASS-user] Difference between r.series; r.patch

2010-10-14 Thread Nikos Alexandris
katrin wrote:

  I have a sequence of satellite images (e.g 1 in the north, other in the
  center and other in south) that I want to merge in a single image. I
  found three GRASS methodologies:
  - r.series
  - r.patch
  - i.image.mosaic.
  Which one is the best to perform what I need?

Hamish:
 
 I'm not really familiar with i.image.mosaic, but r.patch would be the
 one to use if you have three satellite images taken in sequence which
 you wish to merge into a single image.
 
 r.series is usually used to merge overlapping maps, r.patch to merge
 adjoining maps.
 
 to make r.patch easier, you can do:
  g.region rast=map1,map2,map3
 
 to extend the region settings to the outer bounds of all three maps.

Something critical, if I am not wrong: the order of map1,map2,map3 is 
important (when patching overlaping maps). Check the r.patch manual.

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


Re: [GRASS-user] v.db.join script

2010-10-14 Thread Nikos Alexandris
Jon Eiriksson wrote:

 I apologise for possible double-posting - but it seems that I did not
 send the email copied below to the correct address. If anyone has
 experienced the v.d.b.join column definition/truncation problem
 desacribed belowl and has some advice, I would be very grateful to
 hear about it.
 
 Best regards, Jon
 
 ==
 Hi,
 
 I have a truncation problem with v.db.join. This has been raised
 before -
 
 
 ([GRASS-user] Re: grass v.db.join
 
 Gary Nobles
 Fri, 12 Mar 2010 11:11:26 -0800)
 
 - but I have not seen a solution. I have tried my own data, the
 spearfish60 example data, and the example in Neteler and Mitasova's
 book.
 The new data columns are apparently defined as 1 character long, and the
 data become truncated accordingly, much against my intention. I use
 mysql.
 
 Can anyone point out a solution? I copy a session with the spearfish60
 data below.

Hi Jon!

Not a direct solution but an alternative: Is mysql a requirement? What about 
using sqlite? I think I have never seen this problem while using/ playing 
around with sqlite.

Nikos

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


Re: [GRASS-user] Grass Script- Implementing a Quadratic Mahalanobis Distance

2010-10-14 Thread Nikos Alexandris
On Monday 11 of October 2010 19:21:54 Pedro Roma wrote:
 Greetings
 
 I need to implement a Quadratic Mahaloanobis Distance by using GRASS.  This
 is based on medium vector and covariance matrix.
 1- As anyone implemented anything similar?
 2- If not, Is there any GRASS script that accesses medium vector and
 Covariance matrix in its processing?
 
 Thanks 
 PEdro

Hi Pedro!

Not sure at all but my guess is that it's a (simple) job for grass if you know 
the formula. I am not familiar with the term medium vector. But there is 
r.covar to get the covariance (or correlation) matrix based on raster maps.

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


Re: [GRASS-user] GRASSsvn release branch g.region broken

2010-10-14 Thread Nikos Alexandris
[...]

Markus M:

 The safest order I figured out experimentally is
 
  make distclean
 
 svn up
 
  configure
  make
  make install

- make install requires sudo under Ubuntu.

- a reminder that the last step (sudo make install) can be avoided 
completely and grass sessions can be launched directly from within the 
/geo/osgeo/src/grass64_release/bin.x86_64-unknown-linux-gnu/ directory.

e.g., I use the following link:

/usr/local/bin/grass64 - /geo/osgeo/src/grass64_release/bin.x86_64-unknown-
linux-gnu/grass64

Also, in case one wants to install the compiled binaries, the program 
checkinstall is a good option instead of make install. It creates a .deb 
package and installs it which can be easily uninstalled of course.

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


Re: [GRASS-user] Changing raster boundaries

2010-10-14 Thread Nikos Alexandris
Christian:

  Hi GRASS users,
  how to change the boundaries of a raster map (simply expand the
  border) without any automatic modification of map resolution as it
  will happen when using r.region map=.. n= ..s=.. w= e=.. ?
  Thanks for some hint.

Micha:
 
 How about changing the current region with g.region, then use r.mapcalc
 to create a copy of the original at the new extents?

A reminder that r.region might be useful as well in this case.

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


Re: [GRASS-user] Estimating Albedo from Landsat

2010-10-14 Thread Nikos Alexandris
[ back again... :-) ]

Nikos wrote:

   Downloaded:
   - extra: LT50160351988258XXX03 (includes visible clouds - maybe good for 
testing?)

Hamish:

 in the GloVis preview I only see a few clouds in the NE corner
 for that date. (Sept 14, 1988)

Right. I specifically selected a scene with a few visible clouds. Isn't this a 
good quality test for the module (instead of using an easy scene full with 
clouds)?


 Maybe 1991/10/25 is another good scene for a cloud test? (looks
 like 20% high cumulus with shadows)

Yep, why not. Will order.
 

 Note the % cloud cover in the GloVis previewer is (AFAIU) using
 the same ACCA algorithm as i.landsat.acca, so the result should
 be similar. (??)

hmmm... have to check.


 For the Sept 14, 1998 example the GloVis info says 0% cloud
 cover, but maybe that data is old and the latest ACCA says
 something else?

  # rgb colors for 742
  i.landsat.rgb r=lsat5_1988.2 g=lsat5_1988.4 b=lsat5_1988.7
  strength=96
  d.rgb r=lsat5_1988.2 g=lsat5_1988.4 b=lsat5_1988.7 #
  obvious clouds

 maybe i.landsat.dehaze is worth trying before i.landsat.rgb?
 
  # toar
  i.landsat.toar band_prefix=lsat5_1988 method=uncorrected \
  
sensor=5 product_date=1988-09-14 date=1988-09-14 \
solar_elevation=48.6773844
 
 do not assume production date is the same as acq. date; check
 metadata values against values in the source code.
 For the Mar 31, 2000 sample data it made a difference.

ok!

 
  # acca
  i.landsat.acca -5f2 band_prefix=lsat5_1988.toar \
  output=lsat5_1988.toar.acca

  # how many cats?
  r.info lsat5_1988.toar.acca -r
  min=6
  max=9
 
 see r.category, r.stats -c, or d.legend for meaning of category
 numbers. (6=cold cloud, 9=warm cloud, 2=shadow)

 i.landsat.acca is in flux today, best to wait a few days ..
 (some earlier improvements just got clobbered and new ones
 introduced, so I'm unsure of where we are now)

  In the acca result:
  
  - clouds are detected (cat=6), not that bad(ly) I suppose.
  Some filtering could push away the (rest of the) noise.
 
 the cloud despeckle filter can remove some lone non-cloud cells
 which are surrounded by cloud. after that I guess it's
 r.neighbors or r.mfilter.

--%-
  - obvious mis-detections (commission errors) found within
  
- n=188310 s=168270 w=618870 e=636150 (bare ground?
  
  urban area? not sure
  about the confusing land cover/class here...)
  
- n=219030 s=180510 w=646410 e=655740 (road)
 
 ? maybe google maps satellite view helps if the landsat is too
 coarse to ID features.
 
- in the borders due to the non-identical extent of all bands (!?)
 
 I've seen something similar, maybe r.series to accumulate NULLs
 in all input bands and use that as a MASK?
 
  - categories 7 and 8 seem to be empty, category 9 looks
  very messy
 
 cat 7,8 are undefined, cat 9 probably has more false positives
 in warm land, cat 6 (cold cloud) probably has more problems in
 snowy areas.

  Could it be that non-cloudy acquisitions are mistreated by
  the algorithm?
 
 The paper by Irish listed in the i.landsat.acca man page is
 worth reading, it explains a lot and points out where the
 algorithm does not do well.
 
  I can't clearly recognise clouds in the landsat
  scenes included in NC data set
  (both the 1987 and the 2000 scenes).
 
 I'd guess that they were specifically chosen to avoid days with
 obscuring clouds.
 
  Will (then) the algorithm work (only) with (very) cloudy
  data?
 
 One thing the paper mentions, and I've observed, is that it does
 not do well with thin wispy cirrus clouds. Apparently MODIS does
 a bit better there because it has a detector in the needed 2um
 range to pick those up, while the Landsat only has 11um which
 misses those cloud tops. (IIRC)
--%-

Will check the above at some point.


 fyi, I've just added what we know about the NC 2008 dataset
 Landsat images to the grass wiki:
  http://grass.osgeo.org/wiki/LANDSAT#Sample_data

Thanks, Nikos

 
 I'm downloading them now.. I expect they'll be reprocessed
 versus the metadata calibration values shipped with the dataset.
 (??)
 Hamish
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error when running a scrip in Windows-WinGRASS

2010-10-14 Thread Glynn Clements

M.Onur Kurum wrote:

   I completely removed the Python25 bundled with GRASS and changed the 
 startup bat file to not look for the bundled python so this is how it goes:
 
 C:\GRASS-70-SVNset_shell_start_grass70svn.bat
 Cleaning up temporary files...
 Starting GRASS GIS...
 Traceback (most recent call last):
File C:\GRASS-70-SVN\etc\gui\wxpython\gis_set.py, line 38, in module
  import gui_modules.goutput
File C:\GRASS-70-SVN\etc\gui\wxpython\gui_modules\goutput.py, line 
 35, in module
  import gcmd
File C:\GRASS-70-SVN\etc\gui\wxpython\gui_modules\gcmd.py, line 44, 
 in module
  from win32file import ReadFile, WriteFile
 ImportError: No module named win32file

You need to install the pywin32 package.

http://sourceforge.net/projects/pywin32/

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