yakra / tmtools

Tools to aid in development of the TravelMapping project
0 stars 0 forks source link

DBFtrim: padding on both sides #14

Closed yakra closed 6 years ago

yakra commented 6 years ago

/home/yakra/gis/data/me/medotpubrdss/2017-08-24/medotpubrds.dbf 7-byte character field (Edited to clarify: after trimming) padding on both left and right, E.G. {0x20, 0x20, 0x20, 0x20, '3', 0x20, 0x20,}

figure out what issue to merge this into later. :P

yakra commented 6 years ago

{0x20, 0x20, '7', '0', '3', 0x20, 0x20,} {0x20, '2', '0', '1', 0x20, 0x20, 0x20,}

yakra commented 6 years ago

duplicate of #13, though both #13 & #7 are two sides of the same coin

yakra commented 6 years ago

{0x20, 0x20, '7', '0', '3', 0x20, 0x20,} {0x20, '2', '0', '1', 0x20, 0x20, 0x20,}

~/gis/data/me/medotpubrdss/2017-08-24/medotpubrds.yOrig.dbf contains:

"   2   ", "   11  ", "  201  ",
"  2    ", "  11   ", " 201   "

(DBFmine output should dump fewer unique values from a v5 trimmed file vs v4.)

~/gis/data/me/medotpubrdss/2016-04-08/medotpubrdss.yOrig.dbf does not have these instances of the same value with different amounts of left padding, but has left padding nonetheless.

Values fit within the same trimmed 7 bytes. Filesize should not change (due to RTE_NO, at least), but all data should now be left-justified.

Culling out RTE_NO (and any others?) should cause v4 & v5 files to converge & have no diff. medot16: confirmed, no diff. medot17: confirmed, no diff.

yakra commented 6 years ago

TX: https://github.com/yakra/tmtools/issues/7#issuecomment-372447352

~/gis/data/pe/nrn_rrn_pe_12.0_shp_en/NRN_PE_12_0_ROADSEG.dbf no DIFF

~/gis/data/md/SHA_Routes/SHA_LINE_ROUTES_MD_2015.yOrig.dbf no DIFF

~/gis/data/me/e911rdss/e911rds.yOrig.dbf no DIFF

~/gis/data/nh/roads_dot_2016/Roads_DOT.yOrig.dbf no DIFF

~/gis/data/me/medotpubrdss/2016-04-08/medotpubrdss.yOrig.dbf only DIFF is in RTE_NO field

~/gis/data/me/medotpubrdss/2017-08-24/medotpubrds.yOrig.dbf only DIFF is in RTE_NO field

MA: https://github.com/yakra/tmtools/issues/13#issuecomment-372447976 AR: https://github.com/yakra/tmtools/issues/13#issuecomment-372449214