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

Gerald Nelson gnelson at uiuc.edu
Fri Apr 13 08:18:55 EDT 2007


As an economist, I'm learning that a little GIS information can be a dangerous thing ;-)

I was under the impression that you automatically ended up with rectangular pixels if you projected square lat long pixels to say utm. Although I also noticed that arcgis doesn't do that.

Is there any way GRASS could be modified to force pixel dimensions to be the same in the output raster as in the input raster, at least as an option?

Thanks, Jerry
PS yes, we did use r.proj

---- Original message ----
>Date: Fri, 13 Apr 2007 04:26:21 +0100
>From: Glynn Clements <glynn at gclements.plus.com>  
>Subject: RE: [GRASS-dev] ascii export and import, large file problem  
>To: Gerald Nelson <gnelson at uiuc.edu>
>Cc: "'grass-dev'" <grass-dev at grass.itc.it>
>
>
>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>
Gerald Nelson
Professor, Dept. of Agricultural and Consumer Economics
University of Illinois, Urbana-Champaign
office: 217-333-6465 
cell: 217-390-7888
315 Mumford Hall
1301 W. Gregory
Urbana, IL 61801




More information about the grass-dev mailing list