Skip to content

Add GeoPackage export support - #144

Merged
balazsdukai merged 41 commits into
developfrom
tyler-106
Jul 25, 2026
Merged

Add GeoPackage export support#144
balazsdukai merged 41 commits into
developfrom
tyler-106

Conversation

@balazsdukai

@balazsdukai balazsdukai commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Adds GeoPackage output to cjconvert and Tyler.

The export groups features by CityObject type and CityJSON geometry type. For example:

  • building_multisurface: id, cityobject_id, cityobject_type, geometry_type, lod, geom, and projected fields such as attributes__name.
  • buildingpart_multisurface: the same standard fields, with fields inferred specifically for BuildingPart objects.
  • With LoD splitting enabled, a layer may be named building_multisurface_lod2.

Layer names are lowercased and sanitized for use as GeoPackage table names. Each CityJSON geometry becomes one row in the matching layer. Coordinates use the EPSG reference system declared by the source data. Opt
ional layers and tables can include addresses, semantics, and object relationships.

Tyler writes one GeoPackage under t/<level>/<x>/<y>.gpkg for each non-empty tile. It also writes a global metadata.gpkg at the output root. Its spatial metadata layer contains one row for every successfully
written tile and links the tiled dataset together through:

  • tile_id: the tile’s quadtree identifier.
  • content_path: the relative path to its .gpkg file.
  • geographical_extent: the tile’s spatial extent.
  • Additional columns projected from the source CityJSON metadata.

Only written tiles are included, so the global metadata does not point to skipped or failed outputs. Metadata aggregation is always enabled for tiled GeoPackage exports.

The tile export pipeline now records an explicit result for every job:

  • Written: the tile output was created successfully.
  • Skipped: the job contained no features, so no output was needed.
  • Failed: preparing or writing the tile returned an error.

This replaces the previous behavior where empty jobs could be treated as successful implicitly. Tyler reports totals for all three outcomes, uses written results for global metadata, and stores the outcomes in de
bug snapshots for later replay. Older debug snapshots are not compatible with the new result format.

The change also aligns GeoPackage and TSV tabular output and adds documentation and automated tests.

@balazsdukai balazsdukai changed the title tyler-106 Add GeoPackage export support Jul 25, 2026
@balazsdukai
balazsdukai merged commit d6cba0b into develop Jul 25, 2026
6 checks passed
@balazsdukai
balazsdukai deleted the tyler-106 branch July 25, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant