Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend and document createTilesetJson #105

Merged
merged 2 commits into from
Mar 11, 2024
Merged

Conversation

javagl
Copy link
Contributor

@javagl javagl commented Feb 27, 2024

Fixes #104

The createTilesetJson function was not documented in the main README.md. This is now added here.

Additionally, the command is extended to receive a position for the generated tileset. The position is passed as cartographicPositionDegrees to the command, which can be a 2- or 3-element array that contains the longitudeDeg, latitudeDeg, <heightMeters> that should be used for the root transform of the generated tileset. For example:

npx ts-node ./src/cli/main.ts createTilesetJson -i ./temp/ -o ./temp/tileset.json --cartographicPositionDegrees 
-75.152 39.94 123.0

I hesitated a bit with the exact format. Passing around an number[] array feels a bit awkward, because you never know its length. Alternatives like --longitudeDegrees 75 --latitudeDegrees 39 --heightMeters 123 would be pretty inconvenient, and there's no way to model the constraint that the first two parameters are required (together), and the last one is optional. So I think that the current solution is a reasonable middle ground...

@lilleyse lilleyse merged commit 554e2fd into main Mar 11, 2024
2 checks passed
@lilleyse lilleyse deleted the extend-create-tileset-json branch March 11, 2024 13:43
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.

Document and extend the functionality of createTilesetJson
2 participants