Thomas Adams | 1 May 01:52 2011
Picon

R/GRASS GIS issue with rgdal

  All:

Sorry for posting the way I have, but I am not really sure where to send 
this, as it is NOT a GRASS issue, really, but…

On a Mac running OS X 10.6.7, I have the following issue:

(1) I've loaded the GRASS GRASS-6.4.1-1-Snow.dmg from the KyngChaos Wiki
(2) GDAL Complete 1.8 framework package
(3) rgdal 0.6.33-1 - R 2.12 package
(4) installed R 2.13 Mac binary from CRAN

The curious thing is, if I try to load rgdal through the Mac R GUI, I get:

 > library(rgdal)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object

'/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rgdal/libs/i386/rgdal.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rgdal/libs/i386/rgdal.so, 
6): Library not loaded: 
/Library/Frameworks/R.framework/Versions/2.12/Resources/lib/libR.dylib
Referenced from: 
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rgdal/libs/i386/rgdal.so
Reason: image not found
Error: package/namespace load failed for 'rgdal'

However, if I load rgdal in R through a Mac term window R prompt, life 
is good and I get:

(Continue reading)

William Kyngesburye | 1 May 07:13 2011

Re: [GRASS-dev] R/GRASS GIS issue with rgdal

My rgdal package is made for R 2.12, as it says.  Though the R installer may let you install it anyways, it is
linked to the R 2.12 framework.

I don't know why it loaded from the Terminal.  It should have the same linking error.

Anyways, looks like I missed an R update.  I need to package a new rgdal for R 2.13 ;)  Watch for it on my
frameworks page...

On Apr 30, 2011, at 6:52 PM, Thomas Adams wrote:

> All:
> 
> Sorry for posting the way I have, but I am not really sure where to send this, as it is NOT a GRASS issue,
really, but…
> 
> On a Mac running OS X 10.6.7, I have the following issue:
> 
> (1) I've loaded the GRASS GRASS-6.4.1-1-Snow.dmg from the KyngChaos Wiki
> (2) GDAL Complete 1.8 framework package
> (3) rgdal 0.6.33-1 - R 2.12 package
> (4) installed R 2.13 Mac binary from CRAN
> 
> The curious thing is, if I try to load rgdal through the Mac R GUI, I get:
> 
> > library(rgdal)
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> unable to load shared object '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rgdal/libs/i386/rgdal.so':
>
dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rgdal/libs/i386/rgdal.so,
6): Library not loaded: /Library/Frameworks/R.framework/Versions/2.12/Resources/lib/libR.dylib
(Continue reading)

Thomas.Adams | 1 May 17:09 2011
Picon

Re: R/GRASS GIS issue with rgdal

William,

Yes, I expected it to fail as well from the Terminal; thanks for the update!

Tom

----- Original Message -----
From: William Kyngesburye <woklist <at> kyngchaos.com>
Date: Sunday, May 1, 2011 1:14 am
Subject: Re: [GRASS-dev] R/GRASS GIS issue with rgdal
To: Thomas Adams <Thomas.Adams <at> noaa.gov>
Cc: grass-user <grass-user <at> lists.osgeo.org>, GRASS developers list <grass-dev <at> lists.osgeo.org>

> My rgdal package is made for R 2.12, as it says.  Though the R 
> installer may let you install it anyways, it is linked to the R 2.12 framework.
> 
> I don't know why it loaded from the Terminal.  It should have the same 
> linking error.
> 
> Anyways, looks like I missed an R update.  I need to package a new 
> rgdal for R 2.13 ;)  Watch for it on my frameworks page...
> 
> On Apr 30, 2011, at 6:52 PM, Thomas Adams wrote:
> 
> > All:
> > 
> > Sorry for posting the way I have, but I am not really sure where to 
> send this, as it is NOT a GRASS issue, really, but…
> > 
> > On a Mac running OS X 10.6.7, I have the following issue:
(Continue reading)

Moritz Lennert | 2 May 11:00 2011
Picon

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 ?

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
Rebecca Bennett | 2 May 12:44 2011

Re: Maximum number of points for v.what.rast

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 <mlennert <at> club.worldonline.be>
To: Rebecca Bennett <rabennett <at> ymail.com>
Cc: grass list <grass-user <at> lists.osgeo.org>; grass-dev <grass-dev <at> lists.osgeo.org>
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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
Hanlie Pretorius | 2 May 14:27 2011
Picon

v.to.rast gives empty raster layer

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 <at> 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 <at> 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.69982072    S: -3156672.30728643   Res: 20.00147148
 |            E: -32474.90929218    W: -67483.27873573   Res: 20.00478254
 |   Range of data:    min = 1620  max = 2460

 |   Data Source:
 |    Vector Map: contours_20m <at> 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 <at> CDNGI_DEM" layer=1 type="point,line,ar\
 |    ea" output="contours_20m <at> 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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Chethan S | 2 May 15:01 2011
Picon

GDAL-GRASS Error

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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
Moritz Lennert | 2 May 15:10 2011
Picon

Re: Maximum number of points for v.what.rast

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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

nsofina | 2 May 15:25 2011
Picon
Picon

error

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 guess, this version of GRASS doesn't understand the definition of temporary files (for example, $TMPVECT)


# Begin of the script

#g.message "Remove temporary files"

# g.remove vect=tmp_points

# g.remove vect=tmp

points_txt="C:/Work_directory/Algorithm/China/points.txt"

echo $GIS_OPT_INPUT1

echo $GIS_OPT_OUTPUT1

cats=`v.db.select map=$GIS_OPT_INPUT1 columns=cat | sed "s/cat//g"`

echo "cats =" $cats

echo "# Object Number DPC value" > $GIS_OPT_OUTPUT1

for i in $cats

do

echo "i =" $i

# if [ $i -lt 14 ] ;

# then

# continue

# fi

v.extract input=$GIS_OPT_INPUT1 output=$TMPVECT list=$i

v.to.points -v -i input=$TMPVECT output=$POINTS type=boundary,area dmax=5

v.out.ascii input=$POINTS output=$points_txt

-------------------------------------------------------------------------------------------------------------------------

I like the new GRASS version and try to adjust it to my needs.

Perhaps anybody has had to face the same problem or knows a solution?


Thanks.


_______________________________________________
grass-user mailing list
grass-user <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
Maris Nartiss | 2 May 16:58 2011
Picon

Re: v.to.rast gives empty raster layer

g.region vect=contours_20m

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

Maris.

2011/5/2, Hanlie Pretorius <hanlie.pretorius <at> gmail.com>:
> 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 <at> 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 <at> 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.69982072    S: -3156672.30728643   Res:
> 20.00147148
>  |            E: -32474.90929218    W: -67483.27873573   Res: 20.00478254
>  |   Range of data:    min = 1620  max = 2460
>
>  |   Data Source:
>  |    Vector Map: contours_20m <at> 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 <at> CDNGI_DEM" layer=1 type="point,line,ar\
>  |    ea" output="contours_20m <at> 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 <at> lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
_______________________________________________
grass-user mailing list
grass-user <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Gmane