[GRASS-dev] Re: terminology issues in grass7

Michael Barton Michael.Barton at asu.edu
Mon Jun 15 16:55:07 EDT 2009


On Jun 15, 2009, at 12:54 PM, Paul Kelly wrote:

> On Mon, 15 Jun 2009, Michael Barton wrote:
>
>> GRASS vector layers are very different...and this is one of the  
>> problems with
>> calling them layers. GRASS vector "layers" are simply cat values  
>> assigned to
>> a single set of vector objects. A vector map of roads with layers 1  
>> and 2
>> displays the same vector objects (i.e., the roads) regardless of  
>> whether
>> layer 1 or layer 2 is chosen. The only difference between layer 1  
>> and 2 is
>> that the cat values assigned to each of the vector objects can  
>> differ between
>> "layer" 1 and 2.
>
> Please correct me if I'm wrong, but is it not possible for certain
> features to have cat values assigned only in certain layers, and for
> certain vector modules to only operate on features that have cat  
> values
> assigned to them?
>
> For example, if you had a vector map containing both roads and  
> buildings,
> and in layer 1 only the roads had categories assigned to them, and in
> layer 2 only the buildings had categories assigned to them: then if  
> with
> d.vect you selected to display only layer 2 and only features with
> categories, you would only see the buildings?

I just tested it on Spearfish roads. You can indeed leave some cats  
blank in a "layer", but all the vectors still display. Only the ones  
with cat numbers can be colored or have their width varied. The  
remainder are the default thin black. (Note that this must be done  
from the command line as something is broken in the wxPython interface  
so that you can only select layers -1 [all] and 1).

This is functionally similar to the database query for display--either  
by cat number or with an SQL where statement on a linked attribute  
table. Without using layers, you can in fact display the same vector  
map twice, once with part of its features queried and visible and  
again with another set of its featured and visible. This is a useful  
way to build a visualization. But it's not the same as having a group  
of vector objects superimposed on a different set of vector objects.  
It's only the same vector objects displayed twice in thematically  
different ways.

GRASS vector layers are not a way to store multiple sets of vector  
objects in the same file. They are simply cat fields attached to a  
single file of vector objects. Each of the cat fields can be queried,  
just like any attribute field, but this doesn't make it 2 or more  
independent sets of overlaid vector objects as is found in CAD files  
(or multiple rasters in GeoTiff files). They are versatile and useful  
for a variety of database activities--querying and keys to link  
attribute tables--but I still maintain that they are misnamed as  
layers in the most commonly used senses of the word within GIS, CAD,  
and digital imaging.

Michael

>
> If I've understood correctly, then it is not quite correct to state  
> that
> the same vector features will always be displayed no matter which  
> layer is
> selected - many modules only operate on features with cat values  
> assigned
> (or have an option to do so) and if some features only have cat values
> assigned in a certain layer then only those features will be  
> "visible" to
> the modules operating on them when that layer is selected. IMHO the
> "layer" analogy fits this concept quite well.
>
> Even less sure on this one, but I'd also suggest that it's a  
> deficiency of
> the OpenGIS simple features format that each layer in a Shapefile  
> has to
> have its own separate copy of the vector geometry - surely it would be
> more desirable to have shared geometry GRASS-style if it was  
> technically
> possible?
>
> Paul
>



More information about the grass-dev mailing list