-
Hi everyone, I am trying to render binary geojson data, which I create with the While this the binary version of the geojson: I also created a CodePen for this: https://codepen.io/Flo-Flindt/pen/XWGMMWm Does anyone have a clue if this is related rather to deck.gl or to the Side Note: This only seems to be a problem on "diagonal" LineStrings. Straight vertical or horizontal coordinates don't seem to cause this issue. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Just found out the problem after further debugging: The used Float32Array for the coordinates, created by const f32 = new Float32Array(1)
const f64 = new Float64Array(1)
f32.set([4.3678157])
f64.set([4.3678157])
f32[0] // -> 4.3678154945373535
f64[0] // -> 4.3678157 This can be fixed by changing the position data type when creating the binary geojson via const binaryGeojson = geojsonToBinary(geojson.features, { PositionDataType: Float64Array }); |
Beta Was this translation helpful? Give feedback.
Just found out the problem after further debugging: The used Float32Array for the coordinates, created by
geojsonToBinary
, does not have enough precision for the coordinates used in my example:This can be fixed by changing the position data type when creating the binary geojson via
geojsonToBinary
: