[GRASSLIST:5892] Re: Question regarding r.proj
Morten Hulden
morten at ngb.se
Fri Mar 28 15:15:30 EST 2003
On Wed, 26 Mar 2003, Glynn Clements wrote:
> Victor Wren wrote:
>
> > > > Since output resolution can be
> > > > specified by r.proj, could I set the region resolution to be something like
> > > > 5000m before importing? (yah, yah, I know -- try it and see)
> > >
> > > Only the final resolution (set by the current region in the
> > > destination location or the resolution= option to r.proj) should
> > > matter. Import utilities import cell-for-cell (i.e. without any
> > > rescaling), and r.proj reads the source map cell-for-cell.
> >
> > In practice, this is almost true. I've experimented with it, and the
> > resolution is only correct IFF the resolution of the destination region is
> > the same as the source map. For chuckles, I set the resolution of my region
> > to ns-15m and ew-56m (it did not come out even when it recalculated to make
> > the intervals fit the bounds, of course, since I pulled the numbers out of a
> > hat). When I project a DEM10 nad27 raster into this less-than-perfect--nad83-
> > world, r.proj reports the source resolution as 10 ew and 10 ns, but the
> > destination resolution is 9.999863 ew and 10.003091 ns. If I reset the
> > region to be a nice, even 10x10 resolution, the destination resolution is
> > also 10x10. Bug?
>
> It looks like it.
should note here that setting the resolution with the command line option
resolution= is more or less obsolete. a better way of getting _exactly_
the resolution you want is to create a region within your location with
the desired resolution, make it the current region and then project into
that. (of course, you can't get anything better than, not even equal to,
the input map. a raster projection, contrary to a vector projection always
involves resampling)
another thing worth pointing out in this thread is that the only usable
interpolation method for DEM maps is 'nearest'. both bilinear and cubic
give severe distortions of coastlines, shape of lakes and other outlines
around flat surfaces.
Morten Hulden
More information about the grass-user
mailing list