[GRASS-user] inner and outer buffer for a boundary

Hi,

I tried to create a bufferzone (inner and outer area) around an area boundary
using following steps (reproduced with spearfish quads data):

# change boundary to line
v.type input=quads output=quadsline type=boundary,line
# remove centroids from line map
v.edit map=quadsline type=centroid tool=delete cat=1-3

v.build quadsline
Erzeuge Topologie ...
3 primitives registriert
Building areas: 100%
0 Flächen erstellt
0 Inselflächen erstellt
Füge Inselflächen hinzu:
Füge Zentroide hinzu: 100%
Die Topologie wurde erstellt.
Anzahl von Knoten : 2
Anzahl von Primitives : 3
Anzahl von Punkten : 0
Anzahl von Linien : 3
Anzahl von Boundaries : 0
Anzahl von Zentroiden : 0
Anzahl von Flächen : 0
Anzahl von Inseln : 0

Now I tried to buffer the lines, but v.buffer does not recognise there are
lines (and not boundaries) available in the quadslines file:

v.buffer in=quadsline out=quadsbuffer buffer=1000
Toleranz in Karteneinheiten: 10
Lines buffers...
100%
Areas buffers...
Building parts of topology...
Erzeuge Topologie ...
0 primitives registriert
Die Topologie wurde erstellt.
Anzahl von Knoten : 0
Anzahl von Primitives : 0
Anzahl von Punkten : 0
Anzahl von Linien : 0
Anzahl von Boundaries : 0
Anzahl von Zentroiden : 0
Anzahl von Flächen : -
Anzahl von Inseln : -
[...]

Is this a bug or do I need another step, so v.buffer finds the existing lines
and buffers correctly? When I export the quadslines to a line shape and import
again, v.buffer works as expected.

v.out.ogr dsn=. in=quadsline olayer=quadsline type=line
v.in.ogr dsn=./quadsline.shp.shp out=quadshape
v.buffer in=quadshape out=quadshapebuffer buffer=1000

kind regards,
  Otto

On 05/11/08 13:46, Otto Dassau wrote:

Hi,

I tried to create a bufferzone (inner and outer area) around an area boundary
using following steps (reproduced with spearfish quads data):

# change boundary to line
v.type input=quads output=quadsline type=boundary,line
# remove centroids from line map
v.edit map=quadsline type=centroid tool=delete cat=1-3

v.build quadsline
Erzeuge Topologie ...
3 primitives registriert
Building areas: 100%
0 Flächen erstellt
0 Inselflächen erstellt
Füge Inselflächen hinzu:
Füge Zentroide hinzu: 100%
Die Topologie wurde erstellt.
Anzahl von Knoten : 2
Anzahl von Primitives : 3
Anzahl von Punkten : 0
Anzahl von Linien : 3
Anzahl von Boundaries : 0
Anzahl von Zentroiden : 0
Anzahl von Flächen : 0
Anzahl von Inseln : 0

Now I tried to buffer the lines, but v.buffer does not recognise there are
lines (and not boundaries) available in the quadslines file:

v.buffer in=quadsline out=quadsbuffer buffer=1000 Toleranz in Karteneinheiten: 10
Lines buffers...
100%
Areas buffers...
Building parts of topology...
Erzeuge Topologie ...
0 primitives registriert
Die Topologie wurde erstellt.
Anzahl von Knoten : 0
Anzahl von Primitives : 0
Anzahl von Punkten : 0
Anzahl von Linien : 0
Anzahl von Boundaries : 0
Anzahl von Zentroiden : 0
Anzahl von Flächen : -
Anzahl von Inseln : -
[...]

Is this a bug or do I need another step, so v.buffer finds the existing lines
and buffers correctly? When I export the quadslines to a line shape and import
again, v.buffer works as expected.

Sounds like the lines do not have category values associated to them (which is done automatically during import), so you probably need to run v.category, before running v.buffer.

Moritz

Hi Moritz,

On Wed, 05 Nov 2008 14:25:24 +0100
Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 05/11/08 13:46, Otto Dassau wrote:
> Hi,
>
> I tried to create a bufferzone (inner and outer area) around an area
> boundary
> using following steps (reproduced with spearfish quads data):
>
> # change boundary to line
> v.type input=quads output=quadsline type=boundary,line
> # remove centroids from line map
> v.edit map=quadsline type=centroid tool=delete cat=1-3
>
> v.build quadsline
> Erzeuge Topologie ...
> 3 primitives registriert
> Building areas: 100%
> 0 Flächen erstellt
> 0 Inselflächen erstellt
> Füge Inselflächen hinzu:
> Füge Zentroide hinzu: 100%
> Die Topologie wurde erstellt.
> Anzahl von Knoten : 2
> Anzahl von Primitives : 3
> Anzahl von Punkten : 0
> Anzahl von Linien : 3
> Anzahl von Boundaries : 0
> Anzahl von Zentroiden : 0
> Anzahl von Flächen : 0
> Anzahl von Inseln : 0
>
> Now I tried to buffer the lines, but v.buffer does not recognise there are
> lines (and not boundaries) available in the quadslines file:
>
> v.buffer in=quadsline out=quadsbuffer buffer=1000
> Toleranz in Karteneinheiten: 10
> Lines buffers...
> 100%
> Areas buffers...
> Building parts of topology...
> Erzeuge Topologie ...
> 0 primitives registriert
> Die Topologie wurde erstellt.
> Anzahl von Knoten : 0
> Anzahl von Primitives : 0
> Anzahl von Punkten : 0
> Anzahl von Linien : 0
> Anzahl von Boundaries : 0
> Anzahl von Zentroiden : 0
> Anzahl von Flächen : -
> Anzahl von Inseln : -
> [...]
>
> Is this a bug or do I need another step, so v.buffer finds the existing

lines

> and buffers correctly? When I export the quadslines to a line shape and

import

> again, v.buffer works as expected.

Sounds like the lines do not have category values associated to them
(which is done automatically during import), so you probably need to run
v.category, before running v.buffer.

yes, adding categories to the lines before v.buffer works..

thanks a lot
  Otto

Hi,

2008/11/5 Moritz Lennert <mlennert@club.worldonline.be>:

Sounds like the lines do not have category values associated to them (which
is done automatically during import), so you probably need to run
v.category, before running v.buffer.

is there any reason why v.buffer should ignore features without
category. At least warning should be printed out.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

On 05/11/08 14:46, Martin Landa wrote:

Hi,

2008/11/5 Moritz Lennert <mlennert@club.worldonline.be>:

Sounds like the lines do not have category values associated to them (which
is done automatically during import), so you probably need to run
v.category, before running v.buffer.

is there any reason why v.buffer should ignore features without
category. At least warning should be printed out.

Or a flag to only use the features with category values...

At least it is documented in the man page:

"v.buffer creates a buffer around features of given type, which have a category in the given layer."

And bufcol requires features with categories...

Moritz

Martin:

is there any reason why v.buffer should ignore features without
category. At least warning should be printed out.

It is a common feature across many vector modules. They often are written to
loop through features selected by cat numbers.

I do not say if this is good nor bad, just that it is.

Hamish