From d2b346362194202ef13fe4393514a137d90b975b Mon Sep 17 00:00:00 2001 From: mavrick Date: Thu, 19 Nov 2026 14:05:26 -0600 Subject: [PATCH 1/3] test(engine): cover XLS and XLSB reader losses --- ATTRIBUTION.md | 1 + ROADMAP.md | 8 +- .../engine/testdata/reading-losses/README.md | 70 ++++++++++++++++++ .../testdata/reading-losses/book-clean.xls | Bin 0 -> 3584 bytes .../testdata/reading-losses/book-clean.xlsb | Bin 0 -> 1730 bytes .../reading-losses/book-collection.xls | Bin 0 -> 3584 bytes .../reading-losses/book-collection.xlsb | Bin 0 -> 1767 bytes .../engine/testdata/reading-losses/book-z.xls | Bin 0 -> 3584 bytes .../testdata/reading-losses/book-z.xlsb | Bin 0 -> 1735 bytes crates/engine/tests/never_silent_reading.rs | 50 +++++++++++-- 10 files changed, 120 insertions(+), 9 deletions(-) create mode 100644 crates/engine/testdata/reading-losses/book-clean.xls create mode 100644 crates/engine/testdata/reading-losses/book-clean.xlsb create mode 100644 crates/engine/testdata/reading-losses/book-collection.xls create mode 100644 crates/engine/testdata/reading-losses/book-collection.xlsb create mode 100644 crates/engine/testdata/reading-losses/book-z.xls create mode 100644 crates/engine/testdata/reading-losses/book-z.xlsb diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index fde228993e..821bb57951 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -20,6 +20,7 @@ of use. | Shapefile Z/M reader-loss fixtures (`crates/engine/testdata/reading-losses/shp-*`) | The RustGIS project: independently encoded, made-up point and line records following the published Shapefile specification; byte layout in [SHAPEFILE.md](crates/engine/testdata/reading-losses/SHAPEFILE.md) | Apache-2.0 | | XLSX reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xlsx`) | The RustGIS project: made-up one-row workbooks, encoded as Office Open XML with Python standard-library ZIP/XML writing; [fixture notes](crates/engine/testdata/reading-losses/README.md#xlsx) describe their contents | Apache-2.0 | | ODS reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.ods`) | The RustGIS project: made-up one-row OpenDocument workbooks, independently encoded with Python standard-library ZIP/XML writing; [fixture notes](crates/engine/testdata/reading-losses/README.md#ods) describe their contents | Apache-2.0 | +| XLS/XLSB reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xls`, `book-*.xlsb`) | The RustGIS project: made-up one-row workbooks generated offline with SheetJS CE 0.18.5, with unused XLSB package parts removed; [fixture notes](crates/engine/testdata/reading-losses/README.md#xls-and-xlsb) describe contents and checks | Apache-2.0 | | OSM PBF ring-loss fixtures (`crates/engine/testdata/reading-losses/hole-*.osm.pbf`) | The RustGIS project: independently encoded, made-up nodes, ways and relation from the published OSM PBF schema; contents and checksums in [OSM.md](crates/engine/testdata/reading-losses/OSM.md) | Apache-2.0 | | Interface themes (`crates/ui-egui/themes/light.json`, `dark.json`) | The RustGIS project | Apache-2.0 | | Sample data (`countries`, `cities`, `rivers`, `lakes` GeoJSON), embedded at build time from [rustgis-assets](https://github.com/opengeos/rustgis-assets/tree/main/data) | Natural Earth 1:110m, attributes trimmed | Public domain | diff --git a/ROADMAP.md b/ROADMAP.md index 9749397777..8ed57cdda0 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -73,14 +73,16 @@ A result is right, or RustGIS says what it lost or assumed nodes or ways the file doesn't hold, and inner rings outside every outer one; and the text readers' losses listed as `Silent` in `crates/engine/tests/never_silent_reading.rs`, among them each vertex's Z in DXF and unreadable coordinates, holes and parts in KML, GeoRSS, MapInfo and - DXF, plus geometry-collection members in XLSX/ODS and error-valued attribute cells in XLSX. A fix makes + DXF, plus geometry-collection members in XLSX/ODS/XLS/XLSB and error-valued attribute cells in XLSX. A fix makes its case `Said` _(open)_. - Lossy sample files in `never_silent_reading.rs` for the readers it doesn't cover yet: - remaining spreadsheet formats (XLS, XLSB and XLSM). It covers GeoJSON, TopoJSON, CSV, + remaining distinct loss families and parser paths (see the finite + [coverage inventory](crates/engine/testdata/reading-losses/README.md#coverage-boundaries)). It covers GeoJSON, TopoJSON, CSV, KML, KMZ, GPX, GML, GeoRSS, DXF, LandXML and MapInfo, with height-loss cases for CityJSON, CityGML, GeoPackage, FlatGeobuf, GeoParquet and FileGDB, Z/M-loss cases for Shapefile, and ring-loss cases for - OSM PBF, WKT height/member losses for XLSX and ODS, and error-cell losses for XLSX; other loss kinds remain. + OSM PBF, WKT height/member losses for XLSX, ODS, XLS and XLSB, and error-cell losses for XLSX; other loss kinds remain. + XLSM shares the XLSX parser; macros are untested. Exports are checked by `never_silent_roundtrip.rs` _(open)_. - A `--strict` option for `rustgis-cli run` that exits non-zero when a loss is reported, for scheduled jobs. Notices carry a severity but not a kind today (`Notice` in diff --git a/crates/engine/testdata/reading-losses/README.md b/crates/engine/testdata/reading-losses/README.md index 05c6baa31b..fe6a62ac5c 100644 --- a/crates/engine/testdata/reading-losses/README.md +++ b/crates/engine/testdata/reading-losses/README.md @@ -90,3 +90,73 @@ reader and `layer.addData`; native reports must also have zero skipped rows and expected height-loss flag and notice. Valid lossy files must import. WKT uses the existing reader convention without testing or changing CRS assumptions. This slice does not certify ODS completeness or cover malformed archives, formulas, dates or error cells. + +## XLS and XLSB + +Six made-up workbooks written offline with SheetJS Community Edition `xlsx` 0.18.5: +`utils.aoa_to_sheet([['wkt','id','note'],[wkt,7]])`, appended as `Places`, then +`writeFile` with `bookType: 'biff8'` (XLS) or `'xlsb'` and compression enabled. +The writer is independent of RustGIS and is not needed by tests. No writer code or +third-party data is included. XLS exercises the compound-file/BIFF reader; XLSB +exercises the binary workbook/sheet parser inside ZIP, rather than XLSX's XML parser. + +XLS files retain the writer's small compound container. XLSB archives were minimized +offline with Python's standard-library `zipfile`: retain workbook, worksheet and style +binary parts, replace package relationships/content types with only those parts, and +remove the unused theme, document properties and sheet metadata. ZIP timestamps are +1980-01-01. The generated XLSB short string/RK cell records were re-encoded as +full `BrtCellSt`/`BrtCellRk` records with explicit column indexes, following the +published [MS-XLSB Cell layout](https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-xlsb/1e3e0c46-6175-4123-b02b-903643a5cc07). +The writer's undocumented short forms are not read by the current XLSB parser; +these fixtures use the published full records and do not test short-form fidelity. +No macros, formulas or external links are included. + +| Files (both `.xls` and `.xlsb`) | WKT | Current loss classification | +| --- | --- | --- | +| `book-clean` | `POINT(1 2)` | None; no native or command notice | +| `book-z` | `POINT Z(1 2 3)` | Imports with a Z/M-loss notice | +| `book-collection` | `GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))` | Silent: only the first member remains | + +Both members of each pair must retain exactly one point at (1, 2), integer `id=7`, +text `note=Null` and both field names/types, through `sheets::read` and `layer.addData`. +Native checks require zero skipped rows, the expected height flag and exactly one +Z/M message for the height variant (none otherwise). Valid lossy fixtures must import. +Dates, error cells, other sheets and broader type/encoding fidelity are not certified. + +## Coverage boundaries + +The corpus is a list of specific losses, not a format-completeness certificate. +Dispatch is defined by `data::io::{read_layers,read_bytes,read_path}`, `source::EXTENSIONS` +and `sheets::open_checked`. Aliases and sniffed formats share rows below; the table does +not claim that every alias or container has its own paired test. “Gap” means applicable +but not covered here, not necessarily a known bug. CRS assumptions remain separate work +(#2032). The exact tested loss and `Silent`/reported status live in the test case table. + +| Reader dispatch | Paired corpus coverage | Remaining applicable families | +| --- | --- | --- | +| GeoJSON | Z, unreadable geometry | M, members/holes, attributes | +| TopoJSON | Z, missing arcs, bad quantized positions, nested members | M, other parts, attributes | +| Delimited text (CSV/TSV/TXT/DAT, gzip wrapper) | CSV WKT Z, bad WKT/XY, later WKT members, extra cells | M, holes/curves, types/names/encoding, wrapper parity | +| Shapefile | Point Z/M, line Z/ZM | Other shapes/parts, attributes; DBF encoding tracked in #2325 | +| Standalone DBF | None | Names/types/encoding; geometry and Z/M inapplicable | +| KML/KMZ | Z, missing geometry, bad coordinate/hole/part, excess point coordinates | Other parts, attributes | +| GPX | Bad waypoint, short track segment | Elevation attributes, other parts, attributes | +| GeoRSS (RSS/Atom/GeoRSS, sniffed XML) | Unreadable place/hole, excess coordinate pairs | GML dimensions, other members, attributes | +| LandXML (including sniffed XML) | Unreadable point, parcel without geometry | Elevations, curves/parts, attributes | +| GML | Z | M, members/holes/curves, attributes | +| CityGML / CityJSON (distinct parsers) | Varying line Z in each | Other dimensions, surfaces/members/holes, attributes | +| DXF | Varying line Z, unreadable entity/vertex | Other entities/curves/parts, attributes | +| MapInfo MIF/MID | Unreadable object, arc, short part/ring | Other geometry and attribute conversion | +| OSM PBF | Missing member/node, unclosed/outside inner ring | Other relations, attributes; native coordinates are XY | +| Feature-service PBF (distinct sniffed PBF parser) | None | Dimensions, geometry members, attributes | +| GeoPackage / FlatGeobuf / GeoParquet / FileGDB (distinct readers) | Z in each | M, members/parts/curves where supported, attributes | +| LAS/LAZ | None in this paired corpus | Sampling, dimensions/attributes; geometry members/holes inapplicable | +| XLSX | WKT Z/members, error-valued attribute | M, other geometry, dates/formulas/names/encoding | +| ODS / XLS / XLSB (distinct workbook parsers) | WKT Z/members in each | M, other geometry, dates/errors/names/encoding | +| XLSM | Shared XLSX OOXML implementation only | No distinct fixture; macros and macro fidelity untested | +| Generic ZIP | Delegates to inner readers; KMZ covered above | Other wrapper parity | + +XLSM uses the same OOXML parser as XLSX; merely renaming a workbook would not establish +another parser's coverage. Raster/image/grid/PDF fidelity and external program, database +and network-provider losses are outside this local vector/table corpus. Existing tests +elsewhere (including LAS whole-read fidelity) do not count as paired coverage here. diff --git a/crates/engine/testdata/reading-losses/book-clean.xls b/crates/engine/testdata/reading-losses/book-clean.xls new file mode 100644 index 0000000000000000000000000000000000000000..f14a03f82d11dd31c0ebe5462a8b569d29a9d663 GIT binary patch literal 3584 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 literal 0 HcmV?d00001 diff --git a/crates/engine/testdata/reading-losses/book-collection.xlsb b/crates/engine/testdata/reading-losses/book-collection.xlsb new file mode 100644 index 0000000000000000000000000000000000000000..a84d12a38adb8f26cf7201d61af3e0b0c60165dd GIT binary patch literal 1767 zcmWIWW@Zs#U|`??Vnv2$h36d#fvnX)%n!sBIr`=KMcGOD`Pq6&nR(f1DH#c0k{y`e zILMrtaBu=wiz-i?gPC-|kp{>9gA)!idCW@s5ZO>u%%;p{tT6B73MS(Y_73L;wp1e# z;}+v5#v+C(#wv_2YZUIDKViVWXp&%uBb$g}h0zj*UKUBY0}~EUI5B~z#KG_|i(8wR z8yiCaitD1!J;_Bo4htGuw;JL zt{2v(hT+YVmT|n#f!^a`VqoBfc(b^qGAFed;|XEdrPmZ<@RX1HaBzqFm!6Xs z{`Isz6n5FY@4)~6D~jevO2i#{a^dUVq{Ir|iN*}9_RJke*^bol{5){r6f653X|cBX zXLJ;9#-HJ-pTX>)Ghw=O!zNFMpCN4tZ9;8c2B*b4f*TrRxUOV#hKVvfnab#^eQ@Ea zmWTSrhfCDZBYtm4!JTQqkYEKyJU5VzFG|fR*4G1(z5Tv?O$Gw3>o1*Qlqh(3DB#A9 zMDINgn#?8_{4R$by?uMBgt*>)|9#WLx9`4tq}j>jjY^0sXKwKKEi0$=?vRjo&D)`o z=y@_;U~$}uRS_H1r%&!|4%IwuusFOb)cD~_o%0fQk_9PUc~b;-ZDcB}uKd-0_Hv3z zY~+32onMk4t)6&N>&z6DH_~>NYnVSr@f>3`GnL~r%STPOqU}}LYkn7)j zr$5;anKz%Gxh9W=zcjd@Y>v&pLuI+yBJbu}^=CYGVu^`;;i-I#W$MDi8b59;RrDxX zOP)^LdFI#rR1H7oOUq9N?|+o|?ZGQPR6j0}_@43%=(jgOKMDisXy^RAlGMDC_>jti z)Z$pZirk#36RqX@;2XIhP4J86Za|@t*rfh$?xJq=PnWo*Woq?j}{irc=F5bhc-?Ix7O}T=Knpwr}#vK00zx0n{ zhUYrDSM4tTNde2&-hcYD(jw_24KeNrV}9kqQhO zFlYb<6h;Ayt{J_=gJ@-7XkeU&(2P<3p__tUpdd^ErAS~Ik0@TywW8-dgx2Z6(g`Ua tqH9D?^9YS$%wRilX_I)+B2pfRA3aDCs=c(v;z0}6(g=bGHc{IYKPoXG-o%fa zihqC?kDk%aDW3$-KcKPQ9t0cGZR4 z=?Kx;U+#PtF(Af>-NYVZFR_mpC-xH=0+1jki78^c>ZhI0HAB1o4S0we7w#k%Gy~#m z8faJ<cj z-3FSO@P{!@b}Q$1OCHM{&A9eX>R7-i;73s`f9i@Y8Tbqwt9&KA_CD%c;Tspdh+7g* z@}+FHGMV3rl-B1==pG72{DRxU7+VI<$xUF7?u?e>x0KRXI_`tgF^y-yY)7XwU=+JyLUd1^${#@w=@3G? ze~ENrF2oI%5dKVv+bkiL@5=WT?9xTowmEl)uWI>c`l(6Vq_ajG=n<`x)`;etX_~o! z%eYGGJ!U#JEbE#^YqKPg)-KFI!-eTnSL!9b!o(_Wl^~S_8({tAkL5GP>EoA_e^~j$ zO7AP@-j?+rDF2~SSV`0F!LI4uO4629BQSRu>niZ9{~>b9sgd`lpFb82 o>Y5Kyn3o4f9k@klm4X9A$E-b5*faW85w?u7+7sn=pj8e00*w6w^8f$< literal 0 HcmV?d00001 diff --git a/crates/engine/testdata/reading-losses/book-z.xlsb b/crates/engine/testdata/reading-losses/book-z.xlsb new file mode 100644 index 0000000000000000000000000000000000000000..3c744e53b3f7022f2c0086d1d64bb6bd23f99834 GIT binary patch literal 1735 zcmWIWW@Zs#U|`??Vnv2$h36d#fvnX)%n!sBIr`=KMcGOD`Pq6&nR(f1DH#c0k{y`e zILMrtaBu=wiz-i?gPC-|kp{>9gA)!idCW@s5ZO>u%%;p{tT6B73MS(Y_73L;wp1e# z;}+v5#v+C(#wv_2YZUIDKViVWXp&%uBb$g}h0zj*UKUBY0}~EUI5B~z#KG_|i(8wR z8yiCaitBXl{CPVO=qeFL1_lX)>xwf{Q%j2V!IUA`nJFnV4rv@0o@*WyS&} z9fvu`C-8?%qB9e-TMyw|G%PWexyX)p(huG-15oML@F z5ZT-B%hzNe(7OK88AgeMhlc`g>`3(94I%*wNd!mr981-S^)&J$(D_yGNRx zOx~!3xN_zOf8VllO79K{dDpxh8i}4K;{_JSomdsIL4Eq<&gM|f(*}#ft3r(*uGBd% zVJBIT(v>$wVAn>b!s^Oj?Po8in8Zfj*WLLg`O)f$C$-K@QF$Y6XSs&?a}>`pMl(}6 zKC^t(bSc_imAwY&>{g)jr63Us@d0w)0sCg{1ekBWFz{qNIuvkcM`HFK2VLgehHWpe z$miuR{@C8q${jxWd)lYH(>2St7bb}Fq|6cBbE0V9>Ql^oMrzGlJ|4N$s(P@rr;gjf z>#>Grv0U!0EqXmhYLZqTg1&BYj(GZ$?T~r%`I&3-SolkW3(Dr${5w>Zn=SHgu2p}= zV<(oF*cYD4$5^H=Jgo8Kwo*lplC|XN#GPk;%}>?vW4^TfWbpn+iQgW);zRZ05{d6A z&wze=1N5UXkdAiF&nrpID~S)OEJ!Vm)vL(OnL5!r@2~+++xnyoT^&nFE0Jx+OCoRc z?PXYNurYD3g3-#_-~75AkNivjC}w!BlY7+G)c-=qV)8JR?waTl4uumOVxU_fCMpy-;>OEid928IU4c?iuI Vec { ), ]); + out.extend([ + case( + "XLS: a height in WKT", + "a.xls", + include_bytes!("../testdata/reading-losses/book-clean.xls"), + include_bytes!("../testdata/reading-losses/book-z.xls"), + Imported("Z or M"), + ), + case( + "XLS: a WKT geometry collection's later members", + "a.xls", + include_bytes!("../testdata/reading-losses/book-clean.xls"), + include_bytes!("../testdata/reading-losses/book-collection.xls"), + Silent("only the collection's first member is kept"), + ), + case( + "XLSB: a height in WKT", + "a.xlsb", + include_bytes!("../testdata/reading-losses/book-clean.xlsb"), + include_bytes!("../testdata/reading-losses/book-z.xlsb"), + Imported("Z or M"), + ), + case( + "XLSB: a WKT geometry collection's later members", + "a.xlsb", + include_bytes!("../testdata/reading-losses/book-clean.xlsb"), + include_bytes!("../testdata/reading-losses/book-collection.xlsb"), + Silent("only the collection's first member is kept"), + ), + ]); + // MapInfo: the .mid beside each .mif holds one row per object. let mut mapinfo = |name, clean: &str, lossy: &str, mid: &str, expect| { let mut c = case(name, "a.mif", mif(clean), mif(lossy), expect); @@ -588,7 +619,10 @@ fn check_workbook(ds: &rustgis_engine::data::Dataset) -> std::io::Result<()> { || ds.features[0].geometry != Some(Geometry::Point(Coord::new(1.0, 2.0))) || ds.features[0].attrs != vec![Value::Int(7), Value::Null] { - return Err(std::io::Error::other("spreadsheet fixture didn't retain exactly its point, ID and null note")); + return Err(std::io::Error::other(format!( + "spreadsheet fixture didn't retain exactly its point, ID and null note: fields={:?}, features={:?}", + ds.fields, ds.features + ))); } Ok(()) } @@ -643,12 +677,14 @@ fn read(dir: &std::path::Path, file: &str, content: &[u8], beside: &[(&str, Vec< return Err(std::io::Error::other("native Shapefile fixture skipped a record")); } } - if file.ends_with(".xlsx") || file.ends_with(".ods") { + if rustgis_engine::data::sheets::is_sheet_name(file) { let (native, report) = rustgis_engine::data::sheets::read(content, "a", None, &Default::default()) .map_err(|e| std::io::Error::other(format!("native spreadsheet fixture: {e}")))?; check_workbook(&native)?; let height = content == include_bytes!("../testdata/reading-losses/book-z.xlsx") - || content == include_bytes!("../testdata/reading-losses/book-z.ods"); + || content == include_bytes!("../testdata/reading-losses/book-z.ods") + || content == include_bytes!("../testdata/reading-losses/book-z.xls") + || content == include_bytes!("../testdata/reading-losses/book-z.xlsb"); if report.skipped != 0 || native.zm_dropped != height || if height { report.messages.len() != 1 || !report.messages[0].contains("Z or M") } else { !report.messages.is_empty() } @@ -670,13 +706,15 @@ fn read(dir: &std::path::Path, file: &str, content: &[u8], beside: &[(&str, Vec< } check_shapefile_xy(&s.map().layers[0].dataset, content.get(32).copied())?; } - if file.ends_with(".xlsx") || file.ends_with(".ods") { + if rustgis_engine::data::sheets::is_sheet_name(file) { if s.map().layers.len() != 1 || !s.project.tables.is_empty() { return Err(std::io::Error::other("spreadsheet fixture didn't add exactly one layer")); } check_workbook(&s.map().layers[0].dataset)?; if (content == include_bytes!("../testdata/reading-losses/book-clean.xlsx") - || content == include_bytes!("../testdata/reading-losses/book-clean.ods")) + || content == include_bytes!("../testdata/reading-losses/book-clean.ods") + || content == include_bytes!("../testdata/reading-losses/book-clean.xls") + || content == include_bytes!("../testdata/reading-losses/book-clean.xlsb")) && !s.notices_since(mark).is_empty() { return Err(std::io::Error::other("clean spreadsheet fixture gave a notice")); From 5d7a50b939bcb95fd343b4ade0a30ddda6d195a9 Mon Sep 17 00:00:00 2001 From: mavrick Date: Thu, 19 Nov 2026 15:05:41 -0600 Subject: [PATCH 2/3] docs(engine): clarify XLSB fixture provenance and short-cell gap --- ATTRIBUTION.md | 2 +- ROADMAP.md | 4 +++- crates/engine/testdata/reading-losses/README.md | 15 ++++++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 821bb57951..d0962f4562 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -20,7 +20,7 @@ of use. | Shapefile Z/M reader-loss fixtures (`crates/engine/testdata/reading-losses/shp-*`) | The RustGIS project: independently encoded, made-up point and line records following the published Shapefile specification; byte layout in [SHAPEFILE.md](crates/engine/testdata/reading-losses/SHAPEFILE.md) | Apache-2.0 | | XLSX reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xlsx`) | The RustGIS project: made-up one-row workbooks, encoded as Office Open XML with Python standard-library ZIP/XML writing; [fixture notes](crates/engine/testdata/reading-losses/README.md#xlsx) describe their contents | Apache-2.0 | | ODS reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.ods`) | The RustGIS project: made-up one-row OpenDocument workbooks, independently encoded with Python standard-library ZIP/XML writing; [fixture notes](crates/engine/testdata/reading-losses/README.md#ods) describe their contents | Apache-2.0 | -| XLS/XLSB reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xls`, `book-*.xlsb`) | The RustGIS project: made-up one-row workbooks generated offline with SheetJS CE 0.18.5, with unused XLSB package parts removed; [fixture notes](crates/engine/testdata/reading-losses/README.md#xls-and-xlsb) describe contents and checks | Apache-2.0 | +| XLS/XLSB reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xls`, `book-*.xlsb`) | The RustGIS project: made-up one-row workbooks generated offline with SheetJS CE 0.18.5; XLSB package parts were minimized and short cell records independently re-encoded to the published full-cell layout; [fixture notes](crates/engine/testdata/reading-losses/README.md#xls-and-xlsb) describe contents and checks | Apache-2.0 | | OSM PBF ring-loss fixtures (`crates/engine/testdata/reading-losses/hole-*.osm.pbf`) | The RustGIS project: independently encoded, made-up nodes, ways and relation from the published OSM PBF schema; contents and checksums in [OSM.md](crates/engine/testdata/reading-losses/OSM.md) | Apache-2.0 | | Interface themes (`crates/ui-egui/themes/light.json`, `dark.json`) | The RustGIS project | Apache-2.0 | | Sample data (`countries`, `cities`, `rivers`, `lakes` GeoJSON), embedded at build time from [rustgis-assets](https://github.com/opengeos/rustgis-assets/tree/main/data) | Natural Earth 1:110m, attributes trimmed | Public domain | diff --git a/ROADMAP.md b/ROADMAP.md index 8ed57cdda0..178f2f4da8 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -73,7 +73,9 @@ A result is right, or RustGIS says what it lost or assumed nodes or ways the file doesn't hold, and inner rings outside every outer one; and the text readers' losses listed as `Silent` in `crates/engine/tests/never_silent_reading.rs`, among them each vertex's Z in DXF and unreadable coordinates, holes and parts in KML, GeoRSS, MapInfo and - DXF, plus geometry-collection members in XLSX/ODS/XLS/XLSB and error-valued attribute cells in XLSX. A fix makes + DXF, plus geometry-collection members in XLSX/ODS/XLS/XLSB, error-valued attribute cells in XLSX, + and attribute fields/values in XLSB short-cell workbooks (the original SheetJS 0.18.5 clean + workbook retains its point but no attributes, without a notice). A fix makes its case `Said` _(open)_. - Lossy sample files in `never_silent_reading.rs` for the readers it doesn't cover yet: remaining distinct loss families and parser paths (see the finite diff --git a/crates/engine/testdata/reading-losses/README.md b/crates/engine/testdata/reading-losses/README.md index fe6a62ac5c..2b82bdc1a3 100644 --- a/crates/engine/testdata/reading-losses/README.md +++ b/crates/engine/testdata/reading-losses/README.md @@ -107,10 +107,18 @@ remove the unused theme, document properties and sheet metadata. ZIP timestamps 1980-01-01. The generated XLSB short string/RK cell records were re-encoded as full `BrtCellSt`/`BrtCellRk` records with explicit column indexes, following the published [MS-XLSB Cell layout](https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-xlsb/1e3e0c46-6175-4123-b02b-903643a5cc07). -The writer's undocumented short forms are not read by the current XLSB parser; -these fixtures use the published full records and do not test short-form fidelity. +These fixtures use the published full records and do not test short-form fidelity. +As an independent check of the rewritten contents, SheetJS CE 0.18.5's `readFile` +and `sheet_to_json` read all six committed XLS/XLSB workbooks back to the documented +headers, WKT and numeric ID. This check uses a parser independent of RustGIS. No macros, formulas or external links are included. +The original, unmodified SheetJS 0.18.5 clean XLSB is a known reader gap: native +`sheets::read` retains `POINT(1 2)` but returns no attribute fields or values, +including the source `id=7`, with zero skipped rows and no messages. Its short +cell records are not covered by the full-record fixture pairs; this observed +silent attribute loss is tracked below and in the roadmap. + | Files (both `.xls` and `.xlsb`) | WKT | Current loss classification | | --- | --- | --- | | `book-clean` | `POINT(1 2)` | None; no native or command notice | @@ -152,7 +160,8 @@ but not covered here, not necessarily a known bug. CRS assumptions remain separa | GeoPackage / FlatGeobuf / GeoParquet / FileGDB (distinct readers) | Z in each | M, members/parts/curves where supported, attributes | | LAS/LAZ | None in this paired corpus | Sampling, dimensions/attributes; geometry members/holes inapplicable | | XLSX | WKT Z/members, error-valued attribute | M, other geometry, dates/formulas/names/encoding | -| ODS / XLS / XLSB (distinct workbook parsers) | WKT Z/members in each | M, other geometry, dates/errors/names/encoding | +| ODS / XLS (distinct workbook parsers) | WKT Z/members in each | M, other geometry, dates/errors/names/encoding | +| XLSB | WKT Z/members with full cell records | Known silent loss: original SheetJS 0.18.5 short-cell clean workbook keeps the point but loses all attribute fields/values without a notice; M, other geometry, dates/errors/names/encoding remain gaps | | XLSM | Shared XLSX OOXML implementation only | No distinct fixture; macros and macro fidelity untested | | Generic ZIP | Delegates to inner readers; KMZ covered above | Other wrapper parity | From b493947a968f40b24291faaf8d901079bdcbc4ca Mon Sep 17 00:00:00 2001 From: mavrick Date: Thu, 19 Nov 2026 15:46:55 -0600 Subject: [PATCH 3/3] test(engine): pin XLSB short-cell attribute loss --- ATTRIBUTION.md | 2 +- .../engine/testdata/reading-losses/README.md | 25 +++++++++-------- .../testdata/reading-losses/book-short.xlsb | Bin 0 -> 1727 bytes crates/engine/tests/never_silent_reading.rs | 26 ++++++++++++------ 4 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 crates/engine/testdata/reading-losses/book-short.xlsb diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index d0962f4562..1249ddb374 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -20,7 +20,7 @@ of use. | Shapefile Z/M reader-loss fixtures (`crates/engine/testdata/reading-losses/shp-*`) | The RustGIS project: independently encoded, made-up point and line records following the published Shapefile specification; byte layout in [SHAPEFILE.md](crates/engine/testdata/reading-losses/SHAPEFILE.md) | Apache-2.0 | | XLSX reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xlsx`) | The RustGIS project: made-up one-row workbooks, encoded as Office Open XML with Python standard-library ZIP/XML writing; [fixture notes](crates/engine/testdata/reading-losses/README.md#xlsx) describe their contents | Apache-2.0 | | ODS reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.ods`) | The RustGIS project: made-up one-row OpenDocument workbooks, independently encoded with Python standard-library ZIP/XML writing; [fixture notes](crates/engine/testdata/reading-losses/README.md#ods) describe their contents | Apache-2.0 | -| XLS/XLSB reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xls`, `book-*.xlsb`) | The RustGIS project: made-up one-row workbooks generated offline with SheetJS CE 0.18.5; XLSB package parts were minimized and short cell records independently re-encoded to the published full-cell layout; [fixture notes](crates/engine/testdata/reading-losses/README.md#xls-and-xlsb) describe contents and checks | Apache-2.0 | +| XLS/XLSB reader-loss fixtures (`crates/engine/testdata/reading-losses/book-*.xls`, `book-*.xlsb`) | The RustGIS project: made-up one-row workbooks generated offline with SheetJS CE 0.18.5; XLSB package parts were minimized; except in `book-short.xlsb`, short cell records were independently re-encoded to the published full-cell layout; [fixture notes](crates/engine/testdata/reading-losses/README.md#xls-and-xlsb) describe contents and checks | Apache-2.0 | | OSM PBF ring-loss fixtures (`crates/engine/testdata/reading-losses/hole-*.osm.pbf`) | The RustGIS project: independently encoded, made-up nodes, ways and relation from the published OSM PBF schema; contents and checksums in [OSM.md](crates/engine/testdata/reading-losses/OSM.md) | Apache-2.0 | | Interface themes (`crates/ui-egui/themes/light.json`, `dark.json`) | The RustGIS project | Apache-2.0 | | Sample data (`countries`, `cities`, `rivers`, `lakes` GeoJSON), embedded at build time from [rustgis-assets](https://github.com/opengeos/rustgis-assets/tree/main/data) | Natural Earth 1:110m, attributes trimmed | Public domain | diff --git a/crates/engine/testdata/reading-losses/README.md b/crates/engine/testdata/reading-losses/README.md index 2b82bdc1a3..796d8d14cd 100644 --- a/crates/engine/testdata/reading-losses/README.md +++ b/crates/engine/testdata/reading-losses/README.md @@ -93,7 +93,7 @@ not certify ODS completeness or cover malformed archives, formulas, dates or err ## XLS and XLSB -Six made-up workbooks written offline with SheetJS Community Edition `xlsx` 0.18.5: +Seven made-up workbooks written offline with SheetJS Community Edition `xlsx` 0.18.5: `utils.aoa_to_sheet([['wkt','id','note'],[wkt,7]])`, appended as `Places`, then `writeFile` with `bookType: 'biff8'` (XLS) or `'xlsb'` and compression enabled. The writer is independent of RustGIS and is not needed by tests. No writer code or @@ -104,28 +104,31 @@ XLS files retain the writer's small compound container. XLSB archives were minim offline with Python's standard-library `zipfile`: retain workbook, worksheet and style binary parts, replace package relationships/content types with only those parts, and remove the unused theme, document properties and sheet metadata. ZIP timestamps are -1980-01-01. The generated XLSB short string/RK cell records were re-encoded as +1980-01-01. Except in `book-short.xlsb`, the generated XLSB short string/RK cell +records were re-encoded as full `BrtCellSt`/`BrtCellRk` records with explicit column indexes, following the published [MS-XLSB Cell layout](https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-xlsb/1e3e0c46-6175-4123-b02b-903643a5cc07). -These fixtures use the published full records and do not test short-form fidelity. -As an independent check of the rewritten contents, SheetJS CE 0.18.5's `readFile` -and `sheet_to_json` read all six committed XLS/XLSB workbooks back to the documented +`book-short.xlsb` preserves the original worksheet records and tests the short-cell loss. +As a check independent of the handwritten full-cell rewrite, SheetJS CE 0.18.5's `readFile` +and `sheet_to_json` read all seven committed XLS/XLSB workbooks back to the documented headers, WKT and numeric ID. This check uses a parser independent of RustGIS. No macros, formulas or external links are included. -The original, unmodified SheetJS 0.18.5 clean XLSB is a known reader gap: native +The original SheetJS 0.18.5 short-cell worksheet, retained in `book-short.xlsb`, +pins a known reader gap: native `sheets::read` retains `POINT(1 2)` but returns no attribute fields or values, including the source `id=7`, with zero skipped rows and no messages. Its short -cell records are not covered by the full-record fixture pairs; this observed -silent attribute loss is tracked below and in the roadmap. +cell records are paired with the full-record `book-clean.xlsb`; both native and +command imports must retain exactly the point with no attribute fields/values or notices. -| Files (both `.xls` and `.xlsb`) | WKT | Current loss classification | +| Files (`.xls` and `.xlsb` unless stated) | WKT | Current loss classification | | --- | --- | --- | | `book-clean` | `POINT(1 2)` | None; no native or command notice | | `book-z` | `POINT Z(1 2 3)` | Imports with a Z/M-loss notice | | `book-collection` | `GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))` | Silent: only the first member remains | +| `book-short.xlsb` (paired with `book-clean.xlsb`) | `POINT(1 2)` | Silent: all attribute fields and values are lost | -Both members of each pair must retain exactly one point at (1, 2), integer `id=7`, +The height/member pairs must retain exactly one point at (1, 2), integer `id=7`, text `note=Null` and both field names/types, through `sheets::read` and `layer.addData`. Native checks require zero skipped rows, the expected height flag and exactly one Z/M message for the height variant (none otherwise). Valid lossy fixtures must import. @@ -161,7 +164,7 @@ but not covered here, not necessarily a known bug. CRS assumptions remain separa | LAS/LAZ | None in this paired corpus | Sampling, dimensions/attributes; geometry members/holes inapplicable | | XLSX | WKT Z/members, error-valued attribute | M, other geometry, dates/formulas/names/encoding | | ODS / XLS (distinct workbook parsers) | WKT Z/members in each | M, other geometry, dates/errors/names/encoding | -| XLSB | WKT Z/members with full cell records | Known silent loss: original SheetJS 0.18.5 short-cell clean workbook keeps the point but loses all attribute fields/values without a notice; M, other geometry, dates/errors/names/encoding remain gaps | +| XLSB | WKT Z/members with full cell records; short-cell attribute loss | Pinned silent short-cell loss; M, other geometry, dates/errors/names/encoding remain gaps | | XLSM | Shared XLSX OOXML implementation only | No distinct fixture; macros and macro fidelity untested | | Generic ZIP | Delegates to inner readers; KMZ covered above | Other wrapper parity | diff --git a/crates/engine/testdata/reading-losses/book-short.xlsb b/crates/engine/testdata/reading-losses/book-short.xlsb new file mode 100644 index 0000000000000000000000000000000000000000..1503b93d98c369179d3d371d9dfc62cd1558a79e GIT binary patch literal 1727 zcmWIWW@Zs#U|`??Vnv2$h36d#fvnX)%n!sBIr`=KMcGOD`Pq6&nR(f1DH#c0k{y`e zILMrtaBu=wiz-i?gPC-|kp{>9gA)!idCW@s5ZO>u%%;p{tT6B73MS(Y_73L;wp1e# z;}+v5#v+C(#wv_2YZUIDKViVWXp&%uBb$g}h0zj*UKUBY0}~EUI5B~z#KG_|i(8wR z8yiCaitE-$pFhzFbQJ?51A_#@b;TK}sU^kwV9F5e%#@TFhcpf_u=MZ<9AG)JwufhK zPf_s<$qNo#Lc6;sF6^C{s1z_;#pgt$;8__n#Tg65(5yXcOyMff;XO*YNoE@Sr*Wq-7lMbD*<%m>3v%A!xLe#w%a;74yHW2^msxTcIh>R z7(C_UJ{;WP{-x*Sg?~M*4~1QJ?>q4S|B9mdkrHu-o?Q64Hz~1#ccL)^t37kaQMMy> zJUSr)J=uDXI+_1^h;b%x&LYq*Vm%(ZAj^KvI7_KYX zoMEC2Po^^ZY9Cy9s^y`+@!=9R^a$M>QgCM)FeF%k5y}mu-tM)7$piG9tyazBhh=0gC?`d1;5K-M{nO=Dj}|S-+$lq@a?O%}nL^%<@swqiB0o z_8OqGTY=7(f|xRGDmdJiK2b0PcicusWor;c;r&6>cP^UI&KHA#~PZ&a=Ev* z==B(>Nm_jf`nt(E;^|MeL*~urXRgU(;V%s?D4S#R?@(E8w#d7=R{a@|omgUGUwA4X zW0|_}u*Q$uN)_acb@q*KUKqz`O@-}!TTR2etYnW57m!LB)+FS1N!X^(2v4E zI@&ouuOv0EBtE3FAhkGFuOc^R>O||j!v;KU>yt8cbu1;VM79|(iM-9Xmtn2J#>Bk} zMk{N7U-G-S(7DTp>8rgR=bG}#=7|aXpH+7qee7 zOcZ!3vYCCF;e1~v>qC-fx2>Aj+uLYZaMHUy>vg!z!J~zRGoJi%JNd#x^!Mz-L{qMy zqGndHyD^79@-O|PnBloj?p3>se^S7*wfCR?th7k_$T;)<0q?mp=ltxde3K+oYTiO;2bNAq`4C+rdYVUQ)MEzQi6aM~n}eRN5atN6U`=HK-mGjOMQlI_3S&)H G5Dx$sSxxZ( literal 0 HcmV?d00001 diff --git a/crates/engine/tests/never_silent_reading.rs b/crates/engine/tests/never_silent_reading.rs index ac61108e37..34c62110bb 100644 --- a/crates/engine/tests/never_silent_reading.rs +++ b/crates/engine/tests/never_silent_reading.rs @@ -418,6 +418,13 @@ fn cases(fixture_dir: &std::path::Path) -> Vec { include_bytes!("../testdata/reading-losses/book-z.xlsb"), Imported("Z or M"), ), + case( + "XLSB: short cell records lose attribute fields and values", + "a.xlsb", + include_bytes!("../testdata/reading-losses/book-clean.xlsb"), + include_bytes!("../testdata/reading-losses/book-short.xlsb"), + Silent("the point remains but all attribute fields and values are lost"), + ), case( "XLSB: a WKT geometry collection's later members", "a.xlsb", @@ -609,18 +616,20 @@ fn check_shapefile_xy(ds: &rustgis_engine::data::Dataset, shape_type: Option Ok(()) } -/// All workbook variants retain the same point, row ID and two attribute columns. The -/// error-cell fixture differs from an empty note only in source content, not retained data. -fn check_workbook(ds: &rustgis_engine::data::Dataset) -> std::io::Result<()> { +/// Workbooks retain the point and two attributes except the pinned XLSB short-cell loss, +/// which retains the point but drops every attribute field and value. +fn check_workbook(ds: &rustgis_engine::data::Dataset, short_cells: bool) -> std::io::Result<()> { use rustgis_engine::data::{Field, FieldType, Geometry, Value}; use rustgis_engine::geom::Coord; - if ds.fields != vec![Field::new("id", FieldType::Integer), Field::new("note", FieldType::Text)] + let fields = if short_cells { vec![] } else { vec![Field::new("id", FieldType::Integer), Field::new("note", FieldType::Text)] }; + let attrs = if short_cells { vec![] } else { vec![Value::Int(7), Value::Null] }; + if ds.fields != fields || ds.features.len() != 1 || ds.features[0].geometry != Some(Geometry::Point(Coord::new(1.0, 2.0))) - || ds.features[0].attrs != vec![Value::Int(7), Value::Null] + || ds.features[0].attrs != attrs { return Err(std::io::Error::other(format!( - "spreadsheet fixture didn't retain exactly its point, ID and null note: fields={:?}, features={:?}", + "spreadsheet fixture has unexpected retained data: fields={:?}, features={:?}", ds.fields, ds.features ))); } @@ -643,6 +652,7 @@ fn read(dir: &std::path::Path, file: &str, content: &[u8], beside: &[(&str, Vec< std::fs::write(dir.join(name), bytes)?; } let path = dir.join(file); + let short_cells = content == include_bytes!("../testdata/reading-losses/book-short.xlsb"); if file.ends_with(".gdb") { // The archive is fixture storage only: RustGIS opens the extracted folder. Its ZIP // importer deliberately refuses FileGDB folders, so do not test that refusal as a loss. @@ -680,7 +690,7 @@ fn read(dir: &std::path::Path, file: &str, content: &[u8], beside: &[(&str, Vec< if rustgis_engine::data::sheets::is_sheet_name(file) { let (native, report) = rustgis_engine::data::sheets::read(content, "a", None, &Default::default()) .map_err(|e| std::io::Error::other(format!("native spreadsheet fixture: {e}")))?; - check_workbook(&native)?; + check_workbook(&native, short_cells)?; let height = content == include_bytes!("../testdata/reading-losses/book-z.xlsx") || content == include_bytes!("../testdata/reading-losses/book-z.ods") || content == include_bytes!("../testdata/reading-losses/book-z.xls") @@ -710,7 +720,7 @@ fn read(dir: &std::path::Path, file: &str, content: &[u8], beside: &[(&str, Vec< if s.map().layers.len() != 1 || !s.project.tables.is_empty() { return Err(std::io::Error::other("spreadsheet fixture didn't add exactly one layer")); } - check_workbook(&s.map().layers[0].dataset)?; + check_workbook(&s.map().layers[0].dataset, short_cells)?; if (content == include_bytes!("../testdata/reading-losses/book-clean.xlsx") || content == include_bytes!("../testdata/reading-losses/book-clean.ods") || content == include_bytes!("../testdata/reading-losses/book-clean.xls")