Skip to content

Specification of the JSON structure#19

Open
javagl wants to merge 1 commit intomainfrom
layer-json-specification
Open

Specification of the JSON structure#19
javagl wants to merge 1 commit intomainfrom
layer-json-specification

Conversation

@javagl
Copy link
Copy Markdown

@javagl javagl commented Mar 24, 2026

Fixes #15 , which has been open in one of my tabs for 5 years, and accumulated 10 👍 's in the meantime.

This is a first attempt to add a proper specification of the layer.json structure. As discussed in the issue, people have largely been reverse-engineering this information from the implementation. This is error-prone and involves too many guesses and assumptions.

The current state of this PR is certainly still not perfect in that regard. It only contains what I could derive from the implementation, links that had been posted in the issue, and the discussion that happened there. But maybe it is a reasonable first step for a proper specification.

Tagging some people who participated in the issue dicussion:

@lilleyse
@kring (the schema here is largely copied from https://github.com/CesiumGS/cesium-native/blob/a42b513f05de5d2700ca1394985a622bca164184/CesiumQuantizedMeshTerrain/schema/layer.schema.json )
@gkjohnson

Copy link
Copy Markdown

@gkjohnson gkjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thanks for adding it.

I would also include a section discussing what to do regarding tile gaps. If "parentUrl" plays a role in filling those that would be good to call out but I know Cesium and 3DTilesRendererJS also split the parent tile into quadrants to fill gaps if only a portion of the more detailed child tiles are available.

| scheme | `string` | The tiling scheme. The only valid value is `"tms"`. | No. Default: `"tms"` |
| extensions | `string[]` | The extensions available for this tileset. | No. Default: `undefined` |
| projection | `string` | The map projection of this tileset. Valid values are `"EPSG:4326"` and `"EPSG:3857"`. | No. Default: `"EPSG:4326"` |
| parentUrl | `string` | The URL of the parent layer.json that this one is layered on top of. | No. Default: `undefined` |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expand on what "parentUrl" means here. I assume this may just be being used to fill out tile gaps in the current layer.json?

Also is this used frequently? It's not supported in 3d tiles renderer at the moment.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parentUrl description was taken from the schema. You asked about that in an issue comment as well, but no response so far. I had a look at the layer.json from Cesium World Terrain. It wasn't used there. I'll try to reverse engineer where and how this is used in CesiumJS/native. Sure, that's not ideal and time-consuming, but ... it's better when one person is doing it once and writing it up in an "agreed upon" form, than dozens of people spending time with that (and in the worst case, coming to different conclusions...)

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.

Specify the JSON structure

2 participants