Re: [GRASS-dev] [GRASS GIS] #3462: Allow setting environment variables in grass startup script

2017-12-16 Thread GRASS GIS
#3462: Allow setting environment variables in grass startup script
--+-
  Reporter:  mankoff  |  Owner:  grass-dev@…
  Type:  enhancement  | Status:  new
  Priority:  major|  Milestone:
 Component:  Default  |Version:  7.2.2
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MacOSX
--+-

Comment (by martinl):

 Environmental variables are loaded by load_env()
 source:grass/trunk/lib/init/grass.py?rev=65585#L1710 from default config
 file source:grass/trunk/lib/init/grass.py?rev=65585#L1220. In my case on
 Linux (using Bash), it's `~/.grass7/bashrc`. Eg.

 {{{
 $ cat ~/.grass7/bashrc
 export GRASS_MESSAGE_FORMAT=plain
 $ GRASS_DEBUG=ON ./bin.x86_64-pc-linux-gnu/grass75 -text
 ...
 DEBUG: Environmental variable set GRASS_MESSAGE_FORMAT=plain
 > env | grep MESSAGE
 GRASS_MESSAGE_FORMAT=plain
 }}}

 r65585 has been introduced to read only alias and other commands since
 environmental variable should be already read.

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3462: Allow setting environment variables in grass startup script

2017-12-16 Thread GRASS GIS
#3462: Allow setting environment variables in grass startup script
--+-
  Reporter:  mankoff  |  Owner:  grass-dev@…
  Type:  enhancement  | Status:  new
  Priority:  major|  Milestone:
 Component:  Default  |Version:  7.2.2
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MacOSX
--+-

Comment (by martinl):

 In [changeset:"71942" 71942]:
 {{{
 #!CommitTicketReference repository="" revision="71942"
 explain setting environment variables in grass startup script, see #3462
 }}}

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3462: Allow setting environment variables in grass startup script

2017-12-16 Thread GRASS GIS
#3462: Allow setting environment variables in grass startup script
--+-
  Reporter:  mankoff  |  Owner:  grass-dev@…
  Type:  enhancement  | Status:  new
  Priority:  major|  Milestone:
 Component:  Default  |Version:  7.2.2
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MacOSX
--+-

Comment (by martinl):

 So what is your shell?

 {{{
 env | grep SHELL
 }}}

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3462: Allow setting environment variables in grass startup script

2017-12-16 Thread GRASS GIS
#3462: Allow setting environment variables in grass startup script
--+-
  Reporter:  mankoff  |  Owner:  grass-dev@…
  Type:  enhancement  | Status:  new
  Priority:  major|  Milestone:
 Component:  Default  |Version:  7.2.2
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MacOSX
--+-

Comment (by mankoff):

 My shell is `/bin/bash`.

 I have the following in `~/.grass.bashrc`:

 {{{
 echo ".grass.bashrc"
 export FOO=42
 export DYLD_LIBRARY_PATH=/opt/local/share/grass-7.2.2/lib
 }}}

 And this in `~/.grass7/bashrc`:

 {{{

 echo ".grass7/bashrc"
 export BAR=42
 export DYLD_LIBRARY_PATH=/opt/local/share/grass-7.2.2/lib
 }}}

 And when I launch grass with: `grass72 -c ./Gtmp`, I see the following:

 {{{
 .grass.bashrc
 .grass7/bashrc
 }}}

 And:

 {{{
 GRASS 7.2.2 (Gtmp):~ > echo $FOO

 GRASS 7.2.2 (Gtmp):~ > echo $BAR
 42
 GRASS 7.2.2 (Gtmp):~ > echo $DYLD_LIBRARY_PATH

 GRASS 7.2.2 (Gtmp):~ >
 }}}

 If I comment out the line that blocks `export` statements in my startup
 file, both `FOO` and `DYLD_LIBRARY_PATH` are correctly set. Is the `DYLD`
 issue related to the following? What is going on on line 564:
 
https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py?rev=65585#L564

 {{{
 # Set LD_LIBRARY_PATH (etc) to find GRASS shared libraries
 # this works for subprocesses but won't affect the current process
 path_prepend(gpath("lib"), ld_library_path_var)
 }}}

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] Fwd:

2017-12-16 Thread Paulo van Breugel
Hi Anna and other GRASS GIS devs,

I am trying to build a tangible landscape system at our school. I got most
things installed, but I got stuck at installing the
tangible-landscape-immersive-extension.

The question is where to find the "immersive_extention.blend" &
"immersive_extention.py" files (mentioned in step 5 and 7 in the README
file.

There is already the issue '
https://github.com/tangible-landscape/tangible-landscape-immersive-extension/issues/3'
filed in August, but with no reply yet, so I am hoping you can provide some
guidance.

Best wishes,

Paulo


--

Paulo van Breugel, PhD

Lecturer Geo Data Analyst

Geomedia & Design

Tel: +31 (0)88-890 3218 <088%20890%203218>



HAS University of Applied Sciences 

Onderwijsboulevard 221


5223 DE ‘s-Hertogenbosch

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS-PSC] GRASS add-on sharing and write access

