Re: [GRASS-dev] opencell opening temp null file: no temp files available

2008-11-19 Thread Andruit
It seems that the files are not closed, but I use

if((elev_fd = G_open_cell_old (name, mapset)) < 0)
G_fatal_error( _("can't open %s"), name);
   
if((output_fd = G_open_cell_new(outname)) < 0)
G_fatal_error( _("can't open outname %s"), outname);

to open the files and

G_close_cell(output_fd);
G_close_cell(elev_fd);

to close the files again.

Is there anything wrong?

Andi

Glynn Clements wrote:
> [EMAIL PROTECTED] wrote:
>
>> I am writing a Grass programm which creates a raster, reads the values
>> of the raster map at certain points and creates a new rastermap having
>> the same name as the old one.
>>
>> I am using the function
>>
>> G_open_cell_new()  to overwrite the existing raster map.
>>
>> and the function
>>
>>  G_close_cell()
>>
>>
>> It works fine.
>>
>> But after about 1000 loops I get the following messsage.
>>
>> WARNING: opencell opening temp null file: no temp files available
>>
>> Does anyone know what it means. I have enough space left in my ./tmp
>> folder. And I also have write permissions on it.
>
> It probably means that files aren't getting closed, so you are
> exceeding the limit on the number of open files per process (by
> default 1024, check with ulimit -n).
>
> On Linux, you can check which files a process has open by looking in
> the /proc//fd directory, where  is the PID of the process.
>
> If you're modifying a map "in-place", you'll need to close and re-open
> the input map in order to see the changes. Opening a map for write
> creates a temporary file, which is renamed over the original when
> closed. If the original cell/fcell file is still open for read at that
> point, it will still exist and still be open (it will show up as
> "(deleted)" in /proc//fd).
>


-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] (no subject)

2008-11-19 Thread Andruit
It seems that the files are not closed, but I use

if((elev_fd = G_open_cell_old (name, mapset)) < 0)
G_fatal_error( _("can't open %s"), name);
   
if((output_fd = G_open_cell_new(outname)) < 0)
G_fatal_error( _("can't open outname %s"), outname);

to open the files and

G_close_cell(output_fd);
G_close_cell(elev_fd);

to close the files again.

Is there anything wrong?

Andi

Glynn Clements wrote:
> [EMAIL PROTECTED] wrote:
>
>> I am writing a Grass programm which creates a raster, reads the values
>> of the raster map at certain points and creates a new rastermap having
>> the same name as the old one.
>>
>> I am using the function
>>
>> G_open_cell_new()  to overwrite the existing raster map.
>>
>> and the function
>>
>>  G_close_cell()
>>
>>
>> It works fine.
>>
>> But after about 1000 loops I get the following messsage.
>>
>> WARNING: opencell opening temp null file: no temp files available
>>
>> Does anyone know what it means. I have enough space left in my ./tmp
>> folder. And I also have write permissions on it.
>
> It probably means that files aren't getting closed, so you are
> exceeding the limit on the number of open files per process (by
> default 1024, check with ulimit -n).
>
> On Linux, you can check which files a process has open by looking in
> the /proc//fd directory, where  is the PID of the process.
>
> If you're modifying a map "in-place", you'll need to close and re-open
> the input map in order to see the changes. Opening a map for write
> creates a temporary file, which is renamed over the original when
> closed. If the original cell/fcell file is still open for read at that
> point, it will still exist and still be open (it will show up as
> "(deleted)" in /proc//fd).
>


-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] opencell opening temp null file: no temp files available

2008-11-19 Thread Andruit
Hello,
I am writing a Grass programm which creates  a raster, reads the values of the 
raster map at certain points and creates a new rastermap having the same name 
as the old one.

I am using the function

G_open_cell_new()  to overwrite the existing raster map.

and the function

 G_close_cell()


It works fine.

But after about 1000 loops I get the following messsage.

WARNING: opencell opening temp null file: no temp files available

Does anyone know what it means. I have enough space left in my ./tmp folder. 
And I also have write permissions on it.

Thanks in advance.

Andi
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] z value from raster to vect

2007-11-26 Thread Andruit
Hi,
i have question concerning c Programming and vektor Files.
I extracted some points out of a dem and created a vector file.


  Points = Vect_new_line_struct();
  Cats = Vect_new_cats_struct ();

 

if (0 > Vect_copy_xyz_to_pnts (Points, xarray, yarray, NULL, n_points))
  G_fatal_error ("Vect_copy error\n");

Vect_write_line (Map, type, Points, Cats);


as a result  I get several vector points, but they are not connected to a 
database and so they don´t ave any Information about the z value.
 
I would like to write the z value into a table, so that I can interpolate 
between the vector points.

I´m a newbie in grass Programming. Does anyone know how to do it???

Thank you
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] make file grass 6.3 r.refine

2007-11-19 Thread Andruit
Hi.
At the moment I´m trying to compile the tool r.refine, which was written for 
grass 5.x on grass 6.3.  I had to do some changes in the Source Code but I 
still have Problems with the Makefile. There is something wrong with the 
glut.hlibrares I think.


When i try to compile it i get the following messages
...
...
...
/root/Desktop/r.refine/render_tin.c:102: undefined reference to `glutCreateMenu'
/root/Desktop/r.refine/render_tin.c:103: undefined reference to 
`glutAddMenuEntry'
/root/Desktop/r.refine/render_tin.c:104: undefined reference to 
`glutAddMenuEntry'
/root/Desktop/r.refine/render_tin.c:105: undefined reference to 
`glutAddMenuEntry'
/root/Desktop/r.refine/render_tin.c:106: undefined reference to `glutAttachMenu'
OBJ.i686-pc-linux-gnu/render_tin.o: In function `mainMenu':
/root/Desktop/r.refine/render_tin.c:396: undefined reference to 
`glutPostRedisplay'
/root/Desktop/r.refine/render_tin.c:396: undefined reference to 
`glutPostRedisplay'
/root/Desktop/r.refine/render_tin.c:396: undefined reference to 
`glutPostRedisplay'
OBJ.i686-pc-linux-gnu/render_tin.o: In function `display':
/root/Desktop/r.refine/render_tin.c:296: undefined reference to `glFlush'
OBJ.i686-pc-linux-gnu/render_tin.o: In function `OGL_render':
/root/Desktop/r.refine/render_tin.c:121: undefined reference to `glutMainLoop'
OBJ.i686-pc-linux-gnu/render_tin.o: In function `keypress':
/root/Desktop/r.refine/render_tin.c:370: undefined reference to 
`glutPostRedisplay'
/root/Desktop/r.refine/render_tin.c:366: undefined reference to 
`glutPostRedisplay'
/root/Desktop/r.refine/render_tin.c:324: undefined reference to 
`glutPostRedisplay'
/root/Desktop/r.refine/render_tin.c:332: undefined reference to 
`glutPostRedisplay'
/root/Desktop/r.refine/render_tin.c:362: undefined reference to 
`glutPostRedisplay'

Has anybody an idea what to do?
Thank you






-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev