[GRASS-dev] r38992 Vect_get_num return long

Glynn Clements glynn at gclements.plus.com
Tue Sep 15 01:08:51 EDT 2009


Markus Metz wrote:

> > 	#ifdef HAVE_LONG_LONG_INT
> > 	typedef long long longest;
> > 	#else
> > 	typedef long longest;
> > 	#endif
> >
> > ?
> >
> > If you're desperate for more than 32 bits, an IEEE "double" can
> > represent integers between -2^53 and 2^53 exactly, but this is likely
> > to be more trouble than it's worth (you have to be careful with
> > division, you can't use a double as an array index, you can't use
> > shifts or bitwise operators, ...).
> >   
> IMHO, we should first make sure that the vector libs support up to 
> INT_MAX (2^31 - 1) features. Vector libs LFS was a first step, and 
> unless there is a revolutionary new hardware concept in the near future 
> with huge amounts of RAM and much higher processing speed, building 
> topology for so many features will take a long long time, particularly 
> in case of areas. One solution would be to increase the speed and 
> decrease the memory requirements of topology building, and I think more 
> brains should be put to that task before increasing the number of 
> supported features, i.e. changing plus_t from a 32-bit integer type to a 
> 64-bit integer type.

It isn't just vector code which would benefit from a wide integer
type. Some raster code has problems with maps with more than 2^31
cells.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list