Opened 9 years ago

Last modified 6 years 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 by neteler, 9 years ago

Milestone: 7.1.07.2.0

Milestone renamed

comment:2 by neteler, 8 years ago

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:3 by martinl, 8 years ago

Milestone: 7.2.17.2.2

comment:4 by neteler, 7 years ago

Milestone: 7.2.27.2.3

Ticket retargeted after milestone closed

comment:5 by martinl, 7 years ago

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:6 by martinl, 7 years ago

Milestone: 7.2.4

comment:7 by martinl, 6 years ago

Still relevant?

comment:8 by wenzeslaus, 6 years ago

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.