[GRASS-user] Re-organizing Project

Glynn Clements glynn at gclements.plus.com
Tue Dec 22 19:56:08 EST 2009


Rich Shepard wrote:

>    Since I'm having all sorts of issues getting usable data in one place so I
> can start modeling, I should step back and reorganize what I'm doing. I've
> just picked up that mapsets can be used for different issues or themes as
> well as different users. This leads to several questions for which I don't
> find answers in the Book or Web site; they may be in there but I've missed
> them.
> 
>    For the current project, all data is in Oregon. All source data files have
> the same projection information, but each has different bounds. I'm thinking
> that I should put all source data in a single location, called 'Oregon.' The
> location's PERMANENT mapset, DEFAULT_WIND and PROJ_INFO will come from the
> state boundary outline (an .e00 file). That will be placed in the 'statebnd'
> mapset and should have the same WIND as the DEFAULT_WIND in PERMANENT.
> County outlines will be placed in the 'cntybnd' mapset which should have the
> same WIND, too.

There is no real advantage to using multiple locations with the same
projection unless they are used for entirely separate projects where
you will never (or, at least, rarely) need to use data in one location
from within a different location.

How to use mapsets is a judgement call. If the data is shared between
multiple users, each user needs their own mapset (you can only select
a mapset as the current mapset if you own the mapset directory). 
Similarly, if you want multiple concurrent sessions, each session
really needs a separate mapset so that sessions don't end up stomping
on each other's map and WIND files.

>    Then I use v.proj and r.proj to copy each vector map and the raster DEM
> map to their own mapsets within the Oregon location. The projection
> information should all the same, but each will have different WIND
> boundaries.

There's no reason to use *.proj when the source and destination
location are the same. You can just copy/rename maps between mapsets,
or you can just leave them where they are and use the map at mapset
syntax and/or the mapset search path (g.mapsets).

Note that PROJ_INFO and PROJ_UNITS contain metadata which describes
the location. These are normally set when a location is created and
never change thereafter.

OTOH, the WIND file may change frequently. This file contains part of
the "state" of a session. It allows commands to operate on a clipped
or resampled subset of the data without every command needing explicit
n=/s=/e=/w=/nsres=/ewres= parameters.

If you have several specific regions of interest, you can create named
regions with "g.region ... save=...", then subsequently select a named
region as the current region with "g.region region=...".

The DEFAULT_WIND file offers a convenient way to restore the current
region to cover the entire dataset, but it isn't any more than that,
and nothing actually requires data to fit within the bounds defined in
the DEFAULT_WIND file, nor is the current region constrained by it.

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


More information about the grass-user mailing list