Repository navigation
Conversation
…, apps/web) src/core becomes @cityjson/cjconv-core, unchanged; the website moves to apps/web and imports it by package name. packages/cjconv holds the native DuckDB engine and the integration tests, ready for the CLI. Shared lint/format config stays at the root, with the no-React/DuckDB/Node rule now on packages/core. docs/cli.md is the plan.
@cityjson/cjconv converts between CityJSON, CityJSONSeq, FlatCityBuf, CityParquet
packages and OBJ natively with @duckdb/node-api and the community cityjson extension:
cjconv <input> <output> [--to --from --lod --attributes --no-attributes
--obj-lod --crs --extension --force]
cjconv info <input> [--json]
convertFile() and inspectFile() are the library API the CLI wraps. Inputs are local
files, package directories or URLs; the output format comes from the output name
(a trailing / is a package). Existing outputs are kept unless --force; unknown LoDs
and attributes are named; OBJ reports when the extension build predates it.
Core: inspect() reports the object count, and an OBJ COPY returns only the files it
wrote (the .obj, its .mtl and what appeared), not its whole directory. The Node engine
returns BIGINT as number, as the Engine contract says. CI packs both packages and
runs the built CLI; the deploy builds apps/web.
A new Source kind, merge, takes several files (CityJSON, CityJSONSeq, FlatCityBuf, OBJ) and exports them as one: a single COPY over all of them by column name, or for a CityParquet package the extension's insert_* pragmas, one input after another. It refuses, before writing, what would need a guess: an id in more than one input, a column typed differently between inputs, different CRSs, and materials/textures across inputs (their ids are per file). A column only some inputs have is NULL in the rest. cjconv takes several inputs before the output (cjconv a b c out.fcb), and info summarises them together; convertFile/inspectFile accept string[]. The website merges when several CityJSON-family files are dropped at once.
publish.yml (manual, from main): choose patch/minor/major (or a dry run); it checks and tests the packages, bumps @cityjson/cjconv-core and @cityjson/cjconv to one new version (scripts/bump-version.mjs), builds, publishes with provenance, then pushes a `release: vX.Y.Z` commit and tag to main and merges it back into develop. release.yml runs when that succeeds: it takes the latest version on npm and creates its GitHub release with generated notes and both tarballs. A version that already has a release is skipped, so a dry run creates nothing. It can also be run by hand. The packages start at 0.0.0, so the first `minor` publishes 0.1.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
packages/core(@cityjson/cjconv-core),packages/cjconv(@cityjson/cjconv, thecjconvCLI),apps/webcjconvCLI and Node library (convertFile/inspectFile)Publish to npm(workflow dispatch: patch/minor/major, dry run) andrelease(GitHub release after a successful publish)CI on develop passed.