[GRASS-dev] Moving r53760 to some lib

Markus Metz markus.metz.giswork at gmail.com
Fri Nov 23 11:35:45 PST 2012


On Wed, Nov 21, 2012 at 4:18 PM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Wed, Nov 21, 2012 at 3:59 PM, Martin Landa <landa.martin at gmail.com> wrote:
>> Hi,
>>
>> 2012/11/21 Maris Nartiss <maris.gis at gmail.com>:
>>> Your code in r53760 seems good. I would suggest to move it to some
>>> library, still no idea where it should go. Probably Vlib? As it would
>>> reduce code duplication and use of home-brew suboptimal code.
>>
>> Vlib seems to be a good place, see also similar (more options
>> included) stuff in v.edit [1].
>
> I agree, particularly if more modules will get cats/where options,
> maybe also to work with virtual vector maps. I would suggest two new
> functions, one to parse cats/where/field options, essentially the
> parse_filter_options() fn, another one to check categories against
> these filters.

Done in r53997. The new functions are called
Vect_cats_set_constraint() and Vect_cats_in_constraint(). I would
prefer the term 'filter' but used the term 'constraint' for
consistency because it is already used elsewhere in the vector lib for
region and line type constraints.

Markus M


More information about the grass-dev mailing list