Opened 4 years ago

Last modified 8 months ago

#2970 new task

Replace Vect_point_in_box() by Vect_point_in_box_2d() where appropriate

Reported by: wenzeslaus Owned by: grass-dev@…
Priority: minor Milestone: 8.0.0
Component: Vector Version: svn-trunk
Keywords: vlib, bbox, box Cc:
CPU: Unspecified Platform: Unspecified

Description

In r66459 I have added Vect_point_in_box_2d() function which is simply a 2D version of Vect_point_in_box() function which is 3D only. The motivation was #2734 and an issue reported on mailing list. I used the new Vect_point_in_box_2d() to fix v.distance in r66460.

Vect_point_in_box() function is used a lot in the modules and very often with hardcoded 0.0 as z parameter (and there might be also cases when z is optionally zero). These should be replaced by the new 2D only version of the function.

An alternative would be to add one function which would optionally consider z using boolean has_z/is_2d or pointer for z and use this function in the modules.

Currently it is not know if this is causing any issues as in case of v.distance. Setting type to task and priority to minor.

Change History (8)

comment:1 Changed 4 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

comment:2 Changed 3 years ago by neteler

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:3 Changed 3 years ago by martinl

Milestone: 7.2.17.2.2

comment:4 Changed 2 years ago by neteler

Milestone: 7.2.27.2.3

Ticket retargeted after milestone closed

comment:5 Changed 22 months ago by martinl

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:6 Changed 22 months ago by martinl

Milestone: 7.2.4

comment:7 Changed 8 months ago by martinl

Still relevant?

comment:8 Changed 8 months ago by wenzeslaus

Milestone: 7.2.48.0.0

I'm not aware of any changes in this, so the danger that #2734 applies for other usages of Vect_point_in_box() besides v.distance is still there.

Note: See TracTickets for help on using tickets.