Open mpickering opened 4 years ago
Hm, yes this definitely looks like the symbol record has been read from the wrong offset, for some reason. As you say, the lineWidth
is strange, and also there is no system in the coordinates, also the coordinates flags look weird.
Can't say that I have found anything like this before, at some point I have encountered symbols with negative number of coordinates (https://github.com/perliedman/ocad2geojson/blob/981a1bb9927c86b58eedee5909914f07c61ab852/src/ocad-reader/symbol-element.js#L24), but the other properties looked more or less sane in that case, IIRC. Still, the fact that you found another case of incorrect symbol element might indicate there is something wrong with how they are read from the file. One idea could be to add some error handling and see if ignoring this error makes the map render incorrectly.
In a few places we currently have code like this: https://github.com/perliedman/ocad2geojson/blob/65898cf00ad788f3f714018a467fe35bfabc6cba/src/ocad-reader/point-symbol.js#L22 - IIRC, I never managed to match that offset with the OCAD file format specification, but without it everything breaks.
I am observing a SymbolElement where the
type
is reported to be165
. My understanding is that the type should only be between 1-4 but I am wondering whether this is a problem with the ocad file parsing logic or a problem in my OCAD file. The object in question seems to have quite a few coordinates but thelineWidth
field also looks suspicious.I am also seeing SymbolElement where the type is reported to be 0.
It's coming from an OCAD 11 file.