[GRASS-user] [r.resample] null values for min and max range of data values

Hello,

Let me introduce myself: I'm french and new to the GRASS Universe
I'm really amazed by all its possibilities and hope I will have the
knowledge take the most of them..

I've got some problems with resampling an image.

Initially, I wanted to vectorize an image
After having imported it, I tried to thin it through the r.thin command.
But the image produced being too big, it caused errors on my computer.
To solve my problem, I decided to reduce my location resolution: res=2, then
that of my raster with r.resample...

The problem is that my resampled raster output is empty.
When typing r.info raster.resampled, I get:
r.info raster.resampled2

+----------------------------------------------------------------------------+
| Layer: raster.resampled Date: Tue Feb 16 15:10:35 2010
|
| Mapset: PERMANENT |
| Location: RGF93
|
| DataBase: D:\GRASS Database
|
| Title: ( raster )
|
| Timestamp: none
|

|----------------------------------------------------------------------------|
|
|
| Type of Map: raster Number of Categories: 0
|
| Data Type: CELL
|
| Rows: 500
|
| Columns: 500
|
| Total Cells: 250000
|
| Projection: Lambert Conformal Conic
|
| N: 6133000 S: 6132000 Res: 2
|
| E: 1235000 W: 1234000 Res: 2
|
| Range of data: min = NULL max = NULL
|
|
|
| Data Description:
|
| generated by r.in.gdal
|
|
|
| Comments:
|
| r.in.gdal input="C:/tests/GRASS/rasterToVect/BDP_08_1234_6134_010_L9\
|
| 3.tif" output="raster"
|
|
|

+----------------------------------------------------------------------------+
(Mon Feb 22 14:28:09 2010) Command finished (0 sec)

What is strange is the null range of data...

The r.info for my raster input, not resampled is:
r.info raster6133_2

+----------------------------------------------------------------------------+
| Layer: raster6133_2 Date: Fri Feb 19 16:35:13 2010
|
| Mapset: PERMANENT |
| Location: RGF93
|
| DataBase: D:\GRASS Database
|
| Title: ( raster6133_2 )
|
| Timestamp: none
|

|----------------------------------------------------------------------------|
|
|
| Type of Map: raster Number of Categories: 1
|
| Data Type: CELL
|
| Rows: 10000
|
| Columns: 10000
|
| Total Cells: 100000000
|
| Projection: Lambert Conformal Conic
|
| N: 6133000 S: 6132000 Res: 0.1
|
| E: 1235000 W: 1234000 Res: 0.1
|
| Range of data: min = 0 max = 1
|
|
|
| Data Description:
|
| generated by r.in.gdal
|
|
|
| Comments:
|
| r.in.gdal input="C:/tests/vectorisation/BDParcellaire/BDP_08_1234_61\
|
| 33_010_L93.tif" output="raster6133_2"
|
|
|

+----------------------------------------------------------------------------+

Why is the range of data null?
How to solve that problem?

Thanks in advance!

Mat'
--
View this message in context: http://n2.nabble.com/r-resample-null-values-for-min-and-max-range-of-data-values-tp4631171p4631171.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Thu, Feb 25, 2010 at 9:21 AM, baobazz <baobazz@hotmail.fr> wrote:

... (welcome!)...

Initially, I wanted to vectorize an image
After having imported it, I tried to thin it through the r.thin command.
But the image produced being too big, it caused errors on my computer.

What kind of error exactly? You seem to use Windows, which version
of GRASS?

To solve my problem, I decided to reduce my location resolution: res=2, then
that of my raster with r.resample...

The problem is that my resampled raster output is empty.
When typing r.info raster.resampled, I get:
r.info raster.resampled2

...

| Type of Map: raster Number of Categories: 0
| Data Type: CELL
| Rows: 500
| Columns: 500
| Total Cells: 250000
| Projection: Lambert Conformal Conic
| N: 6133000 S: 6132000 Res: 2
| E: 1235000 W: 1234000 Res: 2
| Range of data: min = NULL max = NULL

...

| r.in.gdal input="C:/tests/GRASS/rasterToVect/BDP_08_1234_6134_010_L9\
| 3.tif" output="raster"

...

What is strange is the null range of data...

Yes, no good.

The r.info for my raster input, not resampled is:
r.info raster6133_2

...

| Rows: 10000
| Columns: 10000
| Total Cells: 100000000

(same position)

| Range of data: min = 0 max = 1

One thing I don't understand: Why do you use r.in.gdal after
r.resample? Please outline the workflow to be better able to
help you.

Markus

Hi,

Thanks for your answer!

I didn't launch r.in.gdal after r.resample. It's just part of the raster
history info given by the r.info command.

Here is the complete workflow without the info commands. The goal is to
produce an image with a less precise resolution.
1)r.in.gdal input=C:/tests/GRASS/rasterToVect/BDP_08_1234_6134_010_L93.tif
output=raster6133_2
2)g.region res=2
3)r.resample input=raster6133_2 output=raster.resampled

-raster6133_2 with no null range of values
-raster.resampled with null range of values (:-(()

If you see why there are null range of values..

Thanks!

--
View this message in context: http://n2.nabble.com/r-resample-null-values-for-min-and-max-range-of-data-values-tp4631171p4660500.html
Sent from the Grass - Users mailing list archive at Nabble.com.