[GRASS-dev] v.to.db option=slope

Hamish hamish_nospam at yahoo.com
Mon Dec 11 19:27:15 EST 2006


> >> does it now work for LatLong? I guess I overlooked some email.
> >>
> [...]
> > no, it does not :-( it does not even work with option=length,
> > because of
> >
> > Vect_cidx_get_num_unique_cats_by_index ( &Map,
> > Vect_cidx_get_field_index(&Map, options.field ) );
> >
> > in main.c returns 1634887471 of unique cats by index and v.to.db
> > ends up with G_calloc error: could not allocat memory.
> >
> > I have no clue, how to fix this bug.
Paul:
> I (maybe others) interpreted this as you admitting that the patch was
> not  yet ready/good enough to commit to CVS! So maybe that's why
> nobody  complained - Is it true that wrong results will be given in a
> lat/long  location with no warning? If so, then something should be
> changed. If not, and I've misunderstood, then it's all OK!


a simple 

if ((G_projection() == PROJECTION_LL))
   G_fatal_error("slope option not supported for lat/lon locations");

could allow the patch to go in without introducing bugs.

Of course we should try and fix the bug instead of coding around it,
and now is the time to do that.


Hamish




More information about the grass-dev mailing list