[GRASS-user] wxPython cannot find installed module

2023-04-28 Thread Rich Shepard

I started grass with the wxGUI. It loaded but the v.t. displayed this
message:

Launching  GUI in the background, please wait... GRASS
Oregon_North_State_Plane_ft/PERMANENT:
~ > wxnviz.py: This module requires the NumPy module, which could not be
imported. It probably is not installed (it's not part of the standard Python
distribution). See the Numeric Python site (http://numpy.scipy.org) for
information on downloading source or binaries.

Installed here: python3-numpy-1.22.3-x86_64-1_SBo

Is there a way to let wxnviz.py know that numpy is installed, or should I
just ignore it?

Rich



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


Re: [GRASS-user] Specify window size when grass invoked

2023-04-28 Thread Rich Shepard

On Fri, 28 Apr 2023, Micha Silver wrote:


On my system it's ~/.grass8/wx.json, a json formatted config file.


Micha,

Same here. I didn't use more characers, only .grass.

I think you should try to resize with the "handles" on the window corners. 
Then using the menu "Settings->Preferences" check the option "Save current

window layout as default", and click "Save".  That should keep the window
size for next time.


Will do. Thanks again,

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


Re: [GRASS-user] Specify window size when grass invoked

2023-04-28 Thread Micha Silver

  
  


On 28/04/2023 21:23, Rich Shepard
  wrote:

I'm
  running grass-8.x on a laptop with a 14" screen. Starting grass
  within a
  
  virtual terminal opens a GUI window that exceeds the monitor's
  width and
  
  height. Is there a place where I can define the window's geometry
  globally?
  
  
  I don't see a config file, such as ~/.grassrc.
  
  

On my system it's ~/.grass8/wx.json, a json formatted config
  file.


I think you should try to resize with the "handles" on the window
  corners. Then using the menu "Settings->Preferences" check the
  option "Save current window layout as default", and click "Save". 
  That should keep the window size for next time.



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

-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
  

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


[GRASS-user] Specify window size when grass invoked

2023-04-28 Thread Rich Shepard

I'm running grass-8.x on a laptop with a 14" screen. Starting grass within a
virtual terminal opens a GUI window that exceeds the monitor's width and
height. Is there a place where I can define the window's geometry globally?

I don't see a config file, such as ~/.grassrc.

TIA,

Rich

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


Re: [GRASS-user] GRASS GIS integration with python packages for interactive plotting

2023-04-28 Thread Anna Petrášová
On Fri, Apr 28, 2023 at 7:50 AM Nunzio Losacco 
wrote:

> Hi all,
>
> I wonder if it is possible to have GRASS GIS interact with some external
> python libraries for interactive plotting, e.g. bokeh.org. Use case:
> click on a point, get a popup window with a pre-defined interactive plot or
> a relevant dashboard.
>

You could run it in Jupyter Notebooks (see e.g. [1]), I have used
matplotlib with GRASS in notebooks before. The use case with clicking is
not there yet, but we intend to implement more interactivity in the future.
Alternatively, the GRASS GIS GUI is implemented in wxPython and wxPython
can be integrated with matplotlib, there are several tools (such as
g.gui.tplot) that already use that.

[1] https://github.com/ncsu-geoforall-lab/grass-gis-workshop-foss4g-2022

>
> Best,
>
> N
>
> ___
> 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] Shell scripts to define GISDATABASE, location, and mapset; import data

2023-04-28 Thread Rich Shepard

On Fri, 28 Apr 2023, Micha Silver wrote:


Here's your script with corrections


Micha,

Thanks very much. You've reminded me of what I've forgotten and taught me
things I didn't know. I'll now be quickly back up to speed with grass.

Best regards,

Rich

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


[GRASS-user] GRASS GIS integration with python packages for interactive plotting

2023-04-28 Thread Nunzio Losacco
Hi all,

I wonder if it is possible to have GRASS GIS interact with some external
python libraries for interactive plotting, e.g. bokeh.org. Use case: click
on a point, get a popup window with a pre-defined interactive plot or a
relevant dashboard.

Best,

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


Re: [GRASS-user] Shell scripts to define GISDATABASE, location, and mapset; import data

2023-04-28 Thread Micha Silver

Hi Rich:


On 28/04/2023 0:56, Rich Shepard wrote:
I write shell scripts to run modules for analyses, but have always 
used the
GUI to define locations and/or mapsets before importing data even with 
starting

grass with the -c option.

What I want to do now when importing project data is to have a script 
that

defines the location and mapset then imports the data.

I've read the startup program manual page
 several times today
without seeing how to specify the all three parameters to define a 
location
and mapset and immediately follow that with a data import command; is 
--exec

really necessary?


Here's your script with corrections


#!/usr/bin/bash
# set grass location for quarry boundary map
grass -c 
$HOME/projects/oregon/northside-rock/data/data/property/Tax_Lots.shp 
/data1/grassdata/quarry-name/permitted-boundary


# Import quarry boundary map

# Comments:

#     The 'output' parameter should be just a grass vector name, NOT a path.

#     Best to use underscore in map names, NOT '-'

#     And '--overwrite' == '--o'

v.import 
input=$HOME/projects/oregon/northside-rock/data/property/Tax_Lots.shp 
output=permitted_boundary --overwrite



One additional point that might make this easier: GRASS locations are 
typically defined by a coordinate reference system. If you work with 
data in only a few CRS, then you can consider to create a collections of 
locations, one for each CRS that you use. Then when you start a new 
project, open grass in the location that contains data in the CRS of the 
project, and create a new *mapset* just for that project. Then import 
into that mapset. This approach has two advantages: (1) - You don't need 
to be creating new locations all the time with possibly redundant CRS 
definitions. And (2) -  you most likely have some data that can be 
shared between projects. With one overall location defined by i.e. 
"NAD83(HARN) Oregon", then you can store in the PERMANENT mapset any 
dataset that might be shared among projects. And each mapset will be 
specific to one project.



Creating a new project specific mapset, within an existing location is 
done by:



# Start GRASS in existing location

grass /data/grassdata/some_location/PERMANENT


# create new mapset

g.mapset -c 


# Now import whatever data you need

v.import input=...


Best, Micha


An example file is attached. Please correct my format and I'll use 
this as a

template for all data imports.





TIA,

Rich

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


--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918

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