@ohos-ports/loaders.gl-gis
v4.5.4-beta.0
Published
Helpers for GIS category data (HarmonyOS port of @loaders.gl/[email protected] with BinaryWriter/TWKB encode fixes)
Readme
@loaders.gl/gis
This module contains helper classes for the GIS category of loaders.
loaders.gl is a collection of framework-independent visualization-focused loaders (parsers).
HarmonyOS Port (@ohos-ports/loaders.gl-gis)
This package is a port of @loaders.gl/gis v4.5.4 published under
the @ohos-ports organization for the HarmonyOS / OpenHarmony Node.js ecosystem.
Fixes carried on top of upstream v4.5.4
- BinaryWriter._ensureSize() resize bug: after resizing
this.arrayBuffer, the stalethis.dataView(created against the old, possibly 0-byte buffer) was not rebuilt, causingRangeError: Offset is outside the bounds of the DataViewon the first write ofTWKBWriter.encode/encodeSync. Fixed by rebuildingthis.dataViewafter the resize. - writeTwkbPoint argument order bug: the Polygon / MultiPoint / MultiLineString /
MultiPolygon TWKB encoders passed
(previousPoint, point)instead of(point, previousPoint), which mutated the caller's geometry coordinates to[0,0,0,0]and encoded negated coordinate deltas. Fixed by restoring the correct argument order at the 4 call sites.
Both fixes are applied to the ESM output (dist/lib/**), the CJS bundle (dist/index.cjs) and the
shipped TypeScript sources (src/lib/**). Verified by 67/67 tests including TWKB encode/decode
roundtrips.
