Skip to content

meshcity 1.1.0

Choose a tag to compare

@Longado Longado released this 05 Nov 01:15
· 2 commits to main since this release

Upgrade from 1.0. In Draco-compressed 3D Tiles, 1.0 gave parts of some buildings to their neighbours (in the Bern example 34 buildings were merged into others and roofs were off by up to 30 m). 1.1 fixes this, records where the cut sits on the globe (--tileset puts it back in CesiumJS, ArcGIS or QGIS), and adds a Python API.

uv tool install git+https://github.com/Longado/meshcity@v1.1.0

Fixed

  • Buildings split correctly in Draco-compressed 3D Tiles. Draco can store batch ids as quantized floats
    (10 arrives as 9.9963); they were truncated, so part of a building went to its neighbour. In the Bern
    example 34 buildings had been merged into others and roofs were off by up to 30 m; now 257 buildings,
    every roof top within 5 mm of swisstopo's own DACH_MAX.
  • Metadata noData values are now empty instead of being passed on as numbers (3DBAG used 2147483647
    storeys and 3.4e38 m). scale, offset, normalized, enums and booleans are read as the
    EXT_structural_metadata spec says; properties of types not read yet are named in a note.
  • NaN and infinite attribute values no longer produce an invalid GLB.
  • Objects without a name no longer share names when tiles in different folders have the same file name.
  • --radius is measured on the ellipsoid; before, the box was up to 1 % off in latitude.
  • Areas across the 180° meridian, reversed or out-of-range boxes, non-positive radius and malformed
    numbers are refused with a one-line message instead of being accepted or crashing.
  • One tile that cannot be downloaded no longer stops the cut: it is left out with a note.
  • Concurrent downloads of the same file no longer race on the cache's temporary file.
  • Output files are written atomically, and a missing output folder is reported before downloading.
  • Requires DracoPy 1.7 or later: older versions do not expose the decoded attributes, so every Draco file failed.

Added

  • The GLB records where it sits: origin, height of y = 0, ECEF transform, area and sources (scene extras
    meshcity), plus asset.copyright when the source provides one.
  • --tileset out.tileset.json writes a 3D Tiles tileset that puts the GLB back in place in CesiumJS,
    ArcGIS or QGIS.
  • --keep-heights keeps the source's heights.
  • One group node per source when several layers are cut together, and a layer column in the CSV.
  • I3S: the object id field is always fetched, so every object can be joined back to its source. Heights
    given in feet are converted, and each layer's height system is recorded.
  • A tileset.json on disk can be read in place of a URL. GLBs whose nodes are one object each (including
    meshcity's own output) are read object by object.
  • meshcity --version.
  • A Python API: from meshcity import Area, extract. Library code raises MeshcityError (with AreaError and
    FetchError as subclasses) instead of exiting the process.
  • A live tiles done / total line on the terminal while downloading.
  • --refresh downloads again instead of using the cache; the cache honours XDG_CACHE_HOME.
  • meshcity discover reports a page it cannot read instead of printing nothing.
  • PyPI metadata, a GitHub Actions test matrix (Linux, macOS, Windows; Python 3.10 and 3.13; lowest
    dependency versions), ruff config, CONTRIBUTING.md.
  • scripts/check_against_attributes.py, and a "How accurate" section in the README.
  • The Godot example puts its fallback ground under the road surfaces when the cut has roads.

Changed

  • The CSV has a layer column after object, and nested values are written as JSON.
  • Unnamed objects from z/x/y tile layouts are named with their folder too (Bern: 672_1167_10).
  • The README examples changed with the fixes above: Tokyo 69 objects (the box is 0.3 % smaller north to
    south), Bern 257.
  • Every GLB has one group node per source above the object nodes.