Re: [GRASS-user] Searching EPSG database [RESOLVED]

2021-09-29 Thread Jeff McKenna

On 2021-09-29 8:21 p.m., Rich Shepard wrote:

On Wed, 29 Sep 2021, Rich Shepard wrote:

I registered with epsg.org but when I enter a state's name in the 
search box

and click the 'GO' button nothing changes; displayed is the entire list
starting with Aruba.


I used spatialreferences.org instead. When I enter a state's name in their
search box a list of all projection codes is presented.




Please note that spatialreferences.org is no longer maintained.  If you 
want a fancy search, use https://epsg.io   (but remember, epsg.org has 
the guaranteed search results in terms of searching the actual EPSG 
database source - see my previous message on this)


-jeff


--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Searching EPSG database [RESOLVED]

2021-09-29 Thread Rich Shepard

On Wed, 29 Sep 2021, Rich Shepard wrote:


I registered with epsg.org but when I enter a state's name in the search box
and click the 'GO' button nothing changes; displayed is the entire list
starting with Aruba.


I used spatialreferences.org instead. When I enter a state's name in their
search box a list of all projection codes is presented.

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


[GRASS-user] Searching EPSG database

2021-09-29 Thread Rich Shepard

I registered with epsg.org but when I enter a state's name in the search box
and click the 'GO' button nothing changes; displayed is the entire list
starting with Aruba.

To get all EPSG codes for a state, e.g., Washington, how should I enter the
search request?

TIA,

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


Re: [GRASS-user] GRASS 8.0.dev not reading .shp file [UPDATE]

2021-09-29 Thread Rich Shepard

On Wed, 29 Sep 2021, Rich Shepard wrote:


I created a new location using the .prj file for cross-section contour lines
and successfully input CL_33_LDYX_20210712_CS_contour_lines.shp. When I
tried to input the sounding points file 
(CL_33_LDYX_20210712_CS_sounding_points.shp)

GRASS responded:
ERROR: Unable to open data source



However, within GRASS running in a virtual console I can cd to that
directory and ask GRASS to display the contents of that file. The shell says
that it's a binary file and should it be opened anyway? I answer, 'yes', and
it opens the file for viewing.

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


[GRASS-user] Create location fails in docker

2021-09-29 Thread Margherita Di Leo
Hi,

I need to run GRASS in a docker image but I have issues apparently about
permissions.

My docker image is built on a dockerfile:


FROM ubuntu:20.04

ENV DEBIAN_FRONTEND noninteractive

ENV DATA_DIR /data

RUN apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
libblas-dev \
libbz2-dev \
libcairo2-dev \
libfftw3-dev \
libfreetype6-dev \
libgdal-dev \
libgeos-dev \
libglu1-mesa-dev \
libgsl0-dev \
libjpeg-dev \
liblapack-dev \
libncurses5-dev \
libnetcdf-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpdal-dev pdal \
libpdal-plugin-python \
libpng-dev \
libpq-dev \
libproj-dev \
libreadline-dev \
libsqlite3-dev \
libtiff-dev \
libxmu-dev \
libzstd-dev \
bison \
flex \
g++ \
gettext \
gdal-bin \
grass \
grass-core \
grass-dev \
libfftw3-bin \
make \
ncurses-bin \
netcdf-bin \
proj-bin \
proj-data \
python3 \
python3-dev \
python3-geopandas \
python3-numpy \
python3-pandas \
python3-pil \
python3-ply \
python3-six \
sqlite3 \
subversion \
unixodbc-dev \
zlib1g-dev \
&& apt-get autoremove \
&& apt-get clean && \
mkdir -p $DATA_DIR

ENV SHELL /bin/bash

# permissions
RUN chmod -R a+rwx $DATA_DIR

# create user
RUN useradd -m -U digitranscope

VOLUME $DATA_DIR
WORKDIR $DATA_DIR

# switch user
USER digitranscope

CMD ["grass", "--version"]



Then, from a bash script I try to create a location and exit, but it seems
to fail on this:

grass --text -c EPSG:4326 $GRASSDATA\/france -e

The error message:

Traceback (most recent call last):
  File "/usr/bin/grass", line 390, in get_grass_config_dir
os.mkdir(directory)
PermissionError: [Errno 13] Permission denied: '/.grass7'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/grass", line 2218, in 
main()
  File "/usr/bin/grass", line 2001, in main
grass_config_dir = get_grass_config_dir()
  File "/usr/bin/grass", line 395, in get_grass_config_dir
_("Failed to create configuration directory '%s' with error: %s")
NameError: name '_' is not defined
Traceback (most recent call last):
  File "/usr/bin/grass", line 390, in get_grass_config_dir
os.mkdir(directory)
PermissionError: [Errno 13] Permission denied: '/.grass7'

What could be the problem?

Thanks in advance

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


[GRASS-user] GRASS 8.0.dev not reading .shp file

2021-09-29 Thread Rich Shepard

I created a new location using the .prj file for cross-section contour lines
and successfully input CL_33_LDYX_20210712_CS_contour_lines.shp. When I
tried to input the sounding points file 
(CL_33_LDYX_20210712_CS_sounding_points.shp)
GRASS responded:
ERROR: Unable to open data source


The sounding points .shp file is an ESRI Shapefile version 1000 length 19168 
type
PointZ and 38336 bytes in lengh.

What might cause GRASS to read one .shp file in a directory but not another
.shp file in the same directory?

I am seeing this 'unable to read file' error frequently these past few days.

TIA,

Rich


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


[GRASS-user] Elevation/bathymetry raster maps

2021-09-29 Thread Rich Shepard

