[GRASS5] line types
rgrmill at rt66.com
rgrmill at rt66.com
Mon Apr 8 12:07:46 EDT 2002
Folks,
GRASS "types" vector objects as lines, area edges and points. Is there
any useful purpose to distinguishing between lines and area edges? I
haven't tested recently, but I seem to recall that the topology has
nothing to do with that distinction; area edges don't necessarily make
areas, lines can enclose areas and v.support/v.build don't retype lines
based on the actual topology.
I ask because I tracked some problems back to the difference between
lines and area edges:
v.llabel (from pre2) does not label lines if they are "typed" as area
edges.
v.extract (current) does not extract area edges if you tell it to
extract lines, and when it does extract areas it does so based on the
attribute number of the enclosed area, not the attribute number of the
line itself.
Briefly, here's how the problems came up. I vectorized a small part of
a detailed city zoning map and typed all of the resulting lines as area
edges. I eventually need to export the map as a shape file and
v.out.shape only exports closed areas. I thought typing things as area
edges might help.
I drew an edge around the map and made sure that all of the lines were
closed. That gave me a clean and topologically complete vector map with
more than 13,000 lines. Then I used v.digit to categorize and label
different types of lines: the map border, lot lines and railroads. I
did not label the edges of public right of ways. That is a lot of lines
and I expected to label everything else then use v.llabel to label the
remaining streets and alleys.
v.llabel didn't work, because the lines were typed as area edges. I
found that I could avoid the problem with a very simple change to the
code and I made the change. That gave me all the labels I needed.
Finally, I wanted to use v.extract to extract the different types of
lines to get a multi-layered map. Mostly I wanted to separate the lot
lines from the streets, alleys and railroads. That didn't work; when
told to extract lines v.extract extracted nothing at all. When told to
extract areas of category #3 (lot lines) it extracted the lines that
defined the area that was categorized as #3. It extracted one lot when
I expected it to extract all of the lot lines.
Again, there was a very simple change in the code which I made and
v.extract got me the result I needed.
Generally it looks like the distinction between lines and area edges is
useless and that it causes more problems then it helps. Is it
reasonable to start removing that distinction from the GRASS modules?
Roger Miller
More information about the grass-dev
mailing list