[GRASS-user] [GRASSLIST:1175] add centroids automatically to area boundaries

Dear list,

I am trying to solve the impossible it seems. I have the following
problem:

I have a patched vector map with lines. These lines should be converted
into area boundaries in order to receive areas. Once boundaries are
retrieved I still need to attach centroids to them in order to overlay
with *another* vector map which already consists of boundaries and areas
including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

Ulrich

On Thu, Aug 10, 2006 at 03:04:05PM +0200, Ulrich Leopold wrote:

Dear list,

I am trying to solve the impossible it seems. I have the following
problem:

I have a patched vector map with lines. These lines should be converted
into area boundaries in order to receive areas. Once boundaries are
retrieved I still need to attach centroids to them in order to overlay
with *another* vector map which already consists of boundaries and areas
including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

Hi,

see v.category for this. I have added a micro FAQ for this:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

hope this helps,

Markus

On Thu, August 10, 2006 15:21, Markus Neteler wrote:

On Thu, Aug 10, 2006 at 03:04:05PM +0200, Ulrich Leopold wrote:

Dear list,

I am trying to solve the impossible it seems. I have the following
problem:

I have a patched vector map with lines. These lines should be converted
into area boundaries in order to receive areas. Once boundaries are
retrieved I still need to attach centroids to them in order to overlay
with *another* vector map which already consists of boundaries and areas
including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

Hi,

see v.category for this. I have added a micro FAQ for this:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

I tried that already but it did not work. It even changes the polygons back to
single lines. But good that you opened a micro FAQ to add the solution later.
Any other ideas?

Ulrich

On Thu, August 10, 2006 15:33, Ulrich Leopold wrote:

I have a patched vector map with lines. These lines should be converted
into area boundaries in order to receive areas. Once boundaries are
retrieved I still need to attach centroids to them in order to overlay
with *another* vector map which already consists of boundaries and
areas
including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

Hi,

see v.category for this. I have added a micro FAQ for this:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

I tried that already but it did not work. It even changes the polygons
back to
single lines. But good that you opened a micro FAQ to add the solution
later.
Any other ideas?

Are you sure your lines are closed, thus defining real areas ? You can
check with v.digit.

Moritz

isn’t v.clean using input lines, output polygons, applicable here? should take lines and build for polygons and add centroids? or am i missing something…

On 8/10/06, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On Thu, August 10, 2006 15:33, Ulrich Leopold wrote:

I have a patched vector map with lines. These lines should be converted
into area boundaries in order to receive areas. Once boundaries are
retrieved I still need to attach centroids to them in order to overlay
with another vector map which already consists of boundaries and
areas
including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

Hi,

see v.category for this. I have added a micro FAQ for this:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

I tried that already but it did not work. It even changes the polygons
back to
single lines. But good that you opened a micro FAQ to add the solution
later.
Any other ideas?

Are you sure your lines are closed, thus defining real areas ? You can
check with v.digit.

Moritz


grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

On Thu, August 10, 2006 15:48, Moritz Lennert wrote:

On Thu, August 10, 2006 15:33, Ulrich Leopold wrote:

I have a patched vector map with lines. These lines should be converted
into area boundaries in order to receive areas. Once boundaries are
retrieved I still need to attach centroids to them in order to overlay
with *another* vector map which already consists of boundaries and
areas
including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

Hi,

see v.category for this. I have added a micro FAQ for this:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

I tried that already but it did not work. It even changes the polygons
back to
single lines. But good that you opened a micro FAQ to add the solution
later.
Any other ideas?

Are you sure your lines are closed, thus defining real areas ? You can
check with v.digit.

I put a screenshot on the WiKi page:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

The lines seem to be closed. But a lot of boundaries are without areas as you
can see from the legend on the right hand side.

And v.clean does not do the job. I used v.type to convert from lines to
boundaries.

So possibly that the problem are boundaries with no areas? But then how can I
change that?

Ulrich Leopold wrote:

On Thu, August 10, 2006 15:48, Moritz Lennert wrote:

On Thu, August 10, 2006 15:33, Ulrich Leopold wrote:

I have a patched vector map with lines. These lines should be converted
into area boundaries in order to receive areas. Once boundaries are
retrieved I still need to attach centroids to them in order to overlay
with *another* vector map which already consists of boundaries and
areas
including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

Hi,

see v.category for this. I have added a micro FAQ for this:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

I tried that already but it did not work. It even changes the polygons
back to
single lines. But good that you opened a micro FAQ to add the solution
later.
Any other ideas?

Are you sure your lines are closed, thus defining real areas ? You can
check with v.digit.

I put a screenshot on the WiKi page:
http://grass.gdf-hannover.de/wiki/Convert_vector_types

The lines seem to be closed.

No, all the red nodes are nodes with only one line connected to them, so they are not closed.

But a lot of boundaries are without areas as you
can see from the legend on the right hand side.

And v.clean does not do the job.

could you be more precise ? What options did you use ? Did you try the "snap" tool ? With what threshold ? What does "does not do the job" mean ?

I used v.type to convert from lines to
boundaries.

This means you just converted the types, but if the lines are not closed it is not enough.

So possibly that the problem are boundaries with no areas? But then how can I
change that?

Close the lines.

Moritz

Ulrich Leopold wrote:

I am trying to solve the impossible it seems. I have the following
problem:

I have a patched vector map with lines. These lines should be
converted into area boundaries in order to receive areas. Once
boundaries are retrieved I still need to attach centroids to them in
order to overlay with *another* vector map which already consists of
boundaries and areas including centroids. How can I achieve this?

I tried to convert all lines into boundaries with
v.type type=line,boundary

It seems to work as there are only boundaries left. Next step would be
to add automatically centroids to these boundaries. How can this be
done?

v.category option=add

Hamish