[Shapelib] Re: Suggested patch for shplib

Frank Warmerdam warmerdam at pobox.com
Mon Nov 22 23:47:29 EST 2004

Paul Balomiri wrote:
> Hi,
> I'm currently working on a trafic analyzis software using your
> Software. You have written a great Library!  I would strongly suggest
> to add the function DBFReadLongLongAttribute() as a long long is as
> long as double, and People could need it. In My case Teleatlas has a
> 15 digits street  Network-ID, which I couldn't read without static
> casts.
> I supply you 2 patchfiles for the header and the C File, and hope that
> you integrate them into your next build ...


My concern with this method is that it depends on the "long long" type.
I have been trying to keep Shapelib very basic in terms of system requirements
and I am not clear on how universal "long long" is on different operating
systems. Also, all the method does is call the "double" style fetch function.
Why can't folks just call DBFReadDoubleAttribute() themselves and cast to
long long?

I have taken the liberty of cc:ing this message to the shapelib mailing list
in case anyone else has an opinion.  I know that there have been people
run into problems with integer fields to long to fit in an int.

Also, if we were trying to address this type of field, I wonder if it would
be best to define a new field type so that applications would know the field
is "very wide".

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Shapelib mailing list