Re: [GRASS-user] how to calculate area of voronoi polygons considering the boundary of the catchment

2009-09-04 Thread daljeet

The issue was that the contours vector was 3d. Now i could put the centroids
and add the area within the boundaries.

I am struck at how to associate the area (cat|area) with the associated
isohyetal lines? Any idea.

Thanks
Daljeet 


daljeet wrote:
> 
> Thanks.
> 
> I am using the first method that you suggested. But it fails to create
> centroids whereas there are multiple isohyetal strips now and each should
> have been given the centroid. To give you the details on what i did.
> 
> In real scenario, we will have the defined catchment area (which will be a
> close polygon shaped vector) with rainfall measurements on various gauge
> points (some gauge points will be within the catchment boundary and some
> will be outside that catchment area, but within the region of the
> catchment vector). Please correct me if I am wrong.
> 
> I am simulating the above scenario by
> a) making a xyz point data file. x,y being lat and long and z being the
> measurement of rainfall.
> b) catchment is represented by a vector (basin_v)
> 
>> g.region vect=basin_v
> 
> #import the xyz pt data
>> v.in.ascii x=2 y=1 cat=0 input="rain_data" out="rainpoint_v" columns="x
>> double precision, y double precision, rain_info double precision" fs="\t"
>> skip=1 --o
> 
>>MASK applied (which represents the raster of the catchment area with each
cell value equal to 1) 
> 
>>v.surf.rst rainpoint_v zcol=rain_info elev=rain_rst --o
> 
>>r.contour step=1 input=rain_rst output=rain_con_v
> 
> At this stage, i have two seperate vectors, a) contour vector (rain_con_v)
> which has the lines only b) vector representing the catchment area
> (basin_v) whose topo details are as follows
> 
>>v.info rain_con_v -t
> nodes=7
> points=0
> lines=7
> boundaries=0
> centroids=0
> areas=0
> islands=0
> faces=0
> kernels=0
> primitives=7
> map3d=1
> 
> Please note the below output. This may be reason of failure.
>>v.info basin_v -t
> nodes=2
> points=0
> lines=0
> boundaries=1
> centroids=1
> areas=1
> islands=1
> faces=0
> kernels=0
> primitives=2
> map3d=0
> 
> Now, as you suggested, i need to apply the v.clean (with break) to create
> the nodes at the intersection of isolines and boundary of the catchment
> vector.
> 
> And for the input of v.clean, I patched the above two vectors using
> v.patch. Please correct if this is the right step or something else would
> have been done?
> 
>> v.patch input=rain_con_v,basin_v out=rain_comp_v
> WARNING: Vector map  already exists and will be overwritten
> Patching vector map ...
> Patching vector map ...
> Building topology for vector map ...
> Registering primitives...
> 9 primitives registered
> 3643 vertices registered
> Building areas...
>  100%
> 1 areas built
> 1 isles built
> Attaching islands...
>  100%
> Attaching centroids...
>  100%
> Number of nodes: 9
> Number of primitives: 9
> Number of points: 0
> Number of lines: 7
> Number of boundaries: 1
> Number of centroids: 1
> Number of areas: 1
> Number of isles: 1
> Intersections at borders will have to be snapped
> Lines common between files will have to be edited
> The header information also may have to be edited
> v.patch complete. 2 vector maps patched
> 
> rain_comp_v looks like this
> 
>  http://n2.nabble.com/file/n3568825/rain_comp_v.png 
> 
>> v.clean in=rain_comp_v out=rain_comp tool=break --o
> --
> Tool: Threshold
> Break: 0.00e+00
> --
> WARNING: Vector map  already exists and will be overwritten
> Copying vector lines...
> Rebuilding parts of topology...
> Building topology for vector map ...
> Registering primitives...
> 9 primitives registered
> 3643 vertices registered
> Number of nodes: 9
> Number of primitives: 9
> Number of points: 0
> Number of lines: 7
> Number of boundaries: 1
> Number of centroids: 1
> Number of areas: -
> Number of isles: -
> --
> Tool: Break lines at intersections
> --
> Rebuilding topology for output vector map...
> Building topology for vector map ...
> Registering primitives...
> 28 primitives registered
> 3662 vertices registered
> Building areas...
>  100%
> 1 areas built
> 1 isles built
> Attaching islands...
>  100%
> Attaching centroids...
>  100%
> Number of nodes: 28
> Number of primitives: 28
> Number of points: 0
> Number of lines: 26
> Number of boundaries: 1
> Number of centroids: 1
> Number of areas: 1
> Number of isles: 1
> 
>>v.centroids rain_comp out=rain_cen option=add --o
> WARNING: Vector map  already exists and will be overwritten
> Processing features...
> 0 new centroids placed in output map
> Copying attribute table(s)...
> Building topology for vector map ...
> Registering primitives...
> 28 primitives registered
> 3662 vertices registered
> Building areas...
>  100%
> 1 areas built
> 1 isles built
> Attaching islands...
>  100%
> Attaching centroids...
>  100%
> Number of nodes: 28
> Number of 

