Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#1789 closed enhancement (fixed)

v.hull: should not be region sensitive

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-releasebranch64
Keywords: v.hull Cc:
CPU: All Platform: All

Description

If the current region is not set to the vector map, v.hull fails with:

v.hull training_turkey_087VI174 out=training_turkey_087VI174_hull
ERROR: Convex hull calculation requires at least three points. Exiting.

The reason is in main.c, line 311:

    /* load site coordinates */
    G_get_window(&window);
    numSitePoints = loadSiteCoordinates(&Map, &points, all->answer, &window);

...

In loadSiteCoordinates()

    /* copy window to box */
    Vect_region_box(window, &box);

I wonder why it is made region sensitive (untypical for GRASS vector commands)...

Change History (3)

in reply to:  description comment:1 by mmetz, 12 years ago

Milestone: 6.4.37.0.0
Type: defectenhancement

Replying to neteler:

If the current region is not set to the vector map, v.hull fails

In this case, you need to use the -a flag to ignore the current region.

I have changed the behaviour in trunk such that the current region is only respected if the (new) -r flag is set (see also other v.in.* modules). The -a flag has been removed.

Additionally, I have added selection options 'cats' and 'where'.

All changes are in r53759.

Markus M

comment:2 by neteler, 11 years ago

Resolution: fixed
Status: newclosed

comment:3 by hamish, 11 years ago

Summary: v.hull: should not usev.hull: should not be region sensitive
Note: See TracTickets for help on using tickets.