[GRASS-user] RE: grass pydev or emacs

2010-04-01 Thread Matthew Mulbrandon

Hello,

ran this program from grass_python wiki 
http://grass.osgeo.org/wiki/GRASS_and_Python
 import os
 import grass.script as grass
 env = grass.gisenv()
 print env
 #List all environment variables
 for key, value in os.environ.items(): print key, value 
 #Print region extent
 r = grass.read_command("g.region", flags='p' )
 print r

on second line I keep getting error

Traceback (most recent call last):
  File "/home/matthew/workspace/dfdsfds/grass.py", line 2, in 
import grass.script as grass
  File "/home/matthew/workspace/dfdsfds/grass.py", line 2, in 
import grass.script as grass
ImportError: No module named script

I checked variables and made make sure grass.script is there. I can not find 
problem. Any clues would be helpful. 

Ubuntu 9.10, grass 6.4rc5, pydev ,
eclipse  Version: 3.5.2

Thanks,

Matthew

  
Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now.  
  
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] 'v.surf.rst' VS. 'r.resamp.rst'

2010-04-01 Thread Bulent Arikan
Hi,

I'd like to thank everyone for suggestions on my previous question about the
interpolation of DEMs from 30 to 10 m res. and  problems I had with
'v.surf.rst' module. I am still experimenting interpolation with it and i
hope to get a good interpolated DEM finally. Hamish suggested I use
'r.resamp.rst' instead and I did (with the default values). The results look
really impressive; it took equally long time for a single DEM (about 90
minutes). I used the resultant DEM to make slope and aspect maps; nothing
seems weird. I also used the mapcalc module to check the difference between
30m and 10m DEMs and it is within -1 and 1 m range. However, I used
'r.resamp.rst' on one imagery only.

So, I am writing to ask for suggestions about which module to use for 30m to
10m interpolation. I understand that 'v.surf.rst' and 'r.resamp.rst' use the
same approach (i.e., spline tension) but in different ways (which is not
surprising since GRASS offers a lot of alternative ways of manipulating
data) and given my limited experience with GIS, I will appreciate
suggestions from the more experienced users.

Thanks,

* I am running a slightly old version (late 2009) of GRASS 6.5 on Mac OS
10.5.8

-- 
BÜLENT ARIKAN
School of Human Evolution and Social Change
Arizona State University
Tempe - AZ
85287-2402
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] i.atcorr

2010-04-01 Thread Markus Neteler
Hi Brian,

On Thu, Apr 1, 2010 at 5:52 PM, Brian Walters  wrote:
> Hello users,
> I'm interested in using i.atcorr to do atmospheric corrections.  However,
> the link on the GRASS add-ons page no longer works.

where did you find the link so that we can correct it?

>  Is i.atcorr still available?  If so, where can I download it for version 6.4?

i.atcorr is part of "main" GRASS now, it is included in 6.4 or later.

Note: if you have self-compiled GRASS, you need to configure before
compilation with --with-cxx since i.atcorr is written in C++.

Hope this helps,
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] i.atcorr

2010-04-01 Thread Brian Walters
Hello users,
I'm interested in using i.atcorr to do atmospheric corrections.  However,
the link on the GRASS add-ons page no longer works.  Is i.atcorr still
available?  If so, where can I download it for version 6.4?
Thanks for any response,

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


[GRASS-user] Re: 3D lines to raster with elevation

2010-04-01 Thread M S
(answering self)
v.to.points seems to be a nice solution, as going from 3D line to raster,
and capturing Z of line didnt output raster features.

Data went from 3D lines, to 3D points (verticies), to raster with Z.

On Mon, Mar 29, 2010 at 12:15 PM, M S  wrote:

> Should v.to.rast be able to take a 3D line, and convert to raster with
> applicable Z values brought over?
>
> This command:
> v.to.rast input=lin...@permanent output=line3d use=z type=line layer=1
> rows=4096 --overwrite
>
> outputs this:
> Loading data...
> Reading features...
> Writing raster map...
> Converted areas: 0 of 0
> Converted points/lines: 0 of 1
> v.to.rast complete.
>
> When I query the 3D line in GRASS, it has Z values:
> Map: line3d
> Mapset: PERMANENT
> Type: Line
> Id: 1
> Length: 1619.419511
> Line height min: 97.439897
> Line height max: 98.149869
> Layer: 1
> Category: 1
>
>
> Mark
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: grass-user Digest, Vol 47, Issue 52

2010-04-01 Thread Micha Silver

On 04/01/2010 02:52 PM, Nathaniel Iwuchukwu wrote:

i created 11 polygons from different portions of the road.
So if I understand correctly, the procedure is working, but you're not 
getting the results you'd expect?
Maybe you could supply to the grass-users list some URL's of images of 
what the satellite rasters look like, with your training polygons, and 
the resulting roads. Then perhaps someone will be able to suggest how to 
get more complete results.



2010/4/1 Micha Silver mailto:mi...@arava.co.il>>

On 04/01/2010 01:11 AM, Nathaniel Iwuchukwu wrote:

