[GRASS5] line types

rgrmill at rt66.com rgrmill at rt66.com
Mon Apr 8 15:25:31 EDT 2002


Radim wrote:


> Lines can enclose areas? What do you mean? That grass type LINE can
> be area edge? No, it can't, areas are build only form AREA type.

Sorry then.  My misunderstanding.

> How do you want to remove distinction?. Replace all  "if (Line->type 
== 
> LINE)" by  "if (Line->type == LINE ||  Line->type == AREA )
> or merge  LINE and AREA types in the vector library?
> 
> I think that LINE/AREA distinction should be keept and boundary
> (area edge) option should be add to modules 'type' option.

In both of the cases that caused me problems the code tested for the 
line type and skipped the operation (either extracting or labelling) if 
the line was typed as an area edge.  v.llabel doesn't offer a separate 
option to label area edges.  v.extract doesn't extract area edges based 
on the category of the line, only on the category of the area the lines 
define.

In both cases it is sufficient to change the code to perform the 
operation regardless of whether the line is typed as an area edge or as 
a line.

as in
if (Line->type == POINT)
{
	skip the operation
}
else
{
	perform the operation
}

As for the general usefulness of the distinction...  I don't know how 
you can tell whether a line is an area edge or not when you import a 
vector file.  As a result, I type everything as an area edge.  I don't 
think it is reasonable to expect a user to manually identify which lines 
out of tens of thousands of possibilities might make an edge of one of 
thousands of different areas that may need to be defined.

Roger Miller





More information about the grass-dev mailing list