[GRASSLIST:6161] Re:

Glynn Clements glynn at gclements.plus.com
Mon Mar 14 14:30:03 EST 2005


knut.langeland at nina.no wrote:

> So, my question is; what is happening in the projection prosess of the
> etopo-raster that is not happening to the vector?

Rasters are projected using the inverse projection function, while
vectors use the forward projection function. If one is not the exact
inverse of the other, then the two may not align exactly.

Looking at the PROJ source code for the transverse mercator projection
(PJ_tmerc.c), I see that the equations used for the ellipsoid case
include cubic polynomials. As the inverse transformation doesn't
calculate any cube roots, it can't be an exact inverse of the forward
calculation, only an approximation. The approximation may only be good
for the typical range of the projection (i.e. within 3 degrees of the
central meridian for UTM).

If you want to project a raster map using the forward projection, you
have to convert it to a site map (r.to.sites), project the site map
(s.proj), then convert the projected site map back to a raster map
(s.surf.rst). The preceding sentence assumes 5.0/5.4; the sites
functionality has been subsumed into the new vector functionality in
5.7/6.0.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list