Re: [GRASS-user] problems with compile i.landsat.acca add-onn

2009-09-04 Thread Saami Riet

Thank you Markus
again...the problem with compile the add-onn under Ubuntu is not fixed,
changed the path in the file Platform.make:

67  GRASS_HOME  = /usr/lib/grass64/
68  RUN_GISBASE = /usr/lib/grass64/

used again the command:

sudo make MODULE_TOPDIR=/usr/lib/grass64

and got the following messages:
...
/usr/lib/grass64/include/Make/Module.make:15: Warnung: Alte Befehle für das
Ziel »/usr/lib/grass64/« werden ignoriert
gcc -I/usr/lib/grass64/ /dist.i486-pc-linux-gnu/include  -Wall -g -O  
-DPACKAGE=\""grassmods"\"  -I/usr/lib/grass64/
/dist.i486-pc-linux-gnu/include -o OBJ.i486-pc-linux-gnu/algorithm.o -c
algorithm.c
gcc: /dist.i486-pc-linux-gnu/include: No such file or directory
gcc: /dist.i486-pc-linux-gnu/include: No such file or directory
algorithm.c:6:23: Fehler: grass/gis.h: No such file or directory
algorithm.c:7:27: Fehler: grass/glocale.h: No such file or directory
algorithm.c: In Funktion »acca_first«:
algorithm.c:220: Warnung: Implizite Deklaration der Funktion
»G_allocate_raster_buf«
algorithm.c:220: Fehler: »CELL_TYPE« nicht deklariert (erste Benutzung in
dieser Funktion)
...

Is this a big problem?
Mayby there is a answer for it.
Please help.

Michael 
-- 
View this message in context: 
http://n2.nabble.com/problems-with-compile-i-landsat-acca-add-onn-tp3496808p3579525.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


Re: [GRASS-user] clear sky index interpolation

2009-09-04 Thread buraq



buraq wrote:
> 
> Hi,
> It's a newbie question.
> I am trying to intepolate clear sky index values. First I put the values
> in a csv file in this format "lat,lon,kc".
> Then I used db.in.ogr to get table. Next step, vector raster map is
> created by v.in.db. When I want to create raster file, I use that command 
> v.vol.rst input=Kc vect cellinp=elevationRaster wcolumn=indexValueColumn
> then I get this "Vector is not 3D"
> Should I add elevation to csv? or what is the right way the interpolate
> the data?
> 
> Thanks
> Regards
> 


hi again I tried interpolation with elevation data.  Now I got x,y and z But
now the problem is, v.vol.rst gives the "Error in COGRR!" "Interp_call
failed" message. Have you ever meet this kind of a error message? I searched
the list but couldn't find any information about that kind of problem.

Thanks
Regards
-- 
View this message in context: 
http://n2.nabble.com/clear-sky-index-interpolation-tp3572894p3580073.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


Re: [GRASS-user] clear sky index interpolation

2009-09-04 Thread Dylan Beaudette
Hi,

Are you trying to generate a 2D raster map of interpolated values, or
a 3D 'volume' of interpolated values? If your input consists of
{lat,lon,kc}, then a 2D raster map is likely what you are after. In
that case, check out the v.surf.rst module.

Cheers,
Dylan

