[GRASSLIST:2544] Moire effect in aspect map

I imported a DEM with r.in.gdal and derived aspect with r.slope.aspect (floating point). These raster maps have a slightly different resolution (27.28 m) than the default settings (30 m).
When I look at the aspect map, it looks ok on the screen and the printout as well. However, when I zoom in, I can detect a sort of moire effect (diagonal bands crossing the map). Interpolation didn't have any effects.
Any ideas how to avoid this?

Thanks in advance.

Christof

The data that I originally imported are from the U.S. Geological Survey. The input files are in the directory 'codem1nw', which contains the actual data 'w001001.adf', a file 'prj.adf' and some more files. The projection settings in 'prj.adf' correspond to my default settings:

g.region -pd

projection: 1 (UTM)
zone: 13
datum: nad27
ellipsoid: clark66
north: 4480020
south: 4380000
west: 235000
east: 340000
nsres: 30
ewres: 30
rows: 3334
cols: 3500

Import of the raster data (without overriding the default projections):
r.in.gdal in=codem1nw out=codem1nw.r
r.support -r codem1nw.r
r.slope.aspect el=codem1nw.r as=codem1nw.asp.r

r.info codem1nw.asp.r

Type of Map: raster Number of Categories: 360
Data Type: FCELL
Rows: 3668
Columns: 3850
Total Cells: 14121800
Projection: UTM (zone 13)
N: 4480029 S: 4379982 Res: 27.27562704
E: 340003 W: 234992 Res: 27.27558442

Note that there's a slightly different N-S resolution compared to the E-W resolution.

Import of the raster data (with overriding the default projections):
r.in.gdal -o in=codem1nw out=codem1nw2.r
r.support -r codem1nw2.r
r.slope.aspect el=codem1nw2.r as=codem1nw2.asp.r

r.info codem1nw2.asp.r
[Only the following values changed:]

N: 4480028.5797883 S: 4379982.28159183 Res: 27.27543571
E: 340002.76575265 W: 234992.33825635 Res: 27.27543571

There's a moire effect on both aspect maps. The region doesn't change, and when I zoom in, n, s, e, w are clean multiplies of resolution (= 30).

Did I miss some essential information (I'm new to GRASS...)?

Christof

On 10.02.2004, at 17:42, Hamish wrote:

I imported a DEM with r.in.gdal and derived aspect with r.slope.aspect
(floating point). These raster maps have a slightly different
resolution (27.28 m) than the default settings (30 m).
When I look at the aspect map, it looks ok on the screen and the
printout as well. However, when I zoom in, I can detect a sort of moire
effect (diagonal bands crossing the map). Interpolation didn't have any
effects.
Any ideas how to avoid this?

are you sure the region didn't change?

have a look at 'g.region -p' and make sure the n,s,e,w are clean multiples
of "res".

Hamish

well, the problem seems to be the data doesn't match the region info,
regardless of what "prj.adf" says.

Maybe 'gdalinfo' will give you a better idea of what the data details
are. It must be stored as rows and columns in the input file, all you
have to do is match that..

also, try 'r.in.gdal -e' and see if that does it.

Hamish

Sorry for bothering you again...

gdalinfo gives the same info for projection, zone, datum, and ellipsoid as my default settings.

Last part of the output of gdalinfo:

Origin = (131904.828978,4561132.087882)
Pixel Size = (27.27543571,-27.27543571)
Corner Coordinates:
Upper Left ( 131904.829, 4561132.088)
Lower Left ( 131904.829, 4317044.214)
Upper Right ( 416060.318, 4561132.088)
Lower Right ( 416060.318, 4317044.214)
Center ( 273982.574, 4439088.151)
Band 1 Block=256x4 Type=Float32, ColorInterp=Undefined
Min=1280.949 Max=4412.362
NoData Value=-3.40282e+38

This is consistent with the output of r.info when I import the DEM with the -o flag, i.e. when I override the projection to get quadratic grid cells:

Type of Map: raster
Number of Categories: 4412
Data Type: FCELL
Rows: 8948
Columns: 10417
Total Cells: 93211316
Projection: UTM (zone 13)
         N: 4561145.72559973 S: 4317085.1268369 Res: 27.27543571
         E: 416019.40508569 W: 131891.19125998 Res: 27.27543571
Range of data: min = 0.000000 max = 4412.000000

The only thing that is different in gdalinfo is:

Size is 10418, 8949

and the Min/Max values.

When importing the DEM, there is no error message such as 'Projection of dataset does not appear to match current location'.

Even when I create a new location with

r.in.gdal in=codem1nw out=codem1nw3.r location=newlocation3

I can still see the moire effect on the aspect map. Looks like an artifact to me.

Christof

On 10.02.2004, at 20:21, Hamish wrote:

well, the problem seems to be the data doesn't match the region info,
regardless of what "prj.adf" says.

Maybe 'gdalinfo' will give you a better idea of what the data details
are. It must be stored as rows and columns in the input file, all you
have to do is match that..

also, try 'r.in.gdal -e' and see if that does it.

Hamish