Skip to content

Conversation

@m-mohr
Copy link
Collaborator

@m-mohr m-mohr commented Oct 22, 2025

Just doesn't work yet at all 🙈 No requests are made.

@m-mohr m-mohr requested a review from Copilot October 22, 2025 09:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for visualizing FlatGeobuf assets in STAC layers. The implementation enables rendering of FlatGeobuf files (an efficient binary format for geographic data) alongside existing formats like GeoJSON and GeoTIFF.

  • Adds flatgeobuf package dependency and imports the OpenLayers loader
  • Implements addFlatGeobuf_ method to create vector layers from FlatGeobuf assets
  • Updates asset visualization logic to detect and render FlatGeobuf format

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/ol/layer/STAC.js Adds FlatGeobuf support with new import, media type check, and visualization methods
package.json Adds flatgeobuf ^4.3.1 dependency
examples/stac-item-flatgeobuf.js Provides example implementation showing FlatGeobuf asset rendering
examples/stac-item-flatgeobuf.html HTML template for the FlatGeobuf example
CHANGELOG.md Documents the new FlatGeobuf visualization feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

try {
const source = new VectorSource();
const loader = createLoader(
null,
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

The first parameter to createLoader is null. According to the flatgeobuf OpenLayers API, this should be the feature projection. Consider passing a proper projection here or document why null is acceptable.

Suggested change
null,
getProjection(this),

Copilot uses AI. Check for mistakes.
Comment on lines +842 to +848
const loader = createLoader(
null,
source,
asset.getAbsoluteUrl(),
bboxStrategy,
);
source.setLoader(loader);
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

The createLoader function is called with the source as the second parameter, but then source.setLoader is called immediately after. This appears redundant - createLoader typically either returns a loader to be set manually OR sets it on the source internally. Verify the correct usage pattern for flatgeobuf's createLoader API.

Suggested change
const loader = createLoader(
null,
source,
asset.getAbsoluteUrl(),
bboxStrategy,
);
source.setLoader(loader);
createLoader(
null,
source,
asset.getAbsoluteUrl(),
bboxStrategy,
);

Copilot uses AI. Check for mistakes.
title: STAC Item with FlatGeobuf assets
shortdesc: Rendering a STAC Item with FlatGeobuf assets
docs: >
Geometry and FlatGeobuf Assets from SpatioTemporal Asset Catalog (STAC) Items can be rendered as layer group.
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

Grammatical improvement: 'as layer group' should be 'as a layer group'.

Suggested change
Geometry and FlatGeobuf Assets from SpatioTemporal Asset Catalog (STAC) Items can be rendered as layer group.
Geometry and FlatGeobuf Assets from SpatioTemporal Asset Catalog (STAC) Items can be rendered as a layer group.

Copilot uses AI. Check for mistakes.
@m-mohr m-mohr force-pushed the main branch 3 times, most recently from 672db15 to 9ab97fe Compare November 27, 2025 19:14
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