Opened 7 years ago

Closed 3 years ago

#2183 closed enhancement (fixed)

v.centerpoint: category values in ascii output should include original cat values

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.4.1
Component: Addons Version: svn-trunk
Keywords: v.centerpoint ascii output Cc:
CPU: Unspecified Platform: Unspecified

Description

When using v.centerpoint to print the centerpoint coordinates to stdout, cat values represent the type of point (7 = mean of area, 8 = median of area, etc). I would find it more useful if in the ascii output the cat value would be that of the original feature (just as normally foreseen for vector output of v.centerpoint) and that the centroid type was an additional column.

Attachments (1)

v_centerpoint_backtrace.txt (21.7 KB) - added by mlennert 7 years ago.
backtrace for segfault

Download all attachments as: .zip

Change History (10)

comment:1 in reply to:  description ; Changed 7 years ago by mmetz

Replying to mlennert:

When using v.centerpoint to print the centerpoint coordinates to stdout, cat values represent the type of point (7 = mean of area, 8 = median of area, etc). I would find it more useful if in the ascii output the cat value would be that of the original feature (just as normally foreseen for vector output of v.centerpoint) and that the centroid type was an additional column.

Please try r58842. Note that center points for point clouds have only the type of center point as cat and not all categories of all original features.

comment:2 in reply to:  1 Changed 7 years ago by mlennert

Replying to mmetz:

Replying to mlennert:

When using v.centerpoint to print the centerpoint coordinates to stdout, cat values represent the type of point (7 = mean of area, 8 = median of area, etc). I would find it more useful if in the ascii output the cat value would be that of the original feature (just as normally foreseen for vector output of v.centerpoint) and that the centroid type was an additional column.

Please try r58842. Note that center points for point clouds have only the type of center point as cat and not all categories of all original features.

Thanks, it looks good, but now I get a segfault. I'll attach a full backtrace.

Moritz

Changed 7 years ago by mlennert

Attachment: v_centerpoint_backtrace.txt added

backtrace for segfault

comment:3 Changed 7 years ago by mlennert

FYI: I don't get that segfault when I send output to a new vector layer (i.e. when I use the output parameter).

comment:4 Changed 5 years ago by martinl

Milestone: 7.0.07.0.5

comment:5 Changed 5 years ago by martinl

Milestone: 7.0.57.3.0

comment:6 Changed 5 years ago by martinl

Milestone: 7.3.07.4.0

Milestone renamed

comment:7 Changed 3 years ago by martinl

What is the status of this issue?

comment:8 Changed 3 years ago by neteler

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:9 in reply to:  7 Changed 3 years ago by mlennert

Resolution: fixed
Status: newclosed

Replying to martinl:

What is the status of this issue?

I cannot reproduce the segfault, and the original wish has been implemented, so closing.

Note: See TracTickets for help on using tickets.