Re: [GRASS-dev] libLAS in GRASS 7.4 for Mac

2018-02-20 Thread Michael Barton
Vaclav,

I've been tied up for awhile, but I just now followed up on the suggestion to 
open a request to include laslib-config with the laslib/lastools Anaconda 
package.

But I can see no way to do this. Not even a way to contact whoever is 
maintaining this package for Anaconda Cloud. The only link is back to the 
original site where the open source code can be downloaded.

Here is the link if you or anyone out there has a suggestion.
https://anaconda.org/conda-forge/lastools

Michael

C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu



On Feb 9, 2018, at 8:14 AM, Vaclav Petras 
mailto:wenzesl...@gmail.com>> wrote:

Moving libLAS+Mac+Anaconda discussion to the list.

On Fri, Feb 9, 2018 at 12:23 AM, Michael Barton 
mailto:michael.bar...@asu.edu>> wrote:

The Anaconda LAS package seems to have all the binary distribution files and 
libraries built by compiling LAS from source (i.e., those that I bundled 
previously)--EXCEPT for liblas-config.

That's what I'm saying. Open an issue (wherever appropriate) to fix libLAS 
Anaconda package. Perhaps all you need is a development version of this package 
if Anaconda packaging is similar to Linux packaging.

It would be nice if I could build GRASS with LAS support without the need for 
this file.

That seems like a workaround for an upstream issue as opposed to reporting the 
issue upstream as first step in fixing it. If libLAS is dropping liblas-config 
a way to get the libraries and headers or of if liblas-config usage in this 
context is not appropriate (which I can't tell), then yes, we should switch to 
specifying the libraries manually.


I've looked at liblas-config and can see what it does. But AFAICT, when running 
v.in.lidar or r.in.lidar, they are only really using the LAS libraries and 
binary tools las2txt and laszip.

liblas-config is needed for the compilation of things against libLAS, not for 
runtime. It's the same as with the C header files, you don't need them during 
runtime, but you need them for compilation.

So perhaps GRASS is not using any of the non-LAS linked libraries that 
laslib-config provides paths to (e.g., boost and gdal).

As far as I understand, they are needed for the compilation because libLAS 
needs them.

If GRASS actually needs all of the linked files that laslib-config provides, 
then we can't just use the binaries in the Anaconda LAS tools package.

libLAS uses Boost and (I think optionally) GDAL, so I would expect that to be 
part of the Anaconda package (or installed as a dependency).

The only recourse is to try to recompile it in an Anaconda environment and have 
it create an appropriate laslib-config. A serious pain.

I would not do that until you see what the upstream (Anaconda package) people 
say.

In the mean time, before the issue is resolved upstream, you can create the 
liblas-config, youself. It will look something like this:

if [ "$1" = "--libs" ]
then
echo -L/usr/lib -llas -llas_c -L... /usr/lib/x86_64-linux-gnu/libtiff.so
...

I'm attaching a full script, but you need to supply the values appropriate for 
Mac/your computer. Start with what you would put to the --with-liblas-libs=...

Unrelated to the Mac issue, I wonder if it is a probable that we are not making 
use of the --defines option in liblas-config (which gives "-DHAVE_GDAL=1 
-DHAVE_LIBGEOTIFF=1", but perhaps it is important only when compiling libLAS 
binary tools.


But if all GRASS really needs are the LAS binaries and libraries (liblas.dylib 
on the Mac), then maybe we can just point to the resources it needs.


Try the attached script to do that. For me GRASS configures successfully when I 
use it instead of liblas-config:

--with-liblas="/home/.../fake-liblas-config.sh"

Best,
Vaclav


Cheers
Michael

C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice:  480-965-6262 (SHESC), 
480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC),  
480-727-0709 (CSDC)
www: 
http://www.public.asu.edu/~cmbarton,
 
http://csdc.asu.edu

Re: [GRASS-dev] [GRASS GIS] #3500: starting French WinGRASS sometimes fails bc of localisation errors

2018-02-20 Thread GRASS GIS
#3500: starting French WinGRASS sometimes fails bc of localisation errors
--+-
  Reporter:  ychemin  |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  Default  |Version:  7.4.0
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MSWindows 8
--+-

Comment (by ychemin):

 It did happen on several PCs during the week, so my fair guess will be
 that the c:\Users\NameofUserIsFrenchWithFrenchAccent\

-- 
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] #3500: starting French WinGRASS sometimes fails bc of localisation errors

2018-02-20 Thread GRASS GIS
#3500: starting French WinGRASS sometimes fails bc of localisation errors
--+-
  Reporter:  ychemin  |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  Default  |Version:  7.4.0
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MSWindows 8
--+-

Comment (by marisn):

 Please provide your username and home folder.

 This error indicates on having non-ascii letters in some place GUI doesn't
 expect. My guess - your addons path.

-- 
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] Issue with double conditional in r.mapcalc (WinGRASS) and real life test of the aconda 7.5dev on Mac

2018-02-20 Thread Vaclav Petras
On Tue, Feb 20, 2018 at 6:16 AM, Yann Chemin 
wrote:

>
> We tried to use the command prompt to enter the scripts, but it made
> trouble so we tried on the wxGUI Console, and we found it worked mostly,
> until we started entering more complex if statements. But that was after we
> had to remove quotes to enter the r.mapcalc script successfully anyway.
>


If I may, here is what I think happened (based on our continuous experience
and Helmut having hard time reproducing it). You had troubles, you removed
quotes, perhaps also fixed the issue without knowing it. All was fine. Then
started to use expressions with && and || which were failing without
quotes. More complicated expressions like those with nested ifs were
failing too. Those were failing perhaps because there was forgotten space
here and there which can happen because they are long/complex and the
console in GUI is not in monospaced font* so spaces are quite narrow and
can blur with the surrounding characters.

* Which is probably a bug.

I'm sorry for the monospace and quotes bugs which were certainly not
helping you, but my current assessment is that these are only the two bugs
involved here. But of course we want r.mapcalc to be rock solid, so please
test & report more if you think it's needed.


>
> Would that be related to the issues with internationalisation (
> https://trac.osgeo.org/grass/ticket/3500)?
>

Anything is possible and our continuous successful use is with English
locale, but my guess is that that's not the case.

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

Re: [GRASS-dev] Issue with double conditional in r.mapcalc (WinGRASS) and real life test of the aconda 7.5dev on Mac

2018-02-20 Thread Vaclav Petras
On Tue, Feb 20, 2018 at 7:44 AM, Helmut Kudrnovsky  wrote:

> >*wxGUI console:
> >r.mapcalc expression=s_sl = if( rbstreams500@yann == 1, if(
> slope@PERMANENT
> ><= 5,  2, 5 ), 0 )
> >(Tue Feb 20 13:30:06 2018) Command finished (0 sec)
>
> I put quoted r.mapcalc term into the wxGUI; but it seems the quotes are
> stripped in the wxGUI output window. mmm
>

Right, I probably was not clear on what I said earlier. This is a known
bug, but maybe unreported.

Reusing commands needs additional care, but execution happens with quotes.
I think it's the history mechanism in GUI which is messing it up.
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Issue with double conditional in r.mapcalc (WinGRASS) and real life test of the aconda 7.5dev on Mac

2018-02-20 Thread Helmut Kudrnovsky
>*wxGUI console:
>r.mapcalc expression=s_sl = if( rbstreams500@yann == 1, if( slope@PERMANENT
><= 5,  2, 5 ), 0 )
>(Tue Feb 20 13:30:06 2018) Command finished (0 sec) 

I put quoted r.mapcalc term into the wxGUI; but it seems the quotes are
stripped in the wxGUI output window. mmm



-
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Issue with double conditional in r.mapcalc (WinGRASS) and real life test of the aconda 7.5dev on Mac

2018-02-20 Thread Helmut Kudrnovsky
>We had a mix of installations on Windows:
>1 - QGIS standalone with GRASS7.2.2. (GRASS could also be run standalone it
seems)
>2 - WinGRASS 7.4.0. mostly direct install, but maybe some from OSGEO4W too.
>3 - WinGRASS7.5svn nightly

there shouldn't be much difference in behaviour

>We tried to use the command prompt to enter the scripts, but it made
trouble so we tried on the wxGUI >Console, and we found it worked mostly,
until we started entering more complex if statements. But that >was after we
had to remove quotes to enter the r.mapcalc script successfully anyway.

tested here now with

GRASS version: 7.4.0
GRASS SVN revision: r72154  
Build date: 2018-01-27  
Build platform: x86_64-w64-mingw32 

and GRASS 7.5.svn dailys

r.mapcalc expression="s_sl = if( rbstreams500@yann == 1, if( slope@PERMANENT
<= 5,  2, 5 ), 0 )"

*winGRASS windows console
C:\>r.mapcalc expression="s_sl = if( rbstreams500@yann == 1, if(
slope@PERMANENT <= 5,  2, 5 ), 0 )"
 100%
 
*wxGUI console:
r.mapcalc expression=s_sl = if( rbstreams500@yann == 1, if( slope@PERMANENT
<= 5,  2, 5 ), 0 )
(Tue Feb 20 13:30:06 2018) Command finished (0 sec) 

both in winGRASS windows console and wxGUI console, the r.mapcalc with
double conditional works here.







-
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Issue with double conditional in r.mapcalc (WinGRASS) and real life test of the aconda 7.5dev on Mac

2018-02-20 Thread Yann Chemin
We had a mix of installations on Windows:
1 - QGIS standalone with GRASS7.2.2. (GRASS could also be run standalone it 
seems)
2 - WinGRASS 7.4.0. mostly direct install, but maybe some from OSGEO4W too.
3 - WinGRASS7.5svn nightly

Windows machines were many times not up to date, we even had some Windows7, but 
mostly Windows 8 and W10.

We tried to use the command prompt to enter the scripts, but it made trouble so 
we tried on the wxGUI Console, and we found it worked mostly, until we started 
entering more complex if statements. But that was after we had to remove quotes 
to enter the r.mapcalc script successfully anyway.

Would that be related to the issues with internationalisation 
(https://trac.osgeo.org/grass/ticket/3500 
)?

> On 18 Feb 2018, at 23:32, Helmut Kudrnovsky  wrote:
> 
>> I conducted a GRASS GIS course this week and we found some bugs on WinGRASS: 
> 
> the subject of this report is _(WinGRASS)_ and _aconda 7.5dev on Mac_ 
> 
> which winGRASS version have you used? 7.4.0? 7.5dev? another version?
> 
> 
> 
> -
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev

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

Re: [GRASS-dev] [GRASS GIS] #3500: starting French WinGRASS sometimes fails bc of localisation errors

2018-02-20 Thread GRASS GIS
#3500: starting French WinGRASS sometimes fails bc of localisation errors
--+-
  Reporter:  ychemin  |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  Default  |Version:  7.4.0
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MSWindows 8
--+-
Changes (by ychemin):

 * Attachment "système ordinateur.JPG" added.

 W10 machine specs screenshot

-- 
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] #3500: starting French WinGRASS sometimes fails bc of localisation errors

2018-02-20 Thread GRASS GIS
#3500: starting French WinGRASS sometimes fails bc of localisation errors
--+-
  Reporter:  ychemin  |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  Default  |Version:  7.4.0
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  MSWindows 8
--+-
Changes (by ychemin):

 * Attachment "Grass SIG 7.5 BUG.JPG" added.

 actual screenshot of the bug on aW10 machine

-- 
Ticket URL: 
GRASS GIS 

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

[GRASS-dev] [GRASS GIS] #3500: starting French WinGRASS sometimes fails bc of localisation errors

2018-02-20 Thread GRASS GIS
#3500: starting French WinGRASS sometimes fails bc of localisation errors
-+-
 Reporter:  ychemin  |  Owner:  grass-dev@…
 Type:  defect   | Status:  new
 Priority:  normal   |  Milestone:
Component:  Default  |Version:  7.4.0
 Keywords:   |CPU:  Unspecified
 Platform:  MSWindows 8  |
-+-
 When starting WinGRASS (7.4.0.) on French windows machine (variable,
 reported example is W10), sometimes it just stops when launching the
 terminal to initialise the start of GRASS (not reaching the wxGUI even)

  UNICODE Error: ascii codec cannot encode character u'\xe9' in position
 11, ordinal not in range(128).

-- 
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] Problems installing the r.pi suite using g.extension [was: Re: [GRASS-user] LSMetrics - addon development]

2018-02-20 Thread Moritz Lennert

On 17/02/18 08:42, Maris Nartiss wrote:

2018-02-16 17:56 GMT+02:00 Markus Metz :


the addons directory is supposed to hold executables and scripts, not
libraries. At least I could not find a mechanism in the grass startup script
where LD_LIBRARY_PATH is adjusted to also include some directory within the
addons directory. I am not sure if it is worth the trouble to modify the
addons mechanism to support addon libraries, particularly if only the r.pi
suite is affected.


Then what is the solution? Moving all library code to each module?


Would it be possible to force all functions in the library to be inline 
? Would that be a solution ?


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