[GRASS-user] Which EPSG code for location default?

2021-09-22 Thread Rich Shepard

Applying gdalsrsinfo to a shapefile's .prj produced these results:

PROJ.4 : +proj=utm +zone=10 +datum=NAD83 +units=m +vunits=m +no_defs

OGC WKT2:2018 :
COMPOUNDCRS["NAD83 / UTM zone 10N + NAVD88 height",
PROJCRS["NAD83 / UTM zone 10N",
BASEGEOGCRS["NAD83",
DATUM["North American Datum 1983",
ELLIPSOID["GRS 1980",6378137,298.257222101,
LENGTHUNIT["metre",1]],
ID["EPSG",6269]],
PRIMEM["Greenwich",0,
ANGLEUNIT["Degree",0.0174532925199433]]],
CONVERSION["UTM zone 10N",
METHOD["Transverse Mercator",
ID["EPSG",9807]],
PARAMETER["Latitude of natural origin",0,
ANGLEUNIT["Degree",0.0174532925199433],
ID["EPSG",8801]],
PARAMETER["Longitude of natural origin",-123,
ANGLEUNIT["Degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["Scale factor at natural origin",0.9996,
SCALEUNIT["unity",1],
ID["EPSG",8805]],
PARAMETER["False easting",50,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
LENGTHUNIT["metre",1],
ID["EPSG",8807]],
ID["EPSG",16010]],
CS[Cartesian,2],
AXIS["(E)",east,
ORDER[1],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["(N)",north,
ORDER[2],
LENGTHUNIT["metre",1,
ID["EPSG",9001,
VERTCRS["NAVD88 height",
VDATUM["North American Vertical Datum 1988"],
CS[vertical,1],
AXIS["gravity-related height (H)",up,
LENGTHUNIT["metre",1,
ID["EPSG",9001]

The data are the Columbia River and southern Washington state.

It's been a couple of decades since I last dug into proj and I'd appreciate
being pointed to a document that will teach me which of the several EPSG
codes above is the one to which I want to apply to PROJ_INFO in the
PERMANENT mapset.

TIA,

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


Re: [GRASS-user] Startup issue: defaults to one mapset [RESOLVED]

2021-09-22 Thread Rich Shepard

On Wed, 22 Sep 2021, Micha Silver wrote:


I don't think there is anything to fix:
At startup GRASS does not care about current working directory.


Micha,

I didn't think so.



micha@RMS:~$ cat ~/.grass7/rc


Ah! That's what I was looking for. I thought there was a ~/.grass, but the
directory is major version specific.

Thanks!

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


Re: [GRASS-user] Startup issue: defaults to one mapset [RESOLVED]

2021-09-22 Thread Micha Silver



On 9/22/21 8:57 PM, Rich Shepard wrote:

On Wed, 22 Sep 2021, Rich Shepard wrote:


Where do I look to find what's going on so I can fix it?




I don't think there is anything to fix:


At startup GRASS does not care about current working directory.

The default LOCATION/MAPSET is read from the ~/.grass7/rc file. Here on 
my system:


micha@RMS:~$ cat ~/.grass7/rc
GISDBASE: /home/micha/GIS/grass
LOCATION_NAME: ITM
MAPSET: Arava
GUI: wxpython
DEBUG: 0


If you want to start GRASS from some other LOCATION/MAPSET you just add 
the full path to the different MAPSET on the command line, as you showed 
below.



Never hurts to review:

https://grass.osgeo.org/grass78/manuals/grass7.html


especially:


   EXAMPLES

The following are some examples of how you could start GRASS

*grass78*
   Start GRASS using the default user interface. The user will be
   prompted to choose the appropriate location and mapset.
*grass78 --gui*
   Start GRASS using the graphical user interface. The user will be
   prompted to choose the appropriate location and mapset.
*grass78 --text*
   Start GRASS using the text-based user interface. Appropriate
   location and mapset must be set by environmental variables (see
   examples below) otherwise taken from the last GRASS session.
*grass78 --gtext*
   Start GRASS using the text-based user interface. The user will be
   prompted to choose the appropriate location and mapset.
*grass78 $HOME/grassdata/spearfish70/user1*



What I'm now doing to start grass from /data/grassdata is:
grass /data/grassdata//

It works.

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


Re: [GRASS-user] Startup issue: defaults to one mapset [RESOLVED]

2021-09-22 Thread Rich Shepard

On Wed, 22 Sep 2021, Rich Shepard wrote:


Where do I look to find what's going on so I can fix it?


What I'm now doing to start grass from /data/grassdata is:
grass /data/grassdata//

It works.

Rich

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


[GRASS-user] Startup issue: defaults to one mapset

2021-09-22 Thread Rich Shepard

Something broke here yesterday and I haven't found the fix so I need help.

My GISDBASE is /data/grassdata and it holds many locations. My current
project has a mapset titled lady_island_reaches. When I start grass from
either /data/grassdata/. /data/grassdata/, or any other
location it opens to that one mapset. Examples:

PWD: /data/grassdata/:
$ grass
GRASS /lady_island_reaches:grassdata >

PWD: /data/grassdata//:
GRASS lady_island_reaches: >

PWD: /data/grassdata/lon_lat/:
GRASS project_location/lady_island_reaches:lon_lat >

I know there should be a grassrc file somewhere but it's not showing up with
locate or find and I don't see it in /usr/local/grass80.

GRASS is stuck on the project location's one mapset. I want to start it from
the project location and despite the mapset being the last current one be
able to change mapsets.

Now, g.mapsets -p shows only lady_island_reaches and PERMANENT. However,
g.mapsets -l shows them all. When I change mapsets to, for example,
bathymetry then g.mapset -p shows only bathymetry and PERMANENT.

Where do I look to find what's going on so I can fix it?

TIA,

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


Re: [GRASS-user] Start grass, create new mapset

2021-09-22 Thread Rich Shepard

On Wed, 22 Sep 2021, Micha Silver wrote:


The best approach is to do it in two stages:

1. Create the Location (using an EPSG code or georeferenced file) . You
  can add the -e option to exit immediately
2. Then restart grass with -c again to create the mapset, with the full
  path.


+1

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


Re: [GRASS-user] Start grass, create new mapset

2021-09-22 Thread Micha Silver

Hi Moritz:


On 9/22/21 4:20 PM, Moritz Lennert wrote:


Le 22 septembre 2021 14:40:45 GMT+02:00, Rich Shepard 
 a écrit :

On Wed, 22 Sep 2021, Moritz Lennert wrote:

I also see that the description of the -c flag itself only speaks 
about locations, not mapsets. This should also be changed. Something 
in the direction of:


"-c
Creates new GRASS unprojected location in specified GISDBASE"
[no idea why it says 'unprojected' must be long-term legacy]



I think the reason here stems from the un-desirable case of creating a 
location without specifying any projection details (neither EPSG code 
nor a georeferenced file) then you'll get a more or less unusable 
Location. You will have to start manually to setup the Location's 
projection. What's more, I think that using the -c option to create a 
location and mapset in one go does not work. You will always get a 
Location with only the PERMANENT mapset:



grass -text -c EPSG:32632 /home/micha/GIS/grass/UTM33/micha

micha@RMS:Downloads$ g.mapsets -p
Accessible mapsets:
PERMANENT


(No mapset "micha")


The best approach is to do it in two stages:

1. Create the Location (using an EPSG code or georeferenced file) . You
   can add the -e option to exit immediately
2. Then restart grass with -c again to create the mapset, with the full
   path.



should become

"-c
Creates new GRASS location or mapset respectively in specified 
GISDBASE or location"

[if this is not too long]

Moritz




Regards,

Rich
___
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


--
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


Re: [GRASS-user] Start grass, create new mapset

2021-09-22 Thread Rich Shepard

On Wed, 22 Sep 2021, Moritz Lennert wrote:


That would be great !


Moritz,

I'll do that Real Soon Now (today or tomorrow).

In the 8.0dev manual's table of contents, the GRASS GIS startup manual link
results in a 404 (Page Not Found) error. Clicking on the 'edit this page'
link also produces an error. I'll see if I can get to the source on github
and fix it there. Making it visible on the web site is likely not within my
skill set.

Regards,

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


Re: [GRASS-user] Start grass, create new mapset

2021-09-22 Thread Moritz Lennert


Le 22 septembre 2021 14:40:45 GMT+02:00, Rich Shepard 
 a écrit :

On Wed, 22 Sep 2021, Moritz Lennert wrote:

IIUC, you do not want to create a new location, but just a new mapset 
?


Moritz,

That's correct.


If that is the case, just try with the -c flag to create it:
grass -c /data/grassdata/lon_lat/
Then import your data.


Thank you. I wondered if the -c (create) option would work for only a 
mapset

since all examples create a new location.

Should I add that example to the startup manual page for 8.0 dev?


That would be great !

I also see that the description of the -c flag itself only speaks about 
locations, not mapsets. This should also be changed. Something in the 
direction of:


"-c
Creates new GRASS unprojected location in specified GISDBASE"
[no idea why it says 'unprojected' must be long-term legacy]

should become

"-c
Creates new GRASS location or mapset respectively in specified GISDBASE 
or location"

[if this is not too long]

Moritz




Regards,

Rich
___
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] Start grass, create new mapset

2021-09-22 Thread Rich Shepard

On Wed, 22 Sep 2021, Moritz Lennert wrote:


IIUC, you do not want to create a new location, but just a new mapset ?


Moritz,

That's correct.


If that is the case, just try with the -c flag to create it:
grass -c /data/grassdata/lon_lat/
Then import your data.


Thank you. I wondered if the -c (create) option would work for only a mapset
since all examples create a new location.

Should I add that example to the startup manual page for 8.0 dev?

Regards,

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


Re: [GRASS-user] Start grass, create new mapset

2021-09-22 Thread Moritz Lennert
Hi Rich,

Le 21 septembre 2021 17:30:48 GMT+02:00, Rich Shepard 
 a écrit :
>I have an existing location, lon_lat, into which I import new data in that
>format.
>
>From the command line I want to start grass in text mode using that location
>while creating a new mapset there. On the grass startup manual page I see
>examples that create new locations or use shapefiles or tiff files for the
>mapsets. What do I use if the input data is ascii text points?
>
>I've tried grass /data/grassdata/lon_lat/ and am told that the
>mapset doesn't exist or have a WIND file.
>

IIUC, you do not want to create a new location, but just a new mapset ?

If that is the case, just try with the -c flag to create it:

grass -c /data/grassdata/lon_lat/

Then import your data.

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