Looking at the raster and raster addon modules I don't see one that will
allow more elevation/depth 'slices' for a given range. r.resample appears to
reduce the 'slices'; can it be used to also increase the number?

A related question is how GRASS sets the 'slice' range for assignment to a
color in the spectrum (elevation and water in these cases).

Specifically, I have a raster map with a range of depth/elevation altitudes
from -32.55505 to 595.1976 feet. Can I determine the number of 'slices'
within that range and use the water colors from minimum to zero and the
elevation colors from 1 to maximum? I want to display higher resolution in
the depths and the adjacent terrestrial elevations with a greater range of
colors to better communicate the channel and immediate river bank topology.

TIA,

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


Re: [GRASS-user] r.input and d.rast issues

2021-09-29 Thread Rich Shepard

On Wed, 29 Sep 2021, Micha Silver wrote:

Micha,


1. You reprojected the `local_depth` raster from the topography location
to new_nevins_dock, but without setting the target mapset in advance. So
the resulting local_depth had NULL values everywhere. Regarding projecting
with r.proj, note this comment in the man page:


The 'local_depth' map is in the bathymetry mapset and I set the target
region to it for all reprojections.


What does:

gdalinfo 
~/projects/washington/nevins-dock/data/topography/columbia_2010_e_dtm_35.tif 
| grep -A4 "Coordinates"


show??


It shows corners in US-feet so I cannot compare them to the corners of the
region which are in meters.

I've not before had such issues importing and reprojecting raster data.
Rather than continuing to try to push water uphill I've decided on an
alternate way of presenting the bathymetric information in the reports.

Thanks again,

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


Re: [GRASS-user] r.input and d.rast issues

2021-09-29 Thread Micha Silver


On 9/29/21 12:13 AM, Rich Shepard wrote:
Since r.in.gdal followed by r.proj are not working for me, despite 
success
with the rastertest location I applied Carlos' suggestion to use 
r.import.


Starting GRASS from /data/grassdata/project/topography/ I applied 
r.import

to the rastertest map, columbia_2010_e_dtm_35.tif with this result:
r.import 
in=~/projects/washington/nevins-dock/data/topography/columbia_2010_e_dtm_35.tif 
mem=6000 out=dtm35 resamp=lanczos_f ext=region resolution=region --o

Building topology for vector map
...
Registering primitives...
Building areas...
 100%
Attaching islands...
 100%
Attaching centroids...
 100%
Selected PROJ pipeline:
+proj=pipeline +step +inv +proj=lcc +lat_0=45.3 +lon_0=-120.5
+lat_1=47.3 +lat_2=45.8 +x_0=50 +y_0=0
+ellps=GRS80 +step +proj=lcc +lat_0=45.3 +lon_0=-120.5
+lat_1=45.8 +lat_2=47.3 +x_0=50 +y_0=0
+ellps=GRS80 +step +proj=unitconvert +xy_in=m +xy_out=us-ft

Reprojecting primitives ...
Building topology for vector map
...
Registering primitives...
Building areas...
 100%
Attaching islands...
 100%
Attaching centroids...
 100%
ERROR: Input raster does not overlap current computational region. 
Nothing

   to import.
ERROR: Unable to import GDAL dataset


I interpreted the manual page explanation of region to shift the 
output to

that region. Do I need to set the current region to the region of the map
I'm importing? How do I learn this before I import the .tif?

I set the region to the raster map, local_depth:
r.info map=local_depth
 ++ 

 | Map:  local_depth    Date: Fri Sep 24 15:49:01 
2021    |
 | Mapset:   topography Login of Creator: 
rshepard    |
 | Location: 
new_nevins_dock  |
 | DataBase: 
/data/grassdata  |

 | Title: |
 | Timestamp: 
none    |
 || 


 | |
 |   Type of Map:  raster   Number of Categories: 
0   |
 |   Data Type:    FCELL    Band reference: 
(none)    |

 |   Rows: 15265  |
 |   Columns: 
10768  |
 |   Total Cells: 
164373520  |
 |    Projection: NAD83(HARN) / Washington 
South  |
 |    N: 106729    S:  60934   Res: 
3 |
 |    E:    1544180    W:    1511876   Res: 
3 |
 |   Range of data:    min = NULL  max = 
NULL |

 | |
 |   Data Description: |
 |    generated by 
r.proj |

 | |
 | Comments: |
 |    r.proj -n location="project/ mapset="bathymetry" 
input="local_de\   |
 |    pth" method="nearest" 
memory=300    |

 | |
 ++ 



but when I try to display it now GRASS tells me it cannot find the map to
display:
d.rast map=local_depth
python3: can't open file 
'/data/grassdata/project/bathymetry/.tmp/salmo/MONITORS/wx0/render.py': 
[Errno 2] No such file or directory


What might be going on here?



I think there are two things going on here:


1. You reprojected the `local_depth` raster from the topography location 
to new_nevins_dock, but without setting the target mapset in advance. So 
the resulting local_depth had NULL values everywhere. Regarding 
projecting with r.proj, note this comment in the man page:



/"To avoid excessive time consumption when reprojecting a map the region 
and resolution of the target location should be set appropriately 
beforehand./


/A simple way to do this is to check the projected bounds of the input 
map in the current location's projection using the*-p*flag. 
The*-g*flag reports the same thing, but in a form which can be 
directly cut and pasted into a//g.region 
command. After 
setting the region in that way you might check the cell resolution with 
"g.region -p" then snap it to a regular grid withg.region 
's*-a*flag. 
E.g.g.region -a res=5 -p. Note that this is just a rough guide./


/A more involved, but more accurate, way to do this is to generate a 
vector "box" map of the region in the source location using//v.in.region 
-d . This 
"box" map is then reprojected into the target location withv.proj 
. Next the region