[postgis-devel] RE: shapelib fixes ?
Obe, Regina
robe.dnd at cityofboston.gov
Thu Jan 22 10:39:41 PST 2009
Sandro,
Good point. I was thinking of whether it would be better to just change
the DBFReadDeleted in shp2pgsql to !DBFReadDeleted, but given the verbiage
it seemed more confusing to do that. Then again I hate the function name altogether. I think I spent more time figuring out what the hell does that mean than doing anything. I would prefer IsDBFRecordDeleted.
It seems to me DBFReadDeleted is asking the question, is the record we are reading deleted (or is it if the record is Delete then don't read it, but its reading it to figure out it is deleted). It took me a while to figure out what that meant? Or at least that is what that phrase means to me. I think IsDBFRecordDeleted or IsDBFRecordActive is clearer.
Also I'm not sure this is not Paul's concoction because comparing to the dbfopen from the 1.3.3, this function isn't even there. I don't have access to Frank's shapelib so can't commit changes.
Paul you didn't happen to commit this change to shapelib did you or synch from there to get this function?
Thanks,
Regina
-----Original Message-----
From: strk [mailto:strk at keybit.net]
Sent: Thu 1/22/2009 12:47 PM
To: Obe, Regina
Cc: postgis-devel at postgis.refractions.net
Subject: shapelib fixes ?
Salve Regina!
I noticed this commit:
* r3561 /trunk/loader/dbfopen.c: Fix DBFReadDeleted logic
-- should return 1 if record is deleted and 0 if it is not
deleted
Note that dbfopen.c is part of Frank Warmerdam's
shapelib, copied in postgis tree verbatim and occasionally
updated to new versions.
This means that on next update your "fix" would be reverted
(unless it is in upstream, which I strongly dubt).
Generally, returning 0 for success and 1 for error is a trick
to allow for fine-grained error reporting. A success is
a success, while an error can be for different reasons, thus
the non-zero return on error.
--strk;
Free GIS & Flash consultant/developer () ASCII Ribbon Campaign
http://foo.keybit.net/~strk/services.html /\ Keep it simple!
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20090122/971cf534/attachment.html>
More information about the postgis-devel
mailing list