Repository navigation
Minor Changes
-
c57704b: Much faster, lower-memory parsing for large LandXML files.
- New streaming parser: points and faces are read straight into typed arrays instead of converting the whole document to an object tree, and point ids resolve through a Map (previously a linear
indexOfper face vertex, quadratic overall). A 21 MB file now parses and contours in ~1 s instead of ~97 s, with less than half the memory. GLB and contour output is unchanged. - New building blocks for parsing once and building only what you need, with progress callbacks:
parseSurfaces,findCenter,surfaceToGlb,surfaceToContours, and theLandXmlSurfacetype. - Results now include
linearUnitfrom the file's<Units>(e.g."USSurveyFoot","meter"), andtoGlbresults includewktString. - XML entities in names and attributes are decoded; extra whitespace between point coordinates is tolerated; faces referencing missing points are skipped with a warning; surfaces without points are skipped with a warning.
- Fix:
surfaceId0now selects the first surface (it used to return all surfaces). - Breaking: removed the
precomputeSurfaceDataexport and itsPrecomputedSurfaceDatatype (no longer needed — useparseSurfaces+surfaceToGlb/surfaceToContours). Dropped thexml-jsandsaxdependencies.
- New streaming parser: points and faces are read straight into typed arrays instead of converting the whole document to an object tree, and point ids resolve through a Map (previously a linear