[GRASS-dev] GRASS digitizing; splitting lines does not update the cat!

Hi devs,

while working with a very long digitized coastline I encountered the
following problem.

I split the line into pieces in order to give different attributes to
different line segments.
But when I split the line, the cat stays identical. So whenever I
change an attribute of one segment, it gets changed on all other
segments too (because it has the same cat).

This is because no new attribute-entry will be created when a line is
split and the cat stays identical.

Would this be a big deal to change this? Where is the right place to
look at?

My needed behaviour would be that when splitting a line, the
attribute-entry gets copied, the new resulting segment gets a new cat
linked to the copied entry. The left-of-new-point-segment stays old, the
right-of-new-point-segment gets the new cat linked to the new cat.

What do other think? Is this a convnient usecase?
Could this be done with GRASS/QGIS right now?

Thanks for your comments.

Best regards

  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

Stephan Holl wrote:

while working with a very long digitized coastline I encountered the
following problem.

I split the line into pieces in order to give different attributes to
different line segments.
But when I split the line, the cat stays identical. So whenever I
change an attribute of one segment, it gets changed on all other
segments too (because it has the same cat).

This is because no new attribute-entry will be created when a line is
split and the cat stays identical.

Would this be a big deal to change this? Where is the right place to
look at?

My needed behaviour would be that when splitting a line, the
attribute-entry gets copied, the new resulting segment gets a new cat
linked to the copied entry. The left-of-new-point-segment stays old, the
right-of-new-point-segment gets the new cat linked to the new cat.

What do other think? Is this a convnient usecase?

The functionlityyou are describing would be very usefull for me as an
option. But the current behaviour should also be still available - it
has it's own uses.

Currently you can remove the old cat and add a new one, then fill the
attribute table again. This becomes a problem, when you have, say, 100
attributes but only wan't one to be different :(.

Could this be done with GRASS/QGIS right now?

AFAIK same as above. I would love to see such a functionality in QGIS
Grass edit tool, too.

Maciek

Hello Maciej,

On Mon, 25 Sep 2006 17:22:54 +0200 Maciej Sieczka <tutey@o2.pl> wrote:

Stephan Holl wrote:

> while working with a very long digitized coastline I encountered the
> following problem.
>
> I split the line into pieces in order to give different attributes
> to different line segments.
> But when I split the line, the cat stays identical. So whenever I
> change an attribute of one segment, it gets changed on all other
> segments too (because it has the same cat).
>
> This is because no new attribute-entry will be created when a line
> is split and the cat stays identical.
>
> Would this be a big deal to change this? Where is the right place to
> look at?
>
> My needed behaviour would be that when splitting a line, the
> attribute-entry gets copied, the new resulting segment gets a new
> cat linked to the copied entry. The left-of-new-point-segment stays
> old, the right-of-new-point-segment gets the new cat linked to the
> new cat.
>
> What do other think? Is this a convnient usecase?

The functionlityyou are describing would be very usefull for me as an
option. But the current behaviour should also be still available - it
has it's own uses.

Yes, you are right.

Currently you can remove the old cat and add a new one, then fill the
attribute table again. This becomes a problem, when you have, say, 100
attributes but only wan't one to be different :(.

Exactly.

If someone could point to the place in the sources where to start I
would like to try what I can do.

AFAIK the following steps need to be done.
1) finding the funtion, which does the spliting
2) get maximal category number from db
3) select values from database
4) assign new cat to new line-part
4) store copy of the values to database table with new category number

> Could this be done with GRASS/QGIS right now?

AFAIK same as above. I would love to see such a functionality in QGIS
Grass edit tool, too.

Yes, thats the place I like to have it too!!

Best regards

  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

It should be probably a new tool with a new button in toolbox.

Radim

On 9/26/06, Stephan Holl <holl@gdf-hannover.de> wrote:

Hello Maciej,

On Mon, 25 Sep 2006 17:22:54 +0200 Maciej Sieczka <tutey@o2.pl> wrote:

