[GRASS-user] v.segment performance

Hi,

I have a massive Delaunay polygon tessellation that I converted to lines with v.type. I then stripped this vector of centroids using v.edit tool=delete type=centroids, and added categories to the line segments with v.category option=add. So far so good, this leaves me with about 670,000 vector line segments.

I want to find the midpoint of each of these line segments and create a new Delaunay tessellation using the line segment midpoints as the vertices in the new tessellation. I have prepared a rules file to feed into v.segment to do this, using the 50% distance offset.

I ran v.segment with the verbose flag and the only output I received after 90 minutes is ‘Using native format’ ; I’m not sure if the process is going to run forever, or if I just need to be more patient, or if I am trying to process too many points for this tool - this is my first time ever using this module, so I don’t know what to expect. Does anyone have any experience using large vectors with v.segment?

I thought the program might give some more output as to what’s happening. htop shows The program is using one core out of eight at 100% so I suppose it’s working normally.

Thanks for any hints,

~ Eric.

Hi Eric,

On Tue, Aug 6, 2019 at 8:23 PM Eric Patton <eric.r.patton@protonmail.com> wrote:

Hi,

I have a massive Delaunay polygon tessellation that I converted to lines with v.type. I then stripped this vector of centroids using v.edit tool=delete type=centroids, and added categories to the line segments with v.category option=add. So far so good, this leaves me with about 670,000 vector line segments.

I want to find the midpoint of each of these line segments and create a new Delaunay tessellation using the line segment midpoints as the vertices in the new tessellation.

The addon v.centerpoint [1] should be much faster than v.segment to get line midpoints.

Markus M

[1] https://github.com/OSGeo/grass-addons/tree/master/grass7/vector/v.centerpoint

I have prepared a rules file to feed into v.segment to do this, using the 50% distance offset.

I ran v.segment with the verbose flag and the only output I received after 90 minutes is ‘Using native format’ ; I’m not sure if the process is going to run forever, or if I just need to be more patient, or if I am trying to process too many points for this tool - this is my first time ever using this module, so I don’t know what to expect. Does anyone have any experience using large vectors with v.segment?

I thought the program might give some more output as to what’s happening. htop shows The program is using one core out of eight at 100% so I suppose it’s working normally.

Thanks for any hints,

~ Eric.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Thanks for the tip, Markus, that worked. It took about a minute to process 670K lines!

Cheers,

~ Eric.

···

Hi Eric,

On Tue, Aug 6, 2019 at 8:23 PM Eric Patton <eric.r.patton@protonmail.com> wrote:

I have a massive Delaunay polygon tessellation that I converted to lines with v.type. I then stripped this vector of centroids using v.edit tool=delete type=centroids, and added categories to the line segments with v.category option=add. So far so good, this leaves me with about 670,000 vector line segments.

I want to find the midpoint of each of these line segments and create a new Delaunay tessellation using the line segment midpoints as the vertices in the new tessellation.

The addon v.centerpoint [1] should be much faster than v.segment to get line midpoints.

Markus M