[GRASS-user] plotting quarter degree squares?

2012-09-19 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I have received from somebody a list of quarter degree squares located in South 
Africa. Is there
any easy way of plotting these into a map together with the borders of South 
Africa and the
provinces? The second part (the borders) should not be the problem, but how can 
I convert the list
of qds into a raster / point layer?

The list looks as follow:

   3030CC
   3129BB
   3129BD
   3129DA
   3130AA
   3218DB
   3318BC
   3318CB

And no, I don't think there is the option to get a different format - closed 
source software,
custom build, and developer left... No Comment.

Cheers,

Rainer
- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBZnIIACgkQoYgNqgF2egoA2QCfU44sGY8SwkQt2dWmWYyuBLiJ
qL0AoIbOrjxbLWwB9EvjDBvtlulq075p
=Zf00
-END PGP SIGNATURE-
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] plotting quarter degree squares?

2012-09-19 Thread Markus Neteler
On Wed, Sep 19, 2012 at 12:20 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi

 I have received from somebody a list of quarter degree squares located in 
 South
 Africa. Is there any easy way of plotting these into a map together with the 
 borders
 of South Africa and the provinces?

If I got it right, you could look into r.in.srtm script. A SRTM tile position
is derived from the *name* of the tile.

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


Re: [GRASS-user] New AddOns for Analyzing landscape connectivity based on graph-theory - the r.connectivity.*-toolchain

2012-09-19 Thread Helmut Kudrnovsky
hi Stefan,

Now I added an example to the manuals based on the North Carolina data set. 

thanks, tested now with osgeo4w-wingrass6.4.3svn in win7-64bit-box following
your example.

some issues:

(A)

manual
###Patch input vector map
##Extract habitat patches
#Condition 1: Category 11 = Bottomland Hardwoods/Hardwood Swamps
#Condition 2: no border-cells are suitable  
r.mapcalc patches=if(\
landuse96_28m[0,1]==11\
[...]

in windows (from the mapcalc-gui):
r.mapcalc patches =
if(landuse96_28m[0,1]==11landuse96_28m[0,-1]==11landuse96_28m[1,1]==11landuse96_28m[1,0]==11landuse96_28m[1,-1]==11landuse96_28m[-1,1]==11landuse96_28m[-1,0]==11landuse96_28m[-1,-1]==11landuse96_28m==11,1,null())

(B)
manual:
v.extract input=patches@user1 output=patches_1ha
type=point,line,boundary,centroid,area,face layer=1 where=area_ha1 new=-1
--overwrite

maybe simplified and correctedt to?
v.extract input=patches output=patches_1ha type=area layer=1 where=area_ha 
1

(C)
r.connectivity.distance --verbose patches=patches_1ha@g65 costs=costs@g65
pop_proxy=area_ha prefix=hws_connectivity folder=C:\tmp\connect cutoff=4500
border_dist=18
Preparing boundaries...
Calculating connectivity-distances for patch number 2
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 379: [: -gt: unary operator expected
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 386: [: -eq: unary operator expected
Calculating connectivity-distances for patch number 13
[...]
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 386: [: -eq: unary operator expected
Calculating connectivity-distances for patch number 298
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 379: [: -gt: unary operator expected
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 386: [: -eq: unary operator expected
(Wed Sep 19 14:59:51 2012) Command finished (5 min 49 sec) 

there are a lot of these [: -eq: unary operator expected-messages.

following files are created:

closest.points
edges.csv
r_connectivity.log
r_connectivity.log.tmp
vertices_part_1.csv
vertices_part_2.csv

(D) some test

r.connectivity.network -y -i folder=C:\tmp\connect
connectivity_cutoff=1500.0 lnbh_cutoff=2.0 cl_thres=10 exponent=-3
kernel_plot=C:\tmp\connect\kernel.eps
overview_plot=C:\tmp\connect\overview.eps cores=1
rm: cannot lstat `C:tmpconnect/r_connectivity.log.tmp': No
such file or directory
which: R: unknown command
ERROR: R is required, please install R first

r.connectivity.network -y -i folder='C:\tmp\connect'
connectivity_cutoff=1500.0 lnbh_cutoff=2.0 cl_thres=10 exponent=-3
kernel_plot=C:\tmp\connect\kernel.eps
overview_plot=C:\tmp\connect\overview.eps cores=1
rm: cannot lstat `C:tmpconnect/r_connectivity.log.tmp': No
such file or directory
which: R: unknown command
ERROR: R is required, please install R first
(Wed Sep 19 15:09:44 2012) Command finished (1 sec)   

r.connectivity.network -y -i folder=C:\tmp\connect
connectivity_cutoff=1500.0 lnbh_cutoff=2.0 cl_thres=10 exponent=-3
kernel_plot=C:\tmp\connect\kernel.eps
overview_plot=C:\tmp\connect\overview.eps cores=1
ERROR: r_connectivity.log file could not be found or is not readable.  

= r_connectivity.log seams not be readable
= R is installed here on my system, but (as default by the R-installation)
not in the %PATH%

have a look how GRASS GIS-R-coupling is done by the
standalone-wingrass-installer (but not in osgeo4w-wingrass):
http://grass.osgeo.org/wiki/R_statistics#MS_Windows









-
best regards
Helmut
--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/New-AddOns-for-Analyzing-landscape-connectivity-based-on-graph-theory-the-r-connectivity-toolchain-tp5000351p5002964.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] plotting quarter degree squares?

2012-09-19 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 19/09/12 13:46, Markus Neteler wrote:
 On Wed, Sep 19, 2012 at 12:20 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
 
 Hi
 
 I have received from somebody a list of quarter degree squares located in 
 South Africa. Is
 there any easy way of plotting these into a map together with the borders of 
 South Africa and
 the provinces?
 
 If I got it right, you could look into r.in.srtm script. A SRTM tile position 
 is derived from
 the *name* of the tile.

Thanks.

In the manual of r.in.srtm, it says SRTM tiles are of 1 degree by 1 degree 
size., but my
references refer to quarter degree squares - can I use this as well? Could I 
get some guidance how?

Rainer

 
 Markus
 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBZz7cACgkQoYgNqgF2egr4rACgguQlmJpYQs8ddIqsQfSlXNcC
5T8An0AUM6mcrohO7p3CKtEhlTbCl9wA
=HAxa
-END PGP SIGNATURE-
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] New AddOns for Analyzing landscape connectivity based on graph-theory - the r.connectivity.*-toolchain

2012-09-19 Thread SBL
Dear Helumt

Many thanks for testing!

I have to admit, that I personally find it quite challenging to write a
shell-script that also works on (the different) Windows platforms (I really
should learn more Python...). On Windows everything feels less
predictable...

B)
B can be easily fixed and I shall do so ASAP.

Regarding A: Did I get you right that you had problems with the ' \ ' and '
 '? Removing the backslash won`t be a problem, but I think the
quotation-marks are required on Linux... For the latter it is probably best
to put a note in the example...

C)
C occurs because v.extract (at line 377 of the script) fails.
I assume you used the command-line in the wxPython-GUI? Could you be so kind
and try to use the command in the text version of wingrass? I managed to run
the example on Windows XP and in the text-GUI. It is a mystery to me why
some wingrass commands behave differently when invoked from the command-line
in the GUI and from the command-line (text-GUI).
Maybe the wxPython - text - GUI differences are also causing A (and D)!?

I think it would be a pitty if the GUI was not usable for these addons, but
I feel that it is beyond my power to make it work... Are there any solutions
I could use from other shell-scripts (calling v.extract)?

D)
The %PATH% settings are also a problem for ghostscript which is required for
eps-output (the plots). Because this is neither added to the %PATH%-variable
by default, I simply skipped/deactivated checking for ghostscript in windows
(here also the commands / executables can be different... :-( ), so checking
for ghostscript on Windows is challenging in itself.
The problem with R is, that R is called by the script (while ghostscript is
not). In other words: the script  requires that the path to R is defined in
the %PATH% settings and that R can be called directly...
Maybe the best way to solve this is to add this information to the
error-message (and a link to the GRASS-R-Wiki...).

Strange that r_connectivity.log seams not to be readable. Because from your
output you posted I can see, that the file was written at the correct place.
So the path must have been interpreted correctly for writing. I have no idea
why it is obviously not interpreted correctly for reading... I will check
that...

Best regards
Stefan





--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/New-AddOns-for-Analyzing-landscape-connectivity-based-on-graph-theory-the-r-connectivity-toolchain-tp5000351p5003029.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] New AddOns for Analyzing landscape connectivity based on graph-theory - the r.connectivity.*-toolchain

2012-09-19 Thread Helmut Kudrnovsky
hi Stefan,

Many thanks for testing!

de nada

Regarding A: Did I get you right that you had problems with the ' \ ' and '
 '?

r.mapcalc patches=if(\
landuse96_28m[0,1]==11\
[...]

this isn't possible in the wxgui-commandline (not tried in the
wingrass-windows-commandline; most users on windows probably are using only
the GUI)

Removing the backslash won`t be a problem, but I think the quotation-marks
are required on Linux...

unfortunately there seams to be inconsistency between
unix/windows/GUI/commandline

For the latter it is probably best to put a note in the example... 

sure, but better feel free to open a ticket for this in
http://trac.osgeo.org/grass/, because otherwise it's getting lost in
manual/ML and other modules/scripts etc. are able to benefit

C)
C occurs because v.extract (at line 377 of the script) fails.
I assume you used the command-line in the wxPython-GUI?

yes

Could you be so kind and try to use the command in the text version of
wingrass?

sure, but unfortunately the same message:

[...]
Calculating connectivity-distances for patch number 279
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.distance: line
379:
[: -gt: unary operator expected
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.distance: line
386:
[: -eq: unary operator expected
 100%
 100%
Calculating connectivity-distances for patch number 294
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.distance: line
379:
[: -gt: unary operator expected
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.distance: line
386:
[: -eq: unary operator expected
 100%
 100%
Calculating connectivity-distances for patch number 298
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.distance: line
379:
[: -gt: unary operator expected
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.distance: line
386:
[: -eq: unary operator expected
 100%
 100%
GRASS 6.4.3svn (nc_spm_08)

It is a mystery to me why some wingrass commands behave differently when
invoked from the command-line in the GUI and from the command-line
(text-GUI). 

...windows itself is a mystery...not only the differences between XP, Vista,
7 and soon 8

I think it would be a pitty if the GUI was not usable for these addons, but
I feel that it is beyond my power to make it work... Are there any
solutions I could use from other shell-scripts (calling v.extract)?

feel free to post this issue separately on the dev-ML or open a ticket in
http://trac.osgeo.org/grass/ 

The %PATH% settings are also a problem for ghostscript which is required
for eps-output (the plots).

adding the ghostscript-%PATH%-issue to the manual?

 Because this is neither added to the %PATH%-variable by default, I simply 
skipped/deactivated checking for ghostscript in windows (here also the
commands / executables can be different... :-( ), 

the windows mystery...

so checking for ghostscript on Windows is challenging in itself.
The problem with R is, that R is called by the script (while ghostscript is
not). In other words: the script  requires that the path to R is defined in
the %PATH% settings and that R can be called directly...
Maybe the best way to solve this is to add this information to the
error-message (and a link to the GRASS-R-Wiki...). 

in the standalone winGRASS6.5svn/winGRASS7-installer there is the new
approach of R-winGRASS-coupling by the Windows batchfiles for use with R
mentioned in the wiki
(http://grass.osgeo.org/wiki/R_statistics#GRASS_7_Usage), in the upcoming
standalone winGRASS6.4.3(svn) there is the old statically approach
(http://grass.osgeo.org/wiki/R_statistics#GRASS_6_Usage_III_.28taken_from_the_grass-stats-ML.29)
because of nearly feature freeze.

in short, in the standalone-winGRASSX.x.x, R should in the %PATH%

in the osgeo4w-winGRASSX.x.x R isn't yet in the %PATH%. 

please feel free to open a ticket in http://trac.osgeo.org/grass/ to change
this.

Strange that r_connectivity.log seams not to be readable. Because from your
output you posted I can see, that the file was written at the correct
place. 

yes

So the path must have been interpreted 
correctly for writing. I have no idea why it is obviously 
not interpreted correctly for reading... I will 
check that... 

no idea at the moment for this.













-
best regards
Helmut
--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/New-AddOns-for-Analyzing-landscape-connectivity-based-on-graph-theory-the-r-connectivity-toolchain-tp5000351p5003035.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] using r.walk

2012-09-19 Thread ambrish dhaka

Hi! All,
I am trying to use r.walk for deriving least cost path. The input is DEM filled 
raster data generated from terraflow, and friction map is valued at 1. However, 
I get only 2 at best 5 pixel routing. While using r.cost with slope map as 
input gives me the complete route between two points. Just cannot locate where 
I am wrong in r.walk. Any, missing step I dont know. Kindly, give some detailed 
instructions for successfully using r.walk. Can I use flow accumulation, flow 
direction map or aspect map for generating LCP from r.walk, if yes then please 
tell me how to deploy them.
Thanks!
Ambrish Dhaka
  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user