> Stephan Holl wrote:
>
> > while working with a very long digitized coastline I encountered the
> > following problem.
> >
> > I split the line into pieces in order to give different attributes
> > to different line segments.
> > But when I split the line, the cat stays identical. So whenever I
> > change an attribute of one segment, it gets changed on all other
> > segments too (because it has the same cat).
> >
> > This is because no new attribute-entry will be created when a line
> > is split and the cat stays identical.
> >
> > Would this be a big deal to change this? Where is the right place to
> > look at?
> >
> > My needed behaviour would be that when splitting a line, the
> > attribute-entry gets copied, the new resulting segment gets a new
> > cat linked to the copied entry. The left-of-new-point-segment stays
> > old, the right-of-new-point-segment gets the new cat linked to the
> > new cat.
> >
> > What do other think? Is this a convnient usecase?
>
> The functionlityyou are describing would be very usefull for me as an
> option. But the current behaviour should also be still available - it
> has it's own uses.

Yes, you are right.

> Currently you can remove the old cat and add a new one, then fill the
> attribute table again. This becomes a problem, when you have, say, 100
> attributes but only wan't one to be different :(.

Exactly.

If someone could point to the place in the sources where to start I
would like to try what I can do.

AFAIK the following steps need to be done.
1) finding the funtion, which does the spliting
2) get maximal category number from db
3) select values from database
4) assign new cat to new line-part
4) store copy of the values to database table with new category number

> > Could this be done with GRASS/QGIS right now?
>
> AFAIK same as above. I would love to see such a functionality in QGIS
> Grass edit tool, too.

Yes, thats the place I like to have it too!!

Best regards

        Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Hello Radim,

On Tue, 26 Sep 2006 16:37:29 +0200 "Radim Blazek"
<radim.blazek@gmail.com> wrote:

It should be probably a new tool with a new button in toolbox.

sounds promissing! Can you forsee if this finds some priority on a
developers (perhaps your) todo-list?

Am I right, that this needs to be implemented in GRASS first, befor we
can make use of it in QGIS or is this independent from GRASS and could
be implemented only in QGIS digitize tool?

Best regards

  Stephan

On 9/26/06, Stephan Holl <holl@gdf-hannover.de> wrote:
> Hello Maciej,
>
> On Mon, 25 Sep 2006 17:22:54 +0200 Maciej Sieczka <tutey@o2.pl>
> wrote:
>
> > Stephan Holl wrote:
> >
> > > while working with a very long digitized coastline I
> > > encountered the following problem.
> > >
> > > I split the line into pieces in order to give different
> > > attributes to different line segments.
> > > But when I split the line, the cat stays identical. So whenever
> > > I change an attribute of one segment, it gets changed on all
> > > other segments too (because it has the same cat).
> > >
> > > This is because no new attribute-entry will be created when a
> > > line is split and the cat stays identical.
> > >
> > > Would this be a big deal to change this? Where is the right
> > > place to look at?
> > >
> > > My needed behaviour would be that when splitting a line, the
> > > attribute-entry gets copied, the new resulting segment gets a
> > > new cat linked to the copied entry. The
> > > left-of-new-point-segment stays old, the
> > > right-of-new-point-segment gets the new cat linked to the new
> > > cat.
> > >
> > > What do other think? Is this a convnient usecase?
> >
> > The functionlityyou are describing would be very usefull for me
> > as an option. But the current behaviour should also be still
> > available - it has it's own uses.
>
> Yes, you are right.
>
> > Currently you can remove the old cat and add a new one, then fill
> > the attribute table again. This becomes a problem, when you have,
> > say, 100 attributes but only wan't one to be different :(.
>
> Exactly.
>
> If someone could point to the place in the sources where to start I
> would like to try what I can do.
>
> AFAIK the following steps need to be done.
> 1) finding the funtion, which does the spliting
> 2) get maximal category number from db
> 3) select values from database
> 4) assign new cat to new line-part
> 4) store copy of the values to database table with new category
> number
>
> > > Could this be done with GRASS/QGIS right now?
> >
> > AFAIK same as above. I would love to see such a functionality in
> > QGIS Grass edit tool, too.
>
> Yes, thats the place I like to have it too!!
>
> Best regards
>
> Stephan
>
> --
> GDF Hannover - Solutions for spatial data analysis and remote
> sensing Hannover Office - Mengendamm 16d -
> D-30177 Hannover Internet: www.gdf-hannover.de - Email:
> holl@gdf-hannover.de Phone : ++49-(0)511.39088507 -
> Fax: ++49-(0)511.39088508
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

On 9/26/06, Stephan Holl <holl@gdf-hannover.de> wrote:

Hello Radim,

On Tue, 26 Sep 2006 16:37:29 +0200 "Radim Blazek"
<radim.blazek@gmail.com> wrote:

> It should be probably a new tool with a new button in toolbox.

Sorry, forget it. It should be an option on the first tab
(currently cat only). The options should be shown/hidden according
to the selected tool. Another option could be snapping mode
(nearest, nearest vertex,...).

sounds promissing! Can you forsee if this finds some priority on a
developers (perhaps your) todo-list?

Yes (I foresee), no (priority).

Am I right, that this needs to be implemented in GRASS first, befor we
can make use of it in QGIS

No.

or is this independent from GRASS and could
be implemented only in QGIS digitize tool?

Yes.

Radim

Best regards

        Stephan

> On 9/26/06, Stephan Holl <holl@gdf-hannover.de> wrote:
> > Hello Maciej,
> >
> > On Mon, 25 Sep 2006 17:22:54 +0200 Maciej Sieczka <tutey@o2.pl>
> > wrote:
> >
> > > Stephan Holl wrote:
> > >
> > > > while working with a very long digitized coastline I
> > > > encountered the following problem.
> > > >
> > > > I split the line into pieces in order to give different
> > > > attributes to different line segments.
> > > > But when I split the line, the cat stays identical. So whenever
> > > > I change an attribute of one segment, it gets changed on all
> > > > other segments too (because it has the same cat).
> > > >
> > > > This is because no new attribute-entry will be created when a
> > > > line is split and the cat stays identical.
> > > >
> > > > Would this be a big deal to change this? Where is the right
> > > > place to look at?
> > > >
> > > > My needed behaviour would be that when splitting a line, the
> > > > attribute-entry gets copied, the new resulting segment gets a
> > > > new cat linked to the copied entry. The
> > > > left-of-new-point-segment stays old, the
> > > > right-of-new-point-segment gets the new cat linked to the new
> > > > cat.
> > > >
> > > > What do other think? Is this a convnient usecase?
> > >
> > > The functionlityyou are describing would be very usefull for me
> > > as an option. But the current behaviour should also be still
> > > available - it has it's own uses.
> >
> > Yes, you are right.
> >
> > > Currently you can remove the old cat and add a new one, then fill
> > > the attribute table again. This becomes a problem, when you have,
> > > say, 100 attributes but only wan't one to be different :(.
> >
> > Exactly.
> >
> > If someone could point to the place in the sources where to start I
> > would like to try what I can do.
> >
> > AFAIK the following steps need to be done.
> > 1) finding the funtion, which does the spliting
> > 2) get maximal category number from db
> > 3) select values from database
> > 4) assign new cat to new line-part
> > 4) store copy of the values to database table with new category
> > number
> >
> > > > Could this be done with GRASS/QGIS right now?
> > >
> > > AFAIK same as above. I would love to see such a functionality in
> > > QGIS Grass edit tool, too.
> >
> > Yes, thats the place I like to have it too!!
> >
> > Best regards
> >
> > Stephan
> >
> > --
> > GDF Hannover - Solutions for spatial data analysis and remote
> > sensing Hannover Office - Mengendamm 16d -
> > D-30177 Hannover Internet: www.gdf-hannover.de - Email:
> > holl@gdf-hannover.de Phone : ++49-(0)511.39088507 -
> > Fax: ++49-(0)511.39088508
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev@grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass-dev
> >

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

Hello Radim,

On Wed, 27 Sep 2006 10:27:42 +0200 "Radim Blazek"
<radim.blazek@gmail.com> wrote:

On 9/26/06, Stephan Holl <holl@gdf-hannover.de> wrote:
> Hello Radim,
>
> On Tue, 26 Sep 2006 16:37:29 +0200 "Radim Blazek"
> <radim.blazek@gmail.com> wrote:
>
> > It should be probably a new tool with a new button in toolbox.

Sorry, forget it. It should be an option on the first tab
(currently cat only). The options should be shown/hidden according
to the selected tool. Another option could be snapping mode
(nearest, nearest vertex,...).

> sounds promissing! Can you forsee if this finds some priority on a
> developers (perhaps your) todo-list?

Yes (I foresee), no (priority).

> Am I right, that this needs to be implemented in GRASS first, befor
> we can make use of it in QGIS

No.

> or is this independent from GRASS and could
> be implemented only in QGIS digitize tool?

Yes.

Thanks!

Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508