[GRASS-user] Clipping Raster Map
rshepard at appl-ecosys.com
Fri Jan 1 17:22:56 EST 2010
On Fri, 1 Jan 2010, Glynn Clements wrote:
> I doubt it. The most likely reason for a difference is if the current
> region has a much higher resolution than the display.
> Modules which read raster maps normally resample them to the current
> region. The display library then resamples the data to the display
That's what I thought, but apparently it's not working properly because
I'm not doint something correctly.
> IIRC, the GUI sets the current region resolution to match the display
> resolution. This will reduce the size of the intermediate data,
> eliminating redundant colour lookups.
When I copy the raster DEM from the source directory to the project
directory (much smaller bounds), and view the map in the GUI, I see the
whole map, not the portion only within the project bounds. I've not yet
figured out how to overlay the project bounds vector map on the raster map.
That's one reason why I want to load the map in the CLI monitor as quickly
as can in the GUI display window.
>> Running 'g.region -c map=dem vector=abernethy' did nothing.
> "map=" isn't a valid option for g.region. Maybe you mean r.region?
Yes, I meant r.region.
> r.region exists for one specific purpose: if you have imported a map and
> its bounds are incorrect (which is often the case if the file doesn't have
> associated georeferencing information), r.region can be used to set the
> correct bounds.
Oh. That's not explicit on the man page.
> You probably shouldn't be using r.region here. You need to either run
> it again to set the map's bounds to the correct values, or (safer)
> re-import the map.
I copy it from the base data directory to the project-specific directory
> No. If you want to use a sub-region of a raster map, change the current
> region with g.region, either using n=/s=/w=/e= to set specific
> coordinates, or rast=/vect= to use the bounds of some other map, or
> region= to use a saved region. Using rast= will change both the bounds and
> resolution; you can change the resolution separately with res=.
Well, the current region is set appropriately, but I see the entire DEM
map when I load it, not just the appropriate portion. More experimenting is
Happy new year, and thanks,
More information about the grass-user