[GRASS-user] Re-organizing Project
Rich Shepard
rshepard at appl-ecosys.com
Tue Dec 22 20:02:02 EST 2009
On Tue, 22 Dec 2009, Michael Barton wrote:
> Maybe I can help with suggesting a work flow. To start with, I want to
> explain a couple features about regions and projecting. Some of this has
> been explained before, but maybe this can put it all in one place.
Michael,
Thank you. I actually understand most of this (other than multiple maps
for setting the largest region), but did not clearly express myself. The key
question for me is why it's not working as it should.
> There are various ways to set regions, but the most direct and reliable is
> to use g.region.
Without getting into my issues of reorganizing everything so it's in a
single location, with each map and/or issue a separate mapset, the largest
region should be the entire state. And, the state boundary map and counties
map _should_ have the same region even though the west boundary of the state
is doubled (from the .e00 import). I guess that's the effects of erosion by
the Pacific Ocean on the coast. It's not worth my time to clean that now.
All the vector maps can happily reproject into the collective location.
It's the raster DEM that's being recalcitrant.
> If RMapSrc is a raster map in the source location, r.proj will read the
> the cells of RMapSrc **that lie within the extents of the current region
> of the target location** and create a new map, RMapTgt, **at the
> resolution of the current region** whose cell values are calculated from a
> transformation function that maps information from a map in one projection
> into another.
Which suggests that I should have had no problems. The DEM coverage is for
the northwestern portion of the state; approximately from the top of the
Cascade Mountains on the east to the Pacific Ocean on the west, the Columbia
River on the north, and someplace about the southern end of the Willamette
Valley on that end. This source region is a sub-set of the target region
(the entire state), and any cells in the water can happily be ignored and
clipped off because I'm not doing bathymetry on this project.
The region of the raster source map is a subset of the target region.
That's why I don't understand why GRASS kept throwing errors at me.
> Workflow:
> -Start in the source location.
> 1. Set the region to match the map you want to reproject in the source location: g.region rast=RMapSrc.
That's the way I set the source region after importing the raster file.
> 2. Create VregionSrc as a rectangular vector area to match the extents of
> the region: v.in.region output=VregionSrc
I did this, too. It provides a box that is a subset of the target region.
> -Change to target location (quit GRASS and restart in target).
> 1. Reproject VregionSrc: v.proj input=VregionSrc location=SourceLocation
> mapset=SouceMapset output=VregionSrc
I _think_ this step worked for me. I'll have to do it over again to be
sure.
> 2. Set the current region in the target location to match the reprojected
> VregionSrc in the target region and set the resolution as desired:
> g.region vect=VregionSrc res=resolution.
I may not have done this.
> 3. Reproject RMapSrc, creating a new map in the target location at the
> desired resolution, with cells that match up with the cells of RMapSrc:
> r.proj input=RMapSrc location=SourceLocation mapset=SouceMapset
> output=NewReprojectedMap.
It's all quite different from when I worked with versions 4.1 through 4.3.
Heck, even the modules and steps in the 2nd edition of the GRASS book are
frequently no longer valid.
Thanks very much,
Rich
More information about the grass-user
mailing list