Skip to content

Releases: gmpassos/geo_osm_pbf

Release list

v1.0.0

Choose a tag to compare

@gmpassos gmpassos released this 07 Sep 07:39
  • Initial release, extracted from geo_route_finder 1.0.3 so that the OSM
    acquisition and decoding layer can be shared with geo_tile_builder. The
    moved code is unchanged in behaviour; its tests moved with it.
  • Model:
    • GeoCoordinate (+ haversineMeters, equirectSquared,
      earthRadiusMeters), GeoNode, GeoWay — moved from geo_route_finder.
    • GeoTaggedNode (new): a node that carries tags of its own. Kept separate
      from GeoNode so that consumers reading only geometry never pay for a tag
      map across tens of millions of shape points.
    • GeoRelation, GeoMember, GeoMemberType (new): the third OSM element
      kind, with isMultipolygon, membersOf and membersWithRole helpers.
  • OsmPbfParser:
    • Moved from geo_route_finder, with the streaming, dependency-free
      hand-rolled protobuf decoding intact.
    • Added onTaggedNode: decodes the DenseNodes.keys_vals stream, which was
      previously skipped. Read only when the callback is supplied, so the
      routing path is unaffected.
    • Added onRelation and readRelations: decodes PrimitiveGroup field 4,
      undoing the delta encoding of member ids and resolving roles.
    • Added sparse (non-dense) Node decoding, previously skipped silently.
    • Added onHeader and readHeader, decoding the OSMHeader block —
      bounding box, required/optional features, writing program and source. The
      block was previously ignored entirely.
    • Added isOsmPbf, a cheap shape check on the first blob header.
  • OsmHeader, OsmBoundingBox (new): the header block, with
    unsupportedFeatures and isHistorical.
  • OsmDownloader.downloadRegion now verifies that what arrived is really an
    .osm.pbf, and deletes it (with its .dlmeta and .part) if not.
    • Why: a provider answers an unknown region path with 200 OK and an
      HTML page. That page has a correct Content-Length, so the existing size
      check accepted it, cached it on disk under the extract's name, and left a
      .dlmeta that a later resume would have tried to continue. The failure
      only surfaced later, far from its cause. Observed against Geofabrik.
    • downloadUrl stays content-agnostic; only the region path validates.
  • Download subsystem moved unchanged: OsmDownloader, OsmDownloadSource,
    OsmMirroredSource, OsmSourceResolver, OsmDownloadSourceRegistry,
    MirrorBenchmark, OsmPatternDownloadSource, and the Geofabrik, OSM France,
    BBBike and Planet sources.
  • Tests:
    • test/support.dart synthesizes a valid .osm.pbf in code — including
      tagged dense nodes, sparse nodes, relations and a header block — so no
      binary fixture is committed.
    • Covers tag/coordinate alignment across the keys_vals terminator, member
      id delta decoding, and non-ASCII tag values.