-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBFtrim: trailing 0s in type F fields #6
Comments
ROADS_ACF.yTrim4.dbf 2013-03-05: Some fields are missing. Was this list compiled from a culled file? A more relevant comment will be posted below... |
7/9 test files are identical to previous DBFtrim version. Exceptions: txdot-2015-roadways_48113.dbf (Dallas) ROADS_ACF.yTrim.dbf |
TX
Yes, the problem is in DecCount. Set to 0 in original file. A couple workarounds for cases like this should be pretty easy. First, look thru other files with type F fields, and see if having a Decimal Count of 0 is a common thing, or unique to the TXDOT files. FWIW, the Decimal Count in the next field( |
~/gis/data/pe/nrn_rrn_pe_12.0_shp_en/NRN_PE_12_0_ROADSEG.dbf ~/gis/data/md/SHA_Routes/SHA_LINE_ROUTES_MD_2015 ~/gis/data/me/medotpubrdss/2016-04-08/medotpubrdss ~/gis/data/me/e911rdss/e911rds ~/gis/data/me/medotpubrdss/2017-08-24/medotpubrds ~/gis/data/nh/roads_dot_2016/Roads_DOT ~/gis/data/ma/RoadInv2017/Road_Inventory.yOrig.dbf ~/gis/data/ar/ROADS_ACF/ROADS_ACF |
ARWhy are no extraneous zeros trimmed?
Solution:
What happens to a blank-space value? |
unsigned int RecNum = ((unsigned int)DBFf.tellg()-dbf.HeaLen)/dbf.RecLen+1; testfiles.1/ROADS_ACF.ah_length-only.dbf testfiles.2/ROADS_ACF.ah_length-only.dbf Datum there is
Long story short, the solution is to track how many digits are to the left of the decimal. |
MaxIntD implemented...TX: v1 & v3 no diff. Good. And finally, AR... And the verdict is... 573370390. YES! |
"The TX exception" to trim extraneous decimal pointif (MinEx0 >= DecCount) tDBF.fArr[fNum].DecCount = 0; ...inter alia. TX: v4 filesize 27610 B greater than v1 thru v3. Good! |
If a type F field never uses scientific notation,
IE, never contains 'e' (or 'E'?)
look into trimming trailing 0s as done for type N fields
(or sometimes if it does contain 'e'?)
The text was updated successfully, but these errors were encountered: