[GRASS-dev] ascii export and import, large file problem

Glynn Clements glynn at gclements.plus.com
Thu Apr 12 23:26:21 EDT 2007


Gerald Nelson wrote:

> This is related to my earlier question (to which noone responded)
> about why the slope calculation can't take lat-long data and just
> figure out the slope from the z values.
> 
> The srtm elevation data comes in lat-long values in cells that are
> square. In order to get slope, which we need for a cost map, we
> project to a utm value in the center of the region we need (UTM37N). 
> Grass does this projection and generates rectangular pixels.

I'm not sure what you're using to perform the projection, but r.proj
uses the region settings which the user specifies. If you set a region
with rectangular pixels, you get rectangular pixels.

Admittedly, there isn't any automatic mechanism to adjust the region
bounds to get square pixels; you have to calculate the bounds
yourself. If you don't do this explicitly, you're likely to end up
with rectangular pixels.

[If you use "g.region res=...", GRASS will divide the region extents
by the resolution to get the number of rows and columns. These values
will then be rounded to the nearest integer, and the actual n-s and
e-w resolutions computed by dividing the extents by these integers.]

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




More information about the grass-dev mailing list