Re: [GRASS-user] Using grass libraries in python outside of GRASS

2020-07-29 Thread DAmico, Ellen
Thank you that solved it with some tweaks.
I added GRASSBIN to my Environment variables populated with the grass bat file 
instead of GISBIN.  Then added 'lib', 'bin' and 'scripts' folders to PATH 
variable.  Once I did that that I was able to import grass_session and grass.
It appears to work fine without GISRC set.
Ellen


From: Sajid Pareeth 
Sent: Wednesday, July 29, 2020 8:10 AM
To: Markus Neteler 
Cc: DAmico, Ellen ; GRASS user list 

Subject: Re: [GRASS-user] Using grass libraries in python outside of GRASS

Hi

> > The model I need to use (which I did not write) requires python 2.7.
> > I had tried pip install previously but then it still fails with 
> > ImportError: No module named grass.script.
> > Do you know what could be causing that?

Interestingly, our docker containers just started to suffer from a
similar (same?) problem:

File "/scripts/test_grass_session.py", line 3, in 
import grass.script as grass
ModuleNotFoundError: No module named 'grass'

Weird, we need to investigate.

Grass_session works for me with both python2.7 and 3 in a Osgeo environment 
with grass 7.8.3
For me, the import modules work in this order in both python versions after pip 
installation.

>>> import grass_session
>>> from grass_session import Session
>>> import grass.script as grass

For the final script to work, you will have to set environment variables, 
GISBIN (grass78 root folder) , GISRC (.grassrc78 file in demo location) and add 
grass78 'lib', 'bin' and 'scripts' folders to PATH variable.
I run the script in python 3, where it worked without setting GISBIN and GISRC 
variables. I have only tested this approach in Windows 10 yet, and should work 
fine in Linux as well.

Regards

Sajid


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

Re: [GRASS-user] GRASS GIS Birthday Virtual Celebration

2020-07-29 Thread Vaclav Petras
See you in one hour. The link is:

https://ncsu.zoom.us/j/92325670198?pwd=QkNrWHpWSk5nNTJCRmlidXNCalJBdz09
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Using grass libraries in python outside of GRASS

2020-07-29 Thread DAmico, Ellen
Interesting.  I will await anything you find.   Thank you.  Ellen

-Original Message-
From: Markus Neteler  
Sent: Wednesday, July 29, 2020 4:01 AM
To: DAmico, Ellen 
Cc: GRASS user list 
Subject: Re: [GRASS-user] Using grass libraries in python outside of GRASS

On Tue, Jul 28, 2020 at 10:27 PM Markus Neteler  wrote:
> On Tue, Jul 28, 2020 at 9:17 PM DAmico, Ellen  wrote:
...
> > The model I need to use (which I did not write) requires python 2.7.
> > I had tried pip install previously but then it still fails with 
> > ImportError: No module named grass.script.
> > Do you know what could be causing that?

Interestingly, our docker containers just started to suffer from a similar 
(same?) problem:

File "/scripts/test_grass_session.py", line 3, in  import grass.script 
as grass
ModuleNotFoundError: No module named 'grass'

Weird, we need to investigate.

Markus

> Perhaps simply a PYTHONPATH issue?
> At the bottom of this page there are some examples:
>
> https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fzarch%2Fgrass-session%2Fblob%2Fmaster%2FREADME.rstdata=0
> 2%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C8
> 8b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601sdata
> =bPE1zELFkkj3HpVVopBH7a6nPpAdRK%2BdC2Tj1h4hdIs%3Dreserved=0
>
> Markus



--
Markus Neteler, PhD
https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mundialis.de%2Fdata=02%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601sdata=I6CFUA2PPoaFwdRImG24FuTsIUsOuqwtzxF%2Fy3nV0B8%3Dreserved=0
 - free data with free software
https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrass.osgeo.org%2Fdata=02%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601sdata=gnL1xIhAsTEfJznQqT%2BMUkVYBPXZArIMFvz5Y%2FeLM2U%3Dreserved=0
https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcourses.neteler.org%2Fblogdata=02%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601sdata=X6lnIHt7PAJEc2pO0mixaTNicoCBBcoTJdezpJ%2BfFTg%3Dreserved=0
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] [GRASS-dev] 37 years of GRASS GIS: celebrating with a new GRASS GIS website!

2020-07-29 Thread Martin Landa
Dear all,

ABSOLUTELY GREAT! Thanks to all who contributed! Martin

st 29. 7. 2020 v 16:04 odesílatel Markus Neteler  napsal:
>
> Wednesday, July 29, 2020
>
> The new GRASS GIS website is out!
>
> In occasion of its 37th birthday the GRASS GIS project is proud to present 
> its new website! The site has been redesigned with modern tools to be 
> responsive and also easier to maintain. Content is more discoverable now and 
> easy to browse too.
>
> What’s cool
>
> The Learn page offers a curated list of tutorials in different languages and 
> links to videos. The new Try online section provides links to Binder and 
> rollApp online applications that allow testing GRASS GIS without installing 
> it.
> Our long standing and rich history in the GIS and open source world is now 
> presented in a much more attractive layout. Have a look at the timeline of 
> releases and websites!
> The revamped gallery of screenshots shows some of GRASS GIS capabilities 
> through visual examples.
> Project resources easily reachable: mailing lists, wiki, RSS news feed, the 
> various GitHub and docker repositories.
>
> The technology
>
> We chose a static format based on HUGO and all the code and content is hosted 
> in a dedicated repo in GitHub. Nicolas Bozon designed the website theme and 
> many others helped with content curation and creation. In detail, the page 
> content is now written in markdown. Several times a day the website is 
> automatically deployed from the GitHub repository to our internet server at 
> https://grass.osgeo.org/ .
>
> What’s next
>
> With this new web technology and the availability of the code and content in 
> a public repository, we want to encourage and simplify community members’ 
> participation. If you want your GRASS GIS use cases, blog posts and cool 
> screenshots to be part of if, you only need to create a pull request. No 
> fear, we have a manual for contributions.
>
> We thank all the contributors for their input and help to see this project 
> finally realized! Special thanks to OSGeo as well as individuals for their 
> financial support.
>
> Stay tuned, there’s more yet to come!
>
> ___
> grass-dev mailing list
> grass-...@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev



-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] 37 years of GRASS GIS: celebrating with a new GRASS GIS website!

2020-07-29 Thread Markus Neteler
 Wednesday, July 29, 2020

[image: The new GRASS GIS website]
The new GRASS GIS website is out!

In occasion of its *37th birthday the GRASS GIS project* is proud to
present its *new website* ! The site has been
redesigned with modern tools to be responsive and also easier to maintain.
Content is more discoverable now and easy to browse too.
What’s cool

   - The *Learn*  page offers a curated list
   of tutorials in different languages and links to videos. The new Try
   online  section provides links
   to Binder and rollApp online applications that allow testing GRASS GIS
   without installing it.
   - Our long standing and *rich history*
    in the GIS and open source world
   is now presented in a much more attractive layout. Have a look at the
   timeline of *releases* 
   and *websites* !
   - The revamped *gallery of screenshots*
    shows some of GRASS GIS
   capabilities through visual examples.
   - Project resources easily reachable: mailing lists, wiki, RSS news
   feed, the various GitHub and docker repositories.

The technology

We chose a static format based on HUGO  and all the
code and content is hosted in a dedicated repo
 in GitHub. *Nicolas Bozon*
 designed the website theme and many others helped
with content curation and creation. In detail, the page content is now
written in markdown. Several times a day the website is automatically
deployed from the GitHub repository to our internet server at
https://grass.osgeo.org/ .
What’s next

With this new web technology and the availability of the code and content
in a public repository, we want to *encourage and simplify community
members’ participation*. If you want your GRASS GIS use cases, blog posts
and cool screenshots to be part of if, you only need to create a pull
request. No fear, we have a manual for contributions
.

We thank all the contributors for their input and help to see this project
finally realized! Special thanks to OSGeo  as well
as individuals  for their
financial support.

Stay tuned, there’s more yet to come!
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] adaptive gaussian filter

2020-07-29 Thread Maris Nartiss
Something like anisotropic diffusion described by Perona P. and Malik
J. 1990? https://en.wikipedia.org/wiki/Anisotropic_diffusion
I do have a working C module performing aforementioned noise reduction
(with optional Tukey's conductance function according to Black et al.
1998) but I haven't found time (and need) to clean it up + write
documentation to make it production ready. If you are working on a
publication where it would be useful, I'm in.

Māris.

Perona P. and Malik J. 1990. Scale-space and edge detection using
anisotropic diffusion. IEEE transactions on pattern analysis and
machine intelligence, 12(7).
Black M.J., Sapiro G., Marimont D.H. and Heeger D. 1998. Robust
anisotropic diffusion. IEEE transactions on image processing, 7(3).

trešd., 2020. g. 29. jūl., plkst. 14:22 — lietotājs Jachym Cepicky
() rakstīja:
>
> Hi all,
>
> I would like to ask, whether there is a code or extension, which would
> apply gaussian filtering on raster data, but with varying sigma value
> according to one of input raster maps?
>
> I would like to blur raster but differently on different regions (e.g.
> based on texture characteristics)
>
> Thank you
>
> Jachym
>
> --
> Jachym Cepicky
> e-mail: jachym.cepicky gmail com
> URL: http://les-ejk.cz
> GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Using grass libraries in python outside of GRASS

2020-07-29 Thread Sajid Pareeth
Hi


> > > The model I need to use (which I did not write) requires python 2.7.
> > > I had tried pip install previously but then it still fails with
> ImportError: No module named grass.script.
> > > Do you know what could be causing that?
>
> Interestingly, our docker containers just started to suffer from a
> similar (same?) problem:
>
> File "/scripts/test_grass_session.py", line 3, in 
> import grass.script as grass
> ModuleNotFoundError: No module named 'grass'
>
> Weird, we need to investigate.
>

Grass_session works for me with both python2.7 and 3 in a Osgeo environment
with grass 7.8.3
For me, the import modules work in this order in both python versions after
pip installation.


> *>>> import grass_session>>> from grass_session import Session*

*>>> import grass.script as grass*


For the final script to work, you will have to set environment variables,
GISBIN (grass78 root folder) , GISRC (.grassrc78 file in demo location) and
add grass78 'lib', 'bin' and 'scripts' folders to PATH variable.
I run the script in python 3, where it worked without setting GISBIN and
GISRC variables. I have only tested this approach in Windows 10 yet, and
should work fine in Linux as well.

Regards

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

[GRASS-user] adaptive gaussian filter

2020-07-29 Thread Jachym Cepicky
Hi all,

I would like to ask, whether there is a code or extension, which would
apply gaussian filtering on raster data, but with varying sigma value
according to one of input raster maps?

I would like to blur raster but differently on different regions (e.g.
based on texture characteristics)

Thank you

Jachym

-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Using grass libraries in python outside of GRASS

2020-07-29 Thread Markus Neteler
On Tue, Jul 28, 2020 at 10:27 PM Markus Neteler  wrote:
> On Tue, Jul 28, 2020 at 9:17 PM DAmico, Ellen  wrote:
...
> > The model I need to use (which I did not write) requires python 2.7.
> > I had tried pip install previously but then it still fails with 
> > ImportError: No module named grass.script.
> > Do you know what could be causing that?

Interestingly, our docker containers just started to suffer from a
similar (same?) problem:

File "/scripts/test_grass_session.py", line 3, in 
import grass.script as grass
ModuleNotFoundError: No module named 'grass'

Weird, we need to investigate.

Markus

> Perhaps simply a PYTHONPATH issue?
> At the bottom of this page there are some examples:
>
> https://github.com/zarch/grass-session/blob/master/README.rst
>
> Markus



-- 
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user