2017-12-16 Thread Markus Metz
On Sat, Dec 16, 2017 at 7:41 PM, Edmond Nagy 
wrote:
>
> Hi Markus,
>
> Thank you for your patience and your feedback.
>
> First of all, I would like to ask a couple more questions about the make
file.
> The MODULE_TOPDIR from the Makefile should be (as its name says) the full
path to the "v.lcp.network" directory, where all three files are, the py
script, the html and the Makefile? After that, should I save the Makefile
as Makefile.exe and run it by clicking it? I would also like to know if it
matters where the "v.lcp.network" directory is when I run the Makefile, or
should it be in a more specific location.

The Makefile must be exactly
-->
MODULE_TOPDIR = ../..

PGM = v.lcp.network

include $(MODULE_TOPDIR)/include/Make/Script.make

default: script
<--

You use the Makefile indirectly by running make in the directory
v.lcp.network. It does not matter where the "v.lcp.network" directory is.
You can override MODULE_TOPDIR with
export MODULE_TOPDIR=/path/to/grass-source make

MODULE_TOPDIR is the path to the main GRASS source folder

I understand you are using Microsoft Windows. You might need to compile
GRASS from source in order to test your module, please read

https://trac.osgeo.org/grass/wiki/CompileOnWindows

HTH,

Markus M

>
> Regarding the python code, thank you for pointing that out. I will surely
review that part.
>
> All the best,
> Nagy Edmond
>
> On Fri, Dec 15, 2017 at 11:06 PM, Markus Metz <
markus.metz.gisw...@gmail.com> wrote:
>>
>>
>>
>> On Fri, Dec 15, 2017 at 5:50 PM, Luca Delucchi 
wrote:
>> >
>> > Hi Nagy,
>> >
>> > Il 15 dic 2017 5:42 PM, "Nagy Edmond"  ha
scritto:
>> >
>> > Markus, thank you very much for helping.
>> >
>> > I have now included into the add-on directory the py, html and makefile
>> > files. The last one is an example I found somewhere, but I am not sure
how
>> >
>> >
>> > You can have a look to makefile for addons in the svn repository [1]
>> >
>> > to adapt it, or how to run it (or from where) to generate the final
html.
>> > Could you please tell me how it works, or point me to a working
example?
>> >
>> >
>> > To understand how it works you can read the docs in the wiki about
addons compilation [0]
>> > I hope this is helpful
>>
>> The Makefile must have this content:
>> -->
>> MODULE_TOPDIR = ../..
>>
>> PGM = v.lcp.network
>>
>> include $(MODULE_TOPDIR)/include/Make/Script.make
>>
>> default: script
>> <--
>>
>> then run make in the folder v.lcp.network. You might need to set
MODULE_TOPDIR with something like
>>
>> export MODULE_TOPDIR=/path/to/grass-source make
>>
>>
>> Some comments on the module:
>>
>> You don't need both the -v and the -w flag, they are mutually exclusive.
E.g. only the -w flag is enough:
>> -w flag not set: use r.cost
>> -w flag set: use r.walk
>>
>> How to get the number of points in a vector:
>> pointnb = grass.vector_info_topo(map=vInput)['points']
>>
>> You could eliminate the inner for loop at L180, this would vastly speed
up the module:
>> r.cost, r.walk, and r.drain accept multiple points as input, therefore
you could use all points but the current point as stop points for
r.cost/r.walk and as start points for r.drain
>>
>> HTH,
>>
>> Markus M
>>
>> >
>> >
>> > Edmond
>> >
>> >
>> > Ciao
>> > Luca
>> >
>> >
>> > [0] https://grasswiki.osgeo.org/wiki/Compile_and_Install#Addons
>> > [1] https://trac.osgeo.org/grass/browser/grass-addons/grass7
>> >
>> > ___
>> > grass-psc mailing list
>> > grass-...@lists.osgeo.org
>> > https://lists.osgeo.org/mailman/listinfo/grass-psc
>>
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] (no subject)

2017-12-16 Thread Anna Petrášová
Hi Paulo,

my colleague who is the author of the extension is currently
traveling, so you might need to wait for the answer a bit. Let me know
if I can help with something else though.

Best,

Anna

On Sat, Dec 16, 2017 at 9:21 AM, Paulo van Breugel
 wrote:
>
> Hi Anna and other GRASS GIS devs,
>
> I am trying to build a tangible landscape system at our school. I got most
> things installed, but I got stuck at installing the
> tangible-landscape-immersive-extension.
>
> The question is where to find the "immersive_extention.blend" &
> "immersive_extention.py" files (mentioned in step 5 and 7 in the README
> file.
>
> There is already the issue
> 'https://github.com/tangible-landscape/tangible-landscape-immersive-extension/issues/3'
> filed in August, but with no reply yet, so I am hoping you can provide some
> guidance.
>
> Best wishes,
>
> Paulo
>
>
> --
>
> Paulo van Breugel, PhD
>
> Lecturer Geo Data Analyst
>
> Geomedia & Design
>
> Tel: +31 (0)88-890 3218
>
>
>
> HAS University of Applied Sciences
>
> Onderwijsboulevard 221
>
> 5223 DE ‘s-Hertogenbosch
>
>
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev