Re: [GRASS-user] v.to.rast gives empty raster layer

2011-05-02 Thread Hanlie Pretorius
Hi Maris,

Thanks, your suggestion worked. With the region's resolution set to
5m, I got some output.


Regards
Hanlie

2011/5/2, Maris Nartiss :
> g.region vect=contours_20m
>
> Also 20x20m cells wouldn't be too large?!?
>
> Maris.
>
>
> 2011/5/2, Hanlie Pretorius :
>> Hi,
>>
>> I'm working in GRASS 6.4.1 on Windows XP.
>>
>> I want to use r.surf.contour to convert contour lines into a DEM.
>> However, I first need to convert my vector contour lines into raster
>> contour lines. My region is set to the contours_20m vector layer, with
>> a 20m resolution.
>>
>> v.to.rast --overwrite input=contours_20m output=contours_20m use=attr
>> column=HEIGHT
>> Loading data...
>> Reading features...
>> Writing raster map...
>> Converted areas: 0 of 0
>> Converted points/lines: 1593 of 1593
>> v.to.rast complete.
>>
>> r.info for the result is:
>>  | Layer:contours_20m@CDNGI_DEM Date: Mon May 02 14:18:00 2011
>>  | Mapset:   CDNGI_DEM  Login of Creator: hanlie
>>  | Location: SA_Lo_29E
>>  | DataBase: F:\grassdata
>>  | Title:Labels ( contours_20m@CDNGI_DEM )
>>  | Timestamp: none
>> |
>>  |
>>  |   Type of Map:  raster   Number of Categories: 0
>>  |   Data Type:DCELL
>>  |   Rows: 1772
>>  |   Columns:  1750
>>  |   Total Cells:  3101000
>>  |Projection: Transverse Mercator
>>  |N: -3121229.69982072S: -3156672.30728643   Res:
>> 20.00147148
>>  |E: -32474.90929218W: -67483.27873573   Res: 20.00478254
>>  |   Range of data:min = 1620  max = 2460
>>
>>  |   Data Source:
>>  |Vector Map: contours_20m@CDNGI_DEM in mapset CDNGI_DEM
>>  |Original scale from vector map: 1:1
>>  |
>>  |   Data Description:
>>  |generated by v.to.rast
>>  |
>>  |   Comments:
>>  |v.to.rast input="contours_20m@CDNGI_DEM" layer=1
>> type="point,line,ar\
>>  |ea" output="contours_20m@CDNGI_DEM" use="attr" column="HEIGHT"
>> value\
>>  |=1 rows=4096
>>
>> As you can see from the number of categories (0), there is no
>> information in this raster file.
>>
>> Can someone perhaps help me figure out why this happens?
>>
>> Thanks
>> Hanlie
>> ___
>> 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] Joining table from CSV file to attribute table (from ArcGIS shapefile)

2011-05-02 Thread rvanderweide
Dear GRASS users, I use the Windows version of GRASS 6.4.1. I wish to join the attribute table from my shapefile to a tabe from a CSV file -- so i can put the columns from the CSV file on the map. v.db.join states that it does not support DBF. However, by default GRASS 6.4.1 stores tables in DBF. And when i connect to a SQLite database before i import my shapefile results in an error. What is the easiest way of achieving the above? Find another way to connect to a SQLite database before importing my shapefile and tables? Or, first import all data in DBF, and then try to convert these to an SQLite database in a second step? If possible, a simple concrete example would be greatly appreciated. Many thanks in advance, Roy___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] SQLite error using db.copy

2011-05-02 Thread rvanderweide
Dear GRASS users, I use the Windows version of GRASS 6.4.1. I loaded a shapefile with attribute table pse@pov2. By default GRASS stores the attribute table in DBF. Using db.copy i tried to convert the table to SQLite (so i could later join it to a table from a CSV file). The dbf-to-sqlite option of db.copy results however in a "DBMI-SQLite driver error" ... "no database is open". Note that i created the SQLite database prior to using db.copy. See the command lines below:  "GRASS 6.4> db.connect driver=sqlite database="c:\Test\sqlite.db"    GRASS 6.4> db.copy from_driver=dbf from_table=pse@pov2 to_driver=sqlite to_database="c:\Test\sqlite.db" to_table=pov8sqlDBMI-SQLite driver error:Unable to open database: unable to open database fileWARNING: Unable to open database  by driver no database is openWARNING: Copy table failed"  Any help is greatly appreciated. Greetings, Roy___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] GDAL-GRASS Error

2011-05-02 Thread Martin Landa
Hi,

2011/5/2 Markus Neteler :
> Above problem was a temporary mess which has been fixed since then:
> See http://trac.osgeo.org/grass/changeset/46104
>
> I wonder why 6.5 is lacking this fix.

I will apply the fix ASAP (when I will be able to commit the patch)

Martin

-- 
Martin Landa  * 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] GDAL-GRASS Error

2011-05-02 Thread Markus Neteler
On Mon, May 2, 2011 at 3:01 PM, Chethan S  wrote:
> Hi all,
>
> When I run --with-grass=/usr/local/grass-6.5.svn, for installing GDAL-GRASS,
> I get the following error:
>
> checking for gdal-config... /usr/bin/gdal-config
> using /usr/lib/gdalplugins as GDAL shared library autoload directory
> checking for G_asprintf in -lgrass_gis... no
> configure: error: --with-grass=/usr/local/grass-6.5.svn requested, but
> libraries not found!
> Perhaps you need to set LD_LIBRARY_PATH to include
> /usr/local/grass-6.5.svn/lib?


Above problem was a temporary mess which has been fixed since then:
See http://trac.osgeo.org/grass/changeset/46104

I wonder why 6.5 is lacking this fix.

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


Re: [GRASS-user] ps.map: include eps (path to file), PS-interpreter

2011-05-02 Thread Hamish
Hamish wrote:
> sscanf()'s %s stops scanning the buffer at a space so just
> the first part was picked up. I'm a little rusty on my
> formatting codes but I believe %*s will keep going to the
> end of the line.

would %[^\n] be better?


Hamish

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


Re: [GRASS-user] ps.map: include eps (path to file), PS-interpreter

2011-05-02 Thread Hamish
Johannes wrote:
> I just wanted to include a eps-logo in the ouput of ps.map
> but it isn't displayed, so I guess that this has something
> to do with the path to the file. It seems correct but there
> is a space included which my not be accepted by the
> PS-interpreter.
> 
> Is there a way to set a path with space to include
> eps-files with ps.map?
>
> The way I did was:
> 
> eps 1 1
>     epsfile /Users/Johannes Radinger/Documents/logo.eps
>     scale 1
>     end

Hi,

thanks for the report.

here's the fix:

---8<---
Index: ps/ps.map/do_plt.c
===
--- ps/ps.map/do_plt.c  (revision 46156)
+++ ps/ps.map/do_plt.c  (working copy)
@@ -152,7 +152,7 @@
break;
 
case 'E':   /* EPS file */
-   if (sscanf(buf, "E %d %lf %lf %lf %lf %s",
+   if (sscanf(buf, "E %d %lf %lf %lf %lf %*s",
   &masked, &e1, &n1, &scale, &rotate, name) == 6) {
if (masked && after_masking)
continue;
--->8---


sscanf()'s %s stops scanning the buffer at a space so just the
first part was picked up. I'm a little rusty on my formatting
codes but I believe %*s will keep going to the end of the line.
Seems to work anyway. We are rather lucky that the programmer
had the foresight to make the freeform filename the last
parameter of that line; good practice pays off!


@devs: is svn open for commits or should we wait for the SSL
cert renewal to make its way through the system?


Hamish

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


Re: [GRASS-user] Grass version

2011-05-02 Thread Markus Neteler
On Mon, May 2, 2011 at 7:16 PM, Rebecca Bennett  wrote:
> Hi Glynn,
> Thanks fro your reply that's really helpful!
>
> Is there any chance that we could update the manual to link to r.mfilter.fp
> from the r.mfilter page (thwe reverse link is already there)?

Sure, done.
As soon as the SVN repo is functional again (the next day(s) I hope), I'll
commit. Will be for 6.4.2 and later then.

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


[GRASS-user] ps.map: include eps (path to file), PS-interpreter

2011-05-02 Thread Johannes Radinger
Hello,

I just wanted to include a eps-logo in the ouput of ps.map but it isn't 
displayed,
so I guess that this has something to do with the path to the file. It seems 
correct
but there is a space included which my not be accepted by the PS-interpreter.

Is there a way to set a path with space to include eps-files with ps.map?
The way I did was:

eps 1 1
epsfile /Users/Johannes Radinger/Documents/logo.eps
scale 1
end

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


Re: [GRASS-user] Grass version

2011-05-02 Thread Rebecca Bennett
Hi Glynn, 
Thanks fro your reply that's really helpful!

Is there any chance that we could update the manual to link to r.mfilter.fp 
from 
the r.mfilter page (thwe reverse link is already there)? 


Thanks again,
Rebecca





From: Glynn Clements 
To: Rebecca Bennett 
Cc: GRASS user list 
Sent: Mon, 2 May, 2011 17:31:18
Subject: Re: [GRASS-user] Grass version


Rebecca Bennett wrote:

> Is there a quick way to tell which version of GRASS a raster was created by? 

No.

> I am having issues with consistency of output from r.mfilter between GRASS 
> 6.4 

> and GRASS 7 (which I run in parallel on a 64bit Ubuntu 10.4 system) and need 
> to 
>
> be certain which version I used to create which output.

6.x has r.mfilter (integer) and r.mfilter.fp (floating point). 7.0's
r.mfilter is the floating-point version.

If the data contains nulls, the integer version will convert them to
zeros, while the floating-point version will exclude them from the
calculation.

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


Re: [GRASS-user] error

2011-05-02 Thread Markus Neteler
Hi,

On Mon, May 2, 2011 at 3:25 PM, nsofina  wrote:
> Hi everybody!
>
> Some time ago I installed a new version of GRASS (GRASS 6.4.1 (2011) for
> Windows. And now I can’t start some modules that I created by myself. I get
> the following error:
>
>
>
> Ungültiger Name der Vektorkarte <>. Darf nicht '.' oder 'NULL' enthalten.
> ERROR: Name der Ausgabe-Vektorkarte <> ist keine gültiger Kartenname.

[I see the grammatical error in the message which will be fixed for 6.4.2]

> I guess, this version of GRASS doesn't understand the definition of
> temporary files (for example, $TMPVECT)

How did you define $TMPVECT? The rules are this:
The naming convention for vector maps requires that map names start
with a character, not
a number (map name scheme: [A-Za-z][A-Za-z0-9_]*) - see also
http://grass.osgeo.org/grass64/manuals/html64_user/vectorintro.html

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


Re: [GRASS-user] Grass version

2011-05-02 Thread Glynn Clements

Rebecca Bennett wrote:

> Is there a quick way to tell which version of GRASS a raster was created by? 

No.

> I am having issues with consistency of output from r.mfilter between GRASS 
> 6.4 
> and GRASS 7 (which I run in parallel on a 64bit Ubuntu 10.4 system) and need 
> to 
> be certain which version I used to create which output.

6.x has r.mfilter (integer) and r.mfilter.fp (floating point). 7.0's
r.mfilter is the floating-point version.

If the data contains nulls, the integer version will convert them to
zeros, while the floating-point version will exclude them from the
calculation.

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


[GRASS-user] r.mfilter

2011-05-02 Thread Rebecca Bennett
Dear all,

I am currently putting together a script for a colleague to help automate some 
DTM processing.

Part of this script involves a low pass filter applied using r.mfilter. When I 
applied this command for my research I used GRASS 7, but my colleague will only 
have access to GRASS 6.4. 


There is a large discrepancy in the quality of the low pass r.mfilter output 
between the two versions with 6.4 giving a stepped DTM that cannot be used for 
further processing in this instance.

My questions are, what underlies this discrepancy and can I improve the 
r.mfilter results from GRASS 6.4 to make them of equal quality to those of 
GRASS 
7?

Thanks as always for your time,

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


Re: [GRASS-user] v.to.rast gives empty raster layer

2011-05-02 Thread Maris Nartiss
g.region vect=contours_20m

Also 20x20m cells wouldn't be too large?!?

Maris.


2011/5/2, Hanlie Pretorius :
> Hi,
>
> I'm working in GRASS 6.4.1 on Windows XP.
>
> I want to use r.surf.contour to convert contour lines into a DEM.
> However, I first need to convert my vector contour lines into raster
> contour lines. My region is set to the contours_20m vector layer, with
> a 20m resolution.
>
> v.to.rast --overwrite input=contours_20m output=contours_20m use=attr
> column=HEIGHT
> Loading data...
> Reading features...
> Writing raster map...
> Converted areas: 0 of 0
> Converted points/lines: 1593 of 1593
> v.to.rast complete.
>
> r.info for the result is:
>  | Layer:contours_20m@CDNGI_DEM Date: Mon May 02 14:18:00 2011
>  | Mapset:   CDNGI_DEM  Login of Creator: hanlie
>  | Location: SA_Lo_29E
>  | DataBase: F:\grassdata
>  | Title:Labels ( contours_20m@CDNGI_DEM )
>  | Timestamp: none
> |
>  |
>  |   Type of Map:  raster   Number of Categories: 0
>  |   Data Type:DCELL
>  |   Rows: 1772
>  |   Columns:  1750
>  |   Total Cells:  3101000
>  |Projection: Transverse Mercator
>  |N: -3121229.69982072S: -3156672.30728643   Res:
> 20.00147148
>  |E: -32474.90929218W: -67483.27873573   Res: 20.00478254
>  |   Range of data:min = 1620  max = 2460
>
>  |   Data Source:
>  |Vector Map: contours_20m@CDNGI_DEM in mapset CDNGI_DEM
>  |Original scale from vector map: 1:1
>  |
>  |   Data Description:
>  |generated by v.to.rast
>  |
>  |   Comments:
>  |v.to.rast input="contours_20m@CDNGI_DEM" layer=1 type="point,line,ar\
>  |ea" output="contours_20m@CDNGI_DEM" use="attr" column="HEIGHT" value\
>  |=1 rows=4096
>
> As you can see from the number of categories (0), there is no
> information in this raster file.
>
> Can someone perhaps help me figure out why this happens?
>
> Thanks
> Hanlie
> ___
> 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] Maximum number of points for v.what.rast

2011-05-02 Thread Moritz Lennert

On 02/05/11 12:44, Rebecca Bennett wrote:

Hi Moritz,

Thanks for responding.

 >Which backend are you using ?

Backend is currently dbf (default). Is there a preferred option for
speeding up this type of query?


I don't know if there have been any speed tests of backends, but you 
could try with PostgreSQL, making sure that the cat column has an index.




 >Which process is running during all this time ?

Not sure exactly which process is running. I did --verbose but the chat
stopped after the "excluding x points outside region" message. Any tips
on how to tell which point it is sticking at would be gratefully received!


Depends on which OS you are on. In GNU/Linux just type 'top' in the 
command line and look at which process is using up CPU time.




 >The module executes each individual update query one at a time. Maybe
it might be more efficient >to group them into a temporary file with the
SQL statements and then run that all at once?

Sounds good but I have no idea how to do this - can you point me in the
direction of some more info so that I could try this method?


This is more on the developers' side, as it will have to be programmed 
in the module.


For now, what you could already try is to work in smaller batches, by 
reducing the number of points using the where clause and/or the region 
you work on (using g.region before v.what.rast).


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


[GRASS-user] GDAL-GRASS Error

2011-05-02 Thread Chethan S
Hi all,

When I run --with-grass=/usr/local/grass-6.5.svn, for installing GDAL-GRASS,
I get the following error:

checking for gdal-config... /usr/bin/gdal-config
using /usr/lib/gdalplugins as GDAL shared library autoload directory
checking for G_asprintf in -lgrass_gis... no
configure: error: --with-grass=/usr/local/grass-6.5.svn requested, but
libraries not found!
Perhaps you need to set LD_LIBRARY_PATH to include /usr/local/grass-6.5.svn/lib?

I have created a *grass.conf* as instructed elsewhere inside
/etc/ld.so.conf.d/ and have added following lines in it:
/usr/local/lib
/usr/local/grass-6.5.svn/lib

I ran sudo ldconfig after that too.

I came across a similar issue posted in the GRASS-Dev mailing list
.
As an answer it was instructed to:

You could just generate the symlinks yourself, e.g.:

cd /usr/local/grass-6.5.svn/lib
for file in libgrass_*.so ; do ln -s $file ${file%.6.5.svn.so}.so
; done html.

I ran,

cd /usr/local/grass-6.5.svn/lib
ln -s $file ${file%.6.5.svn.so}.so

but it made no difference! What should I do now?

Thanks and Regards,

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


[GRASS-user] v.to.rast gives empty raster layer

2011-05-02 Thread Hanlie Pretorius
Hi,

I'm working in GRASS 6.4.1 on Windows XP.

I want to use r.surf.contour to convert contour lines into a DEM.
However, I first need to convert my vector contour lines into raster
contour lines. My region is set to the contours_20m vector layer, with
a 20m resolution.

v.to.rast --overwrite input=contours_20m output=contours_20m use=attr
column=HEIGHT
Loading data...
Reading features...
Writing raster map...
Converted areas: 0 of 0
Converted points/lines: 1593 of 1593
v.to.rast complete.

r.info for the result is:
 | Layer:contours_20m@CDNGI_DEM Date: Mon May 02 14:18:00 2011
 | Mapset:   CDNGI_DEM  Login of Creator: hanlie
 | Location: SA_Lo_29E
 | DataBase: F:\grassdata
 | Title:Labels ( contours_20m@CDNGI_DEM )
 | Timestamp: none
 |
 |
 |   Type of Map:  raster   Number of Categories: 0
 |   Data Type:DCELL
 |   Rows: 1772
 |   Columns:  1750
 |   Total Cells:  3101000
 |Projection: Transverse Mercator
 |N: -3121229.69982072S: -3156672.30728643   Res: 20.00147148
 |E: -32474.90929218W: -67483.27873573   Res: 20.00478254
 |   Range of data:min = 1620  max = 2460

 |   Data Source:
 |Vector Map: contours_20m@CDNGI_DEM in mapset CDNGI_DEM
 |Original scale from vector map: 1:1
 |
 |   Data Description:
 |generated by v.to.rast
 |
 |   Comments:
 |v.to.rast input="contours_20m@CDNGI_DEM" layer=1 type="point,line,ar\
 |ea" output="contours_20m@CDNGI_DEM" use="attr" column="HEIGHT" value\
 |=1 rows=4096

As you can see from the number of categories (0), there is no
information in this raster file.

Can someone perhaps help me figure out why this happens?

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


Re: [GRASS-user] Maximum number of points for v.what.rast

2011-05-02 Thread Rebecca Bennett
Hi Moritz,

Thanks for responding. 

>Which backend are you using ? 

Backend is currently dbf (default). Is there a preferred option for speeding up 
this type of query?

>Which process is running during all this time ?

Not sure exactly which process is running. I did --verbose but the chat stopped 
after the "excluding x points outside region" message. Any tips on how to tell 
which point it is sticking at would be gratefully received!

>The module executes each individual update query one at a time. Maybe it  
>might 
>be more efficient >to group them into a temporary file with the  SQL 
>statements 
>and then run that all at once?

Sounds good but I have no idea how to do this - can you point me in the 
direction of some more info so that I could try this method?

Many thanks,
Rebecca






From: Moritz Lennert 
To: Rebecca Bennett 
Cc: grass list ; grass-dev 

Sent: Mon, 2 May, 2011 10:00:41
Subject: Re: [GRASS-user] Maximum number of points for v.what.rast

On 30/04/11 21:50, Rebecca Bennett wrote:
> hello there,
> 
> Does anyone know the maximum number of points that v.what.rast can handle?
> I have a file of 600,000+ points that fails to run (12hrs 100% CPU and
> nothing) and I wonder, before I start with trial and error, if anyone
> knows the answer?

There is no fixed maximum number of points. My guess would be that the time 
needed really depends on the database backend and whether there is an index on 
the category column.

Which backend are you using ? Which process is running during all this time ?



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


Re: [GRASS-user] Maximum number of points for v.what.rast

2011-05-02 Thread Moritz Lennert

On 30/04/11 21:50, Rebecca Bennett wrote:

hello there,

Does anyone know the maximum number of points that v.what.rast can handle?
I have a file of 600,000+ points that fails to run (12hrs 100% CPU and
nothing) and I wonder, before I start with trial and error, if anyone
knows the answer?


There is no fixed maximum number of points. My guess would be that the 
time needed really depends on the database backend and whether there is 
an index on the category column.


Which backend are you using ? Which process is running during all this 
time ?


The module executes each individual update query one at a time. Maybe it 
might be more efficient to group them into a temporary file with the SQL 
statements and then run that all at once ?


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