[GRASSLIST:6163] FW:

knut.langeland at nina.no knut.langeland at nina.no
Mon Mar 14 15:07:27 EST 2005


 

-----Original Message-----
From: Langeland, Knut 
Sent: 14. mars 2005 20:56
To: 'Glynn Clements'
Subject: RE: [GRASSLIST:6138] 

Thank you for the informative answer.
Actually I sort of figured out a somewhat similar approach myself in
6.0, using v.to.rast on the etopo2-model in the lat/long location,
v.proj to project to the utm and as we speak interpolating with
v.surf.idw on a MASK.
First I tried to convert the vector points to raster with v.to.rast
after projecting them, but it turned out to have a south-west directed
distortion of about one 10X10 km pixel. What I did no try is to use
v.to.rast on a grid with the approximate size of the original grid, and
then resample the grid to my 10X10 km grid. 
I'll try both solutions, and write a posting to the list with the
results.

Knut  

-----Original Message-----
From: Glynn Clements [mailto:glynn at gclements.plus.com]
Sent: 14. mars 2005 20:30
To: Langeland, Knut
Cc: GRASSLIST at baylor.edu
Subject: Re: [GRASSLIST:6138] 


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