[GRASS-dev] Re: terminology issues in grass7
Michael Barton
Michael.Barton at asu.edu
Tue Jun 16 12:50:17 EDT 2009
I understand your examples here. And GRASS layers can indeed appear to
function as CAD layers--as a way to control what gets displayed and
what doesn't (although it seems from the various test reported that
there is inconsistency in what happens if a cat for an object is null/
empty for a layer).
However, in a CAD drawing, a particular vector object exists IN only 1
layer. That is, the "layer" serves to identify a subset of objects; a
particular object cannot simultaneously exist in more than one layer.
In GRASS every vector object has ALL layers. Each "layer" is attached
to all objects, regardless of whether the cat value for a particular
object in a particular layer is null or has a value.
CAD
Layer 1 ____ ID 1
|___ ID 2
Layer 2 ____ ID 3
|___ ID 4
In CAD, displaying Layer 1 shows ID's 1 & 2; displaying Layer 2 shows
ID's 3 & 4. You cannot show ID 1 in Layer 2 unless you move it to
Layer 2, in which case it could no longer be displayed in Layer 1. You
can make a copy, of course, but then you have another object (ID 5).
GRASS
ID 1 ____ Layer 1: cat = 1
|___ Layer 2: cat = 1
ID 2 ____ Layer 1: cat = 1
|___ Layer 2: cat = 1
ID 3 ____ Layer 1: cat =
|___ Layer 2: cat = 2
ID 4 ____ Layer 1: cat =
|___ Layer 2: cat = 2
In GRASS, displaying Layer 1 will show all objects for some vector
topologies, and only ID 1 and 2 for other topologies. However, by
putting values into cat for Layer 1, you can also display ID's 3 & 4
for Layer 1. You can achieve the same effect by querying cat = 1 for
Layer 2. The difference is that sometimes empty cats are displayed and
sometimes they are not. To me this is kind of an automatic
(inadvertent even) query. Some of this is only semantics, but I think
we all agree that semantics can be important.
Many users writing to the lists seem baffled by GRASS layers. They are
complicated to explain whatever we name them. My opinion--completely
unsupported by any systematic data and only by anecdotal experience--
is that these would be more understandable to more users if we used a
term that emphasized the database nature of this feature rather than a
term that suggests that it is most similar to multiple geospatial data
layers combined into one file--the vector equivalent of a geotiff.
FWIW, each layer of a cake is baked separately and they are all put
together at the end, like different geospatial data layers (AKA maps
in GRASS). But the goodies (nuts, candies, etc) in one layer cannot
also be simultaneously in more than one layer. Each layer has to have
its own set of goodies (all the tastier). ;-)
Cheers
Michael
On Jun 16, 2009, at 6:58 AM, Moritz Lennert wrote:
> On 16/06/09 14:29, Markus GRASS wrote:
>> Moritz Lennert wrote:
>>> All features without any cat value display in all layers. As Paul
>>> mentioned, you have to explicitely use the cat= parameter to only
>>> display features with cat values in that layer. It is debatable
>>> whether there should be a flag to indicate "only show features with
>>> cat values in the chosen layer", or whether this should actually be
>>> the default with a flag indicating "also show features without cat
>>> values". I think the first would be more appropriate and would be a
>>> more convenient way than using cat=1-9999.
>> It seems that this behaviour depends on the feature types defined
>> with
>> type option. In a quick test with the spearfish dataset, boundaries
>> having no cats are always displayed by default, but if I select
>> layer=2
>> type=area instead of type=point,line,boundary,centroid,area,face, I
>> get
>> only the areas with a cat value in layer 2 and no boundaries, no
>> lines,
>> nothing else is displayed, and it is not necessary to use cat=1-9999.
>
> But how you deal with the situation I described, i.e. one boundary
> segment of the polygons has a cat value in layer 2 ? I.e.
>
> GRASS 6.5.svn (spearfish60):~ > v.category testlayers option=report
> Layer/table: 1/testlayers
> type count min max
> point 0 0 0
> line 0 0 0
> boundary 0 0 0
> centroid 2 1 2
> area 0 0 0
> all 2 1 2
> Layer: 2
> type count min max
> point 0 0 0
> line 0 0 0
> boundary 1 1 1
> centroid 0 0 0
> area 0 0 0
> all 1 1 1
>
> d.vect testlayers layer=1
> d.vect testlayers layer=2 type=boundary cat=1-9999 col=red width=3
>
> gives:
> http://geog-pc40.ulb.ac.be/grass/misc/testlayers1.png
>
> I need to declare either the boundary type (or no type at all) to see
> anything in layer 2, but then it shows all boundaries:
>
> http://geog-pc40.ulb.ac.be/grass/misc/testlayers2.png
>
> Moritz
More information about the grass-dev
mailing list