On Fri, Sep 4, 2009 at 6:49 AM, buraq wrote:
>
>
>
> buraq wrote:
>>
>> Hi,
>> It's a newbie question.
>> I am trying to intepolate clear sky index values. First I put the values
>> in a csv file in this format "lat,lon,kc".
>> Then I used db.in.ogr to get table. Next step, vector raster map is
>> created by v.in.db. When I want to create raster file, I use that command
>> v.vol.rst input=Kc vect cellinp=elevationRaster wcolumn=indexValueColumn
>> then I get this "Vector is not 3D"
>> Should I add elevation to csv? or what is the right way the interpolate
>> the data?
>>
>> Thanks
>> Regards
>>
>
>
> hi again I tried interpolation with elevation data.  Now I got x,y and z But
> now the problem is, v.vol.rst gives the "Error in COGRR!" "Interp_call
> failed" message. Have you ever meet this kind of a error message? I searched
> the list but couldn't find any information about that kind of problem.
>
> Thanks
> Regards
> --
> View this message in context: 
> http://n2.nabble.com/clear-sky-index-interpolation-tp3572894p3580073.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 mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] trouble using .ttf fonts with d.font

2009-09-04 Thread Markus Neteler
On Thu, Sep 3, 2009 at 5:07 AM, Tim Holland wrote:
>
> Hi all,
>
> I am having some trouble with d.font and getting it to use fonts other than
> the default options that are mentioned in the d.font manual
> http://grass.itc.it/grass64/manuals/html64_user/d.font.html
> http://grass.itc.it/grass64/manuals/html64_user/d.font.html .
>
> What I have tried:
>>d.font font=romant   #or other default font - italicc, gothgbt, etc
> this works fine, but the font selection is a bit limited.  So I wanted to
> try using other fonts from the library.
>
>>d.font font=Tahoma   #or Arial, Verdana, other options that are mentioned
> in /Users/usr/Library/GRASS/6.4/Modules/etc/fontcap
> this returns a long string of error messages:
>>The process has forked and you cannot use this CoreFoundation functionality
> safely. You MUST exec().
>>Break on
> __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
> to debug.
>>The process has forked and you cannot use this CoreFoundation functionality
> safely. You MUST exec().
>>Break on
> __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
> to debug.
>>ERROR eof from graphics driver.

See
http://trac.osgeo.org/grass/ticket/377
http://lists.osgeo.org/pipermail/grass-user/2009-April/050038.html
and
http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html#SECDAEMONVSFRAMEWORKS

No solution yet, sorry...

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


Re: [GRASS-user] v.vol.rst error

2009-09-04 Thread Markus Neteler
On Tue, Sep 1, 2009 at 10:03 AM, xavier garcia
acosta wrote:
...
> GRASS 6.4.0RC4 (costabrava):~ > v.vol.rst input=string [cellinp=dtm]
> [wcolumn=DIESPLUJA] [cellout=diespluja]
> *** buffer overflow detected ***: v.vol.rst terminated
> === Backtrace: =
> /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb77d0da8]
> /lib/tls/i686/cmov/libc.so.6[0xb77ceeb0]
> /lib/tls/i686/cmov/libc.so.6[0xb77ce5a8]
> /lib/tls/i686/cmov/libc.so.6(__overflow+0x53)[0xb7741683]
> /lib/tls/i686/cmov/libc.so.6(__printf_fp+0x176e)[0xb771926e]
> /lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x3ca)[0xb7712bfa]
> /lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0xb77ce654]
> /lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0xb77ce59d]
> v.vol.rst(main+0x176)[0x804c966]
> /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb76e9775]
> v.vol.rst[0x804bd71]
> === Memory map: 
> 08048000-08056000 r-xp  08:06 347205
> /usr/lib/grass64/bin/v.vol.rst
> 08056000-08057000 r--p d000 08:06 347205
> /usr/lib/grass64/bin/v.vol.rst
> 08057000-08058000 rw-p e000 08:06 347205
> /usr/lib/grass64/bin/v.vol.rst
> 08efe000-08f1f000 rw-p 08efe000 00:00 0  [heap]
> b5a1b000-b5a5a000 r--p  08:06 81613
> /usr/lib/locale/ca_ES.utf8/LC_CTYPE
> b5a5a000-b5a5e000 rw-p b5a5a000 00:00 0
> b5a5e000-b5a61000 r-xp 0
>
> Pd: My GRASS version is GRASS 6.4.0RC4 (2009) runnig on UBUNTU 9.04

I have tried with 6.4.svn in the Slovakia3d demo location:

v.vol.rst precip3d cellinp=precip wcolumn=precip cellout=diespluja segmax=700
435 records selected from table
WARNING: strip exists with insufficient data
Processing all selected output files will require 0 bytes of disk space for
temp files

Percent complete:0%...

I didn't wait for 100% though. Does it crash immediately for you?


On Tue, Sep 1, 2009 at 5:50 PM, xavier garcia
acosta wrote:
...
> I have solved the last problem but now when I exectute v.vol.rst module with
> the next command:
>
> v.vol.rst input=puntsesta...@pobles cellinp=...@clima wcolumn=DIESPLUJA
> tension=40. smooth=0.1 segmax=700 npmin=200 dmin=15.001074 wmult=1.0
> zmult=1.0 cellout=diespluja2
>
> I've got the next error:
>
> "Percent complete: WARNING: Reading raster map  request for row
> 3231 is outside region
> ERROR: Could not get row (eventually WIND3 does not match WIND)"
>
> Anybody know how to solve that?

Check
g.region -p3

if rows and rows3 match and col and cols3. They need to be adjusted if not.

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


Re: [GRASS-user] nnbathy

2009-09-04 Thread Jamie Adams
Reviving this old thread - I just noticed the other day that the nn code has
been checked into Google Code using an MIT license.  Would it be possible to
integrate directly now?  I find r.surf.nnbathy to be one of the more useful
interpolation routines.
- Jamie

On Tue, Sep 23, 2008 at 8:50 AM, Dylan Beaudette
wrote:

> On Tue, Sep 23, 2008 at 6:12 AM, Moritz Lennert
>  wrote:
> > On 23/09/08 14:06, Moritz Lennert wrote:
> >
> >> On 23/09/08 13:49, Moritz Lennert wrote:
> >>>
> >>> I have also put it on my machine, in case the above link doesn't work
> >>> anymore:
> >>>
> >>> http://geog-pc40.ulb.ac.be/grass/nnbathy/
> >>
> >> As a follow-up: I have sent a mail to Pavel Sakov to find out where the
> >> code is available now.
> >>
> >
> > Pavel sent me the code. It is available at above address. We will see
> > whether he will set up a new web site, or whether we will integrate the
> code
> > into the Add-Ons SVN.
> >
> > Moritz
>
> I have not seen the original code / license, but would it be possible
> to directly integrate the code into GRASS? This would remove the
> dependency of an external nnbathy library.
>
> Cheers,
>
> Dylan
> ___
> 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] problems with compile i.landsat.acca add-onn

2009-09-04 Thread Markus Neteler
On Fri, Sep 4, 2009 at 2:14 PM, Saami Riet wrote:
>
> Thank you Markus
> again...the problem with compile the add-onn under Ubuntu is not fixed,
> changed the path in the file Platform.make:
>
> 67  GRASS_HOME          = /usr/lib/grass64/
> 68  RUN_GISBASE         = /usr/lib/grass64/
>
> used again the command:
>
> sudo make MODULE_TOPDIR=/usr/lib/grass64
>
> and got the following messages:
> ...
> /usr/lib/grass64/include/Make/Module.make:15: Warnung: Alte Befehle für das
> Ziel »/usr/lib/grass64/« werden ignoriert
> gcc -I/usr/lib/grass64/ /dist.i486-pc-linux-gnu/include  -Wall -g -O
> -DPACKAGE=\""grassmods"\"  -I/usr/lib/grass64/
> /dist.i486-pc-linux-gnu/include  ...

As you can see you have an illegal white space there:

gcc -I/usr/lib/grass64/ /dist.i486-pc-linux-gnu/include ...
should be
gcc -I/usr/lib/grass64/dist.i486-pc-linux-gnu/include
etc.

Please carefully check Platform.make for this (I suggest to remove the
trailing / from the

> 67  GRASS_HOME  = /usr/lib/grass64/
> 68  RUN_GISBASE = /usr/lib/grass64/

entries.

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