v.segment performance

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

v.segment performance

Eric Patton-3
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.


_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: v.segment performance

Markus Metz-3
Hi Eric,

On Tue, Aug 6, 2019 at 8:23 PM Eric Patton <[hidden email]> 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


> 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
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: v.segment performance

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

Cheers,

~ Eric.



On Tue, Aug 6, 2019 at 5:45 PM, Markus Metz <[hidden email]> wrote:
Hi Eric,

On Tue, Aug 6, 2019 at 8:23 PM Eric Patton <[hidden email]> 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



_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user