With the new SPW spatial viewing in 5.3.x I noticed that there's a bug in the extraction of the XY locations in the InCellReader. I've uploaded 2 .xdce files that demonstrate the issue. There are 2 issues at play:
1) the index skips the first <offset_point> line so XY locations are only assigned to n-1 of the total number of locations/fields (easiest seen using my SMMART_Test_Plate_Template_SM3001_1_1.xdce file)
2) the extracted index is not correctly assigned to the appropriate field when the indexes are not in sequential order (see my LI9V01612_96ECM_1.xdce file). Instead it assumes sequential order after skipping the first <offset_point> entry.
I think the issue is with the chunk of code at line 1062 of InCellReader.java:
- Code: Select all
else if (qName.equals("offset_point")) {
String x = attributes.getValue("x");
String y = attributes.getValue("y");
Integer index = DataTools.parseInteger(attributes.getValue("index"));
if (null == index) {
index = offsetPointCounter++;
}
posX.put(index, new Length(Double.valueOf(x), UNITS.REFERENCEFRAME));
posY.put(index, new Length(Double.valueOf(y), UNITS.REFERENCEFRAME));
addGlobalMetaList("X position for position", x);
addGlobalMetaList("Y position for position", y);
}
but I don't understand the code well enough to be able to provide a fix and PR.
Cheers,
- Damir