Thanks Micha,
I ran r.thin and got just one line. is there a way i can improve it?


Good, so we're making progress...
How many polygon areas did you create in the training map? Does it
cover various portions of the roads?

On Wed, Mar 31, 2010 at 1:54 PM, Micha Silver mailto:mi...@arava.co.il>> wrote:

Nathaniel Iwuchukwu wrote:

Also, when i convert from vector to raster, i don't see
anything on the new raster map. its all blank. what
should i do. thanks

I guess that would explain why you're getting "Training map
has no classes".
Can you display the vector which covers sections of the road?
Do you see filled polygons?
If not maybe you made boundaries with no centroids? In GRASS,
area features must be composed of both a boundary *and* a
centroid. In the digitizer there's a special button for
adding a centroid. You need one inside each polygon boundary.


On Wed, Mar 31, 2010 at 11:20 AM, Nathaniel Iwuchukwu
mailto:ikechin...@gmail.com>
>> wrote:

   Thanks Micha,
   I will definately post it once i scale through it.
   i am getting an error when i run the i.gensigset on
the training data.
   this is what i typed and the result:
   GRASS 6.4.0RC5 (sis):~/Desktop > i.gensigset
trainingmap=traingis
   group=sislabgp subgroup=sislabsub signaturefile=sislab.sig
   Finding training classes...
100%
   ERROR: Training map has no classes
   do you have any clue why i don't have a class?
Thanks Man
   2010/3/31 Micha Silver mailto:mi...@arava.co.il> >>


   On 03/31/2010 01:19 AM, Nathaniel Iwuchukwu wrote:

   Thanks Micha,
   this looks good but am still working on it.
would you know
   the RGB for a road? from the link you

   No, I can't tell what the RGB values for a road
would be, and
   it will change from image to image, and from road
to road.

   sent me, i will need it to capture the pixel
values of road
   polygons that i am digitizing.

   You *don't* need to find the actual pixel values
for the road
   polygons. You just digitize strips that cover the
road, and
   feed these areas (after converting to a raster) as the
   training map. The gensigset module creates the
collection of
   pixels values that match "roads"

   thanks Micha. you really gave me a lead.

   Good. Post back to the list when you get it worked
out.


Nathaniel

   On Tue, Mar 30, 2010 at 4:26 PM, Micha Silver
mailto:mi...@arava.co.il>
>> wrote:

   Nathaniel Iwuchukwu wrote:

   sorry my typo. i mean classification.

   I didn't intend to insult. Sometimes typos
come out
   funny, and I can't resist pointing it out...

   but am looking for procedure on road
extraction from
   satellite imagery with high resolution

   OK, you'll probably want to use "supervised"
   classification. This means giving the
classification
   algorithm a "training" layer. So the
process involves
   1-  First create a vector layer using the
grass digitizer
   with small polygons covering some sections
of the roads
   in the satellite image. Convert the vector
to a raster
   (v.to.ra

Re: [GRASS-user] ERROR mapset not found

2010-04-01 Thread Achim Kisseler



Could it be that the mapset is locked? If yes, where can I find out and
how can I change that?


A mapset is locked by creating a ".gislock" file in the mapset
directory (note the leading "."). But the error which you report
doesn't sound like a locked mapset.


right, thats not the problem.



It would help if you specified the exact command which you run and the
exact error message (copied and pasted, not re-typed) which it
generates.


here I use the gui: Config -> GRASS working enviroment -> mapset access



Are you sure that the directory is actually a mapset, i.e. does it
contain the WIND and VAR files? Do these files have the correct
ownership and permissions?


Yes, I'm sure.


EDIT


Now I used the command line:

--%<--
g.mapsets addmapset=mapname
--%<--

and it worked!

But now: the gui doesnt work anymore:

--%<--
Traceback (most recent call last):
  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py",
line 257, in OnMapsets

dlg = preferences.MapsetAccess(parent=self, id=wx.ID_ANY)
  File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/pr
eferences.py", line 2137, in __init__

self.mapsetlb.CheckItem(self.all_mapsets.index(mset), True)
ValueError
:
list.index(x): x not in list
--%<--

BTW:
g.mapsets -s
shows the tcltc dialog!?

Thats ok for me, because it works, but WHY does this happen?


Thanks everyone very much for the hints,
Achim


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


[GRASS-user] Installing GIPE

2010-04-01 Thread Szabó Balázs
Hi list!

Is it possible install gipe to grass gis 7.0 latest svn?

When I run install_yanns_grass.sh (as $sudo sh install_yanns_grass.sh)
it return with lot of error (
$main.c: In function ‘main’:
$main.c:164: warning: assignment makes pointer from integer without a
cast 
etc etc
)
However the script copys everithing on the right dir. 

This is my install_yanns_grass.sh settings:
GRASSSVNDIR=/usr/local/grass-7.0.svn
ADDONSVNDIR=/home/baa/grass-addons

--
I tryed with g.extension manager, but this command won't work: 

g.extension extension=r.hydro.CASC2D \
svnurl=https://svn.osgeo.org/grass/grass-addons/gipe/


Someone could help me?

Thanks

Balazs

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