[GRASS-user] A question about raster map resolutions

   The LiDAR source location has x- and y-resolution of 3 feet
(international) and several thousand cells east-west and north-south.
g.region -p for this location displays:

projection: 99 (unnamed)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1286590.24500872
south: 1240510.24500872
west: 634966.76150938
east: 664972.76150938
nsres: 3
ewres: 3
rows: 15360
cols: 10002
cells: 153630720

   When in the project location g.region -p produces:

projection: 99 (NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl)
zone: 0
datum: nad83harn
ellipsoid: grs80
north: 588219.90693215
south: 536993.58817534
west: 7524575.13218961
east: 7561596.20977101
nsres: 2561.31593784
ewres: 1851.05387907
rows: 20
cols: 20
cells: 400

   I want to understand why the nsres is now 2561+ feet, the ewres now 1851+
feet, and the numbers of rows and columns has decreased so drastically.

Looking forward to learning,

Rich

Rich Shepard wrote

The LiDAR source location has x- and y-resolution of 3 feet
(international) and several thousand cells east-west and north-south.
g.region -p for this location displays:

projection: 99 (unnamed)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1286590.24500872
south: 1240510.24500872
west: 634966.76150938
east: 664972.76150938
nsres: 3
ewres: 3
rows: 15360
cols: 10002
cells: 153630720

   When in the project location g.region -p produces:

projection: 99 (NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl)
zone: 0
datum: nad83harn
ellipsoid: grs80
north: 588219.90693215
south: 536993.58817534
west: 7524575.13218961
east: 7561596.20977101
nsres: 2561.31593784
ewres: 1851.05387907
rows: 20
cols: 20
cells: 400

   I want to understand why the nsres is now 2561+ feet, the ewres now
1851+
feet, and the numbers of rows and columns has decreased so drastically.

Looking forward to learning,

Rich

_______________________________________________
grass-user mailing list

grass-user@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-user

https://grass.osgeo.org/grass73/manuals/g.region.html

you can set a location's resolution to whatever you want. all is in the
manual.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/A-question-about-raster-map-resolutions-tp5286992p5287009.html
Sent from the Grass - Users mailing list archive at Nabble.com.

The r.proj module has a flag to get the new resolution settings when reprojection data from one LOCATION to another. Before reprojecting the map from ** unknown (default: WGS84) ** to nad83harn, try r.proj -g. Then use those parameters to set the region in the new CRS/LOCATION. That will leave you with the same number of row and columns in the new projection. Then you’ll need to do r.proj again to get the raster reprojected with these new region settings.

···

On 21/09/2016 02:30, Rich Shepard wrote:

The LiDAR source location has x- and y-resolution of 3 feet
(international) and several thousand cells east-west and north-south.
g.region -p for this location displays:

projection: 99 (unnamed)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1286590.24500872
south: 1240510.24500872
west: 634966.76150938
east: 664972.76150938
nsres: 3
ewres: 3
rows: 15360
cols: 10002
cells: 153630720

When in the project location g.region -p produces:

projection: 99 (NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl)
zone: 0
datum: nad83harn
ellipsoid: grs80
north: 588219.90693215
south: 536993.58817534
west: 7524575.13218961
east: 7561596.20977101
nsres: 2561.31593784
ewres: 1851.05387907
rows: 20
cols: 20
cells: 400

I want to understand why the nsres is now 2561+ feet, the ewres now 1851+
feet, and the numbers of rows and columns has decreased so drastically.

Looking forward to learning,

Rich


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

-- 
Micha Silver
Arava Drainage Authority
+972-523-665918

Rich Shepard wrote

The LiDAR source location has x- and y-resolution of 3 feet
(international) and several thousand cells east-west and north-south.
g.region -p for this location displays:

projection: 99 (unnamed)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1286590.24500872
south: 1240510.24500872
west: 634966.76150938
east: 664972.76150938
nsres: 3
ewres: 3
rows: 15360
cols: 10002
cells: 153630720

   When in the project location g.region -p produces:

