When I invoke grass using a location and PERMANENT map set, and try to
re-project a raster file to it, grass rejects the action because the map to
be transferred has greater boundaries than the target mapset.
The location was created with EPSG:6884
name: NAD83(CORS96) / Oregon North
ellps: grs80
proj: lcc
lat_0: 43.6666666666667
lon_0: -120.5
lat_1: 46
lat_2: 44.3333333333333
x_0: 2500000
y_0: 0
no_defs: defined
Starting grass in that location and the PERMANENT mapset I find this region:
g.region -p
projection: 99 (NAD83(CORS96) / Oregon North)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1
south: 0
west: 0
east: 1
nsres: 1
ewres: 1
rows: 1
cols: 1
cells: 1
What did I do incorrectly? And, how to I fix it so I can reproject the map
to the project's region?
TIA,
Rich
On 30/04/2023 21:47, Rich Shepard wrote:
When I invoke grass using a location and PERMANENT map set, and try to
re-project a raster file to it, grass rejects the action because the map to
be transferred has greater boundaries than the target mapset.
The location was created with EPSG:6884
name: NAD83(CORS96) / Oregon North
ellps: grs80
proj: lcc
lat_0: 43.6666666666667
lon_0: -120.5
lat_1: 46
lat_2: 44.3333333333333
x_0: 2500000
y_0: 0
no_defs: defined
Starting grass in that location and the PERMANENT mapset I find this region:
g.region -p
projection: 99 (NAD83(CORS96) / Oregon North)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1
south: 0
west: 0
east: 1
nsres: 1
ewres: 1
rows: 1
cols: 1
cells: 1
What you do is run the r.proj module with the '-g' flag. That gives you the region settings in the current mapset that would match the region of the input raster from the other mapset. Then you use those setting as input to g.region. So:
new_region=`r.proj -g location=<original_location> mapset=<original_mapset> input=<original_raster>`
g.region -ap $new_region
What did I do incorrectly? And, how to I fix it so I can reproject the map
to the project's region?
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
On Sun, 30 Apr 2023, Micha Silver wrote:
What you do is run the r.proj module with the '-g' flag. That gives you
the region settings in the current mapset that would match the region of
the input raster from the other mapset. Then you use those setting as
input to g.region. So:
new_region=`r.proj -g location=<original_location> mapset=<original_mapset> input=<original_raster>`
g.region -ap $new_region
Thanks again, Micha.
Much appreciated,
Rich
On Sun, 30 Apr 2023, Micha Silver wrote:
What you do is run the r.proj module with the '-g' flag. That gives you
the region settings in the current mapset that would match the region of
the input raster from the other mapset. Then you use those setting as
input to g.region. So:
new_region=`r.proj -g location=<original_location> mapset=<original_mapset> input=<original_raster>`
g.region -ap $new_region
Micha,
(Reformatted to fit the scrsen)
It's still not working:
GRASS NorthsideRock/PERMANENT:~ > NSR=`r.proj -g
loc=Dixie_Mountain_2010_LiDAR map=Northside_rock_2010_topo in=2010_DEM
out=2010_topo method=lanczos_f mem=2000 --o`
Input map <2010_DEM@Northside_rock_2010_topo> in location
<Dixie_Mountain_2010_LiDAR>:
Selected PROJ pipeline:
+proj=pipeline +step +inv +proj=utm +zone=10 +ellps=GRS80 +step +proj=lcc
+lat_0=43.6666666666667 +lon_0=-120.5 +lat_1=46 +lat_2=44.3333333333333
+x_0=2500000 +y_0=0 +ellps=GRS80
************************
GRASS NorthsideRock/PERMANENT:~ > g.region -ap NSR
ERROR: Region <NSR> not found
GRASS NorthsideRock/PERMANENT:~ > g.list type=raster
GRASS NorthsideRock/PERMANENT:~ >
Regards,
Rich
On Mon, 1 May 2023, Micha Silver wrote:
GRASS NorthsideRock/PERMANENT:~ > g.region -ap NSR
I guess you're missing the '$' to recognize NSR as a shell variable.
Micha,
I missed that. Mea culpa!
Thanks,
Rich