Skip to content

load Maxar feature properties as structural metadata#1402

Merged
j9liu merged 30 commits into
mainfrom
maxar-feature-properties
Jun 30, 2026
Merged

load Maxar feature properties as structural metadata#1402
j9liu merged 30 commits into
mainfrom
maxar-feature-properties

Conversation

@timoore

@timoore timoore commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Load the feature data in MAXAR_content_geojson tiles as EXT_structural_metadata, along with the accompanying schema.

This depends on #1396, so either merge it first or withdraw it.

This is marked as draft awaiting some tests and verification that the schema is complete.

@j9liu j9liu changed the base branch from main to maxar-geojson-schema June 24, 2026 13:25

@j9liu j9liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for opening this PR @timoore. Ultimately my concern is the correctness of the conversion, which is difficult to verify from reading alone. Unit tests would greatly help with that.

We should test some data in Unreal to ensure they work with metadata picking/styling.

Comment thread CesiumVectorData/include/CesiumVectorData/GltfConverter.h Outdated
Comment on lines +43 to +44
const CesiumGeospatial::Ellipsoid& ellipsoid,
const CesiumUtility::IntrusivePointer<CesiumGltf::Schema>& pSchema);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps pSchema should be optional (default nullptr) in case no schema is specified.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree, but I'm not sure what the optional behavior should be. If there's not schema, should we create one based on the features that are present and still give access to the metadata?

Comment thread CesiumVectorData/src/GltfConverter.cpp Outdated
Comment on lines +301 to +317
for (auto& [_, propRepVariant] : packedProps) {
if (auto* pPropRep =
std::get_if<StringPropertyRepresentation>(&propRepVariant)) {
pPropRep->offsets.back() = pPropRep->buffer.size();
// Patch up any missing data
size_t lastValidOffset = 0;
for (size_t& offset : pPropRep->offsets) {
if (offset == std::numeric_limits<size_t>::max()) {
offset = lastValidOffset;
} else {
lastValidOffset = offset;
}
}
metadataSize += pPropRep->buffer.size();
offsetsSize += pPropRep->offsets.size();
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we're going through and compacting the buffer data anyway to get its true size, it would be great if the offset type was downcasted from size_t to a smaller unsigned int when possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree, but I think it's barely in scope for the work I'm doing. I will look at doing that once the rest seems to working well.

Comment thread CesiumVectorData/src/GltfConverter.cpp Outdated
Comment thread CesiumVectorData/src/GltfConverter.cpp Outdated
@timoore timoore marked this pull request as ready for review June 26, 2026 04:19
Base automatically changed from maxar-geojson-schema to main June 29, 2026 14:13

@j9liu j9liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @timoore ! Just a few small comments:

Comment thread CesiumVectorData/test/TestGltfConverter.cpp Outdated
Comment thread CesiumVectorData/include/CesiumVectorData/GltfConverter.h
@j9liu j9liu linked an issue Jun 29, 2026 that may be closed by this pull request
pull Bot pushed a commit to djx0805/cesium-native that referenced this pull request Jun 29, 2026
Also includes a change to schema conversion from CesiumGS#1402: use 64 bit
types.
timoore added 5 commits June 29, 2026 23:17
This is consistent with how IntrusivePointer objects are passed to
continuations, and for the moment resolves a mysterious problem in
Cesium for Unreal.
The external tilesets in the Maxar GeoJSON scheme don't contain a full
URL to the schema, so it needs to be parsed once and passed around.

@j9liu j9liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @timoore. Per our offline discussion we'll use the TilesetContentLoader workaround for now; I opened #1406 as an item to address later.

Just waiting on CI to complete before merge (will rerun the Windows 2022 fluke).

@j9liu j9liu merged commit 2115eb5 into main Jun 30, 2026
40 of 42 checks passed
@j9liu j9liu deleted the maxar-feature-properties branch June 30, 2026 19:02
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.

GeoJSON tilesets: encode metadata in GeoJSON features

3 participants