projection: 99 (NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl)
zone: 0
datum: nad83harn
ellipsoid: grs80
north: 588219.90693215
south: 536993.58817534
west: 7524575.13218961
east: 7561596.20977101
nsres: 2561.31593784
ewres: 1851.05387907
rows: 20
cols: 20
cells: 400

   I want to understand why the nsres is now 2561+ feet, the ewres now
1851+
feet, and the numbers of rows and columns has decreased so drastically.

Looking forward to learning,

Rich

_______________________________________________
grass-user mailing list

grass-user@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-user

If it is about raster reprojection, there are hints in the r.proj manual
about region settings before applying r.proj.

E.g.

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 with
g.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 with v.proj. Next the
region in the target location is set to the extent of the new vector map
with g.region along with the desired raster resolution (g.region -m can be
used in Latitude/Longitude locations to measure the geodetic length of a
pixel). r.proj is then run for the raster map the user wants to reproject.
In this case a little preparation goes a long way.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/A-question-about-raster-map-resolutions-tp5286992p5287020.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Rich Shepard wrote:

The LiDAR source location has x- and y-resolution of 3 feet
(international) and several thousand cells east-west and north-south.
g.region -p for this location displays:

projection: 99 (unnamed)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1286590.24500872
south: 1240510.24500872
west: 634966.76150938
east: 664972.76150938
nsres: 3
ewres: 3
rows: 15360
cols: 10002
cells: 153630720

   When in the project location g.region -p produces:

projection: 99 (NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl)
zone: 0
datum: nad83harn
ellipsoid: grs80
north: 588219.90693215
south: 536993.58817534
west: 7524575.13218961
east: 7561596.20977101
nsres: 2561.31593784
ewres: 1851.05387907
rows: 20
cols: 20
cells: 400

   I want to understand why the nsres is now 2561+ feet, the ewres now
1851+
feet, and the numbers of rows and columns has decreased so drastically.

Looking forward to learning,

Helmut Kudrnovsky:

If it is about raster reprojection, there are hints in the r.proj manual
about region settings before applying r.proj.

E.g.

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.

Some observation: `-g` prints out in shell style, suitable for
`eval`uating. The `eval` utility, for example, constructs a
command, from the given arguments (here, the ouput of `g.region -g`)
which is then executed by the shell. See for example
https://grasswiki.osgeo.org/wiki/Shell_scripting#Using_output_from_GRASS_modules_in_the_script.

A ready to copy-n-paste form is obtained via `-f` (this is a recent
addition by Moritz during the code sprint in Bonn).

Maybe the `-f` flag would be a useful addition to `r.proj` as well.

Nikos

After setting the region in that way you might check the
cell resolution with "g.region -p" then snap it to a regular grid with
g.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 with v.proj. Next the
region in the target location is set to the extent of the new vector map
with g.region along with the desired raster resolution (g.region -m can be
used in Latitude/Longitude locations to measure the geodetic length of a
pixel). r.proj is then run for the raster map the user wants to reproject.
In this case a little preparation goes a long way.

-----
best regards
Helmut
--

On 21/09/16 09:35, Nikos Alexandris wrote:

Rich Shepard wrote:

The LiDAR source location has x- and y-resolution of 3 feet
(international) and several thousand cells east-west and north-south.
g.region -p for this location displays:

projection: 99 (unnamed)
zone: 0
datum: ** unknown (default: WGS84) **
ellipsoid: grs80
north: 1286590.24500872
south: 1240510.24500872
west: 634966.76150938
east: 664972.76150938
nsres: 3
ewres: 3
rows: 15360
cols: 10002
cells: 153630720

   When in the project location g.region -p produces:

projection: 99 (NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl)
zone: 0
datum: nad83harn
ellipsoid: grs80
north: 588219.90693215
south: 536993.58817534
west: 7524575.13218961
east: 7561596.20977101
nsres: 2561.31593784
ewres: 1851.05387907
rows: 20
cols: 20
cells: 400

   I want to understand why the nsres is now 2561+ feet, the ewres now
1851+
feet, and the numbers of rows and columns has decreased so drastically.

Looking forward to learning,

Helmut Kudrnovsky:

If it is about raster reprojection, there are hints in the r.proj manual
about region settings before applying r.proj.

E.g.

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.

Some observation: `-g` prints out in shell style, suitable for
`eval`uating. The `eval` utility, for example, constructs a
command, from the given arguments (here, the ouput of `g.region -g`)
which is then executed by the shell. See for example
https://grasswiki.osgeo.org/wiki/Shell_scripting#Using_output_from_GRASS_modules_in_the_script.

A ready to copy-n-paste form is obtained via `-f` (this is a recent
addition by Moritz during the code sprint in Bonn).

Maybe the `-f` flag would be a useful addition to `r.proj` as well.

AFAIR, the -g flag in r.proj already outputs flat format.

Moritz

On Tue, 20 Sep 2016, Helmut Kudrnovsky wrote:

you can set a location's resolution to whatever you want. all is in the
manual.

Helmut,

   I've read the manual, several times. But it does not tell me why I see a
difference in the two regions by re-projecting the data from the source.

Thank you,

Rich

On Wed, 21 Sep 2016, Micha Silver wrote:

The r.proj module has a flag to get the new resolution settings when
reprojection data from one LOCATION to another. Before reprojecting the
map from ** unknown (default: WGS84) ** to nad83harn, try r.proj -g. Then
use those parameters to set the region in the new CRS/LOCATION. That will
leave you with the same number of row and columns in the new projection.
Then you'll need to do r.proj again to get the raster reprojected with
these new region settings.

Micha,

   Thank you. I did not recognize the value of coordinating resolutions when
re-projecting data. I'll back up and re-do all the data today.

Much appreciated,

Rich

On Tue, 20 Sep 2016, Helmut Kudrnovsky wrote:

If it is about raster reprojection, there are hints in the r.proj manual
about region settings before applying r.proj.

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 with g.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 with v.proj. Next
the region in the target location is set to the extent of the new vector
map with g.region along with the desired raster resolution (g.region -m
can be used in Latitude/Longitude locations to measure the geodetic length
of a pixel). r.proj is then run for the raster map the user wants to
reproject. In this case a little preparation goes a long way.

Helmut,

   Thank you very much. This expansion of Micha's explanation is really
valuable and I greatly appreciate it. I wasn't aware of this need and
process the last time (years ago) I had a need to reproject data. Source
data in recent projects were all in the same projection and appropriate to
the area studied.

Regards,

Rich

On Wed, 21 Sep 2016, Nikos Alexandris wrote:

Some observation: `-g` prints out in shell style, suitable for
`eval`uating. The `eval` utility, for example, constructs a command, from
the given arguments (here, the ouput of `g.region -g`) which is then
executed by the shell. See for example
https://grasswiki.osgeo.org/wiki/Shell_scripting#Using_output_from_GRASS_modules_in_the_script.

A ready to copy-n-paste form is obtained via `-f` (this is a recent
addition by Moritz during the code sprint in Bonn).

Maybe the `-f` flag would be a useful addition to `r.proj` as well.

Nikos,

   Thank you.

Rich

Rich Shepard wrote

On Tue, 20 Sep 2016, Helmut Kudrnovsky wrote:

If it is about raster reprojection, there are hints in the r.proj manual
about region settings before applying r.proj.

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 with g.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 with v.proj. Next
the region in the target location is set to the extent of the new vector
map with g.region along with the desired raster resolution (g.region -m
can be used in Latitude/Longitude locations to measure the geodetic
length
of a pixel). r.proj is then run for the raster map the user wants to
reproject. In this case a little preparation goes a long way.

Helmut,

   Thank you very much. This expansion of Micha's explanation is really
valuable and I greatly appreciate it. I wasn't aware of this need and
process the last time (years ago) I had a need to reproject data. Source
data in recent projects were all in the same projection and appropriate to
the area studied.

Regards,

Rich
_______________________________________________
grass-user mailing list

grass-user@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-user

It's copy /paste from the manual. So the manual is your best friend. :wink:

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/A-question-about-raster-map-resolutions-tp5286992p5287104.html
Sent from the Grass - Users mailing list archive at Nabble.com.