Skip to content

Feature/8727 serve das visual tiles#302

Merged
utas-raymondng merged 12 commits into
mainfrom
feature/8727-serve-das-visual-tiles
Jul 24, 2026
Merged

Feature/8727 serve das visual tiles#302
utas-raymondng merged 12 commits into
mainfrom
feature/8727-serve-das-visual-tiles

Conversation

@weited

@weited weited commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support for serving Data Access Service (DAS) “visual tiles” through this OGC API server, including a public collection map-tile proxy endpoint plus “ext” endpoints that expose tiler metadata (products/dates, colormaps, legend) to the frontend.

Changes:

  • Introduces DasTilerService with upstream error/status mapping and EhCache-backed caching for tiles/products/manifest.
  • Adds new REST endpoints for DAS tiler “ext” metadata (/api/v1/ogc/ext/tiler/...) and a hand-written collection map tile route that proxies visual tiles.
  • Adds unit/integration tests covering routing/validation, upstream status mirroring, caching behavior, and ext endpoint responses.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/src/test/java/au/org/aodn/ogcapi/server/tile/TilerExtApiTest.java Adds SpringBoot tests for tiler ext endpoints (products listing, colormaps, legend).
server/src/test/java/au/org/aodn/ogcapi/server/tile/RestApiTest.java Extends API tests to cover the visual-tile proxy route validation and upstream status mirroring.
server/src/test/java/au/org/aodn/ogcapi/server/core/service/DasTilerServiceTest.java Adds unit tests for URL building, header injection, and upstream/network error mapping.
server/src/test/java/au/org/aodn/ogcapi/server/core/service/DasTilerServiceCachingTest.java Adds a Spring proxy-backed test to validate @Cacheable behavior and cv staleness checks on cache hits.
server/src/main/resources/application-dev.yaml Imports optional .env.dev for dev-time configuration overrides.
server/src/main/java/au/org/aodn/ogcapi/server/tile/TilerExtApi.java Adds ext controller exposing DAS tiler metadata and legend proxy endpoints.
server/src/main/java/au/org/aodn/ogcapi/server/tile/RestApi.java Adds hand-written collection map-tile endpoint proxying DAS visual tiles with validation/bounds checks.
server/src/main/java/au/org/aodn/ogcapi/server/core/service/DasTilerService.java Implements upstream DAS tiler client with caching, header management, and response forwarding.
server/src/main/java/au/org/aodn/ogcapi/server/core/exception/GlobalExceptionHandler.java Adds handler to return status/body/content-type for DasUpstreamException.
server/src/main/java/au/org/aodn/ogcapi/server/core/exception/DasUpstreamException.java Adds exception type to carry upstream status/body/content-type to the global handler.
server/src/main/java/au/org/aodn/ogcapi/server/core/configuration/CacheConfig.java Adds dedicated caches for tiler tiles/products/manifest.
server/pom.xml Enables preview features for Spring Boot plugin runtime to match compiler preview configuration.
.gitignore Ignores .env.dev.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated 5 comments.

Comment thread server/src/main/java/au/org/aodn/ogcapi/server/core/service/DasService.java Outdated
Comment thread server/src/main/java/au/org/aodn/ogcapi/server/tile/RestExtApi.java Outdated
Comment thread server/src/main/java/au/org/aodn/ogcapi/server/tile/RestExtApi.java Outdated
Comment thread server/src/main/java/au/org/aodn/ogcapi/server/tile/RestExtApi.java Outdated

@utas-raymondng utas-raymondng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some comment

long totalHits = getDocumentsCount(vocabsIndexName);
if (totalHits == 0) {
throw new DocumentNotFoundException("No documents found in " + vocabsIndexName);
throw new ResourceNotFoundException("No documents found in " + vocabsIndexName);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Any impact to frontend ?

@weited weited Jul 22, 2026

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.

reverted, the old DocumentNotFoundException was not handled at GlobalHandler (not sure if it's intentional or a bug, out of scope), but ResourceNotFounException is handled. The difference might cause different behaviour

return new RestTemplate(factory);
}

@Bean(name = DAS_TILER_REST_TEMPLATE, defaultCandidate = false)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is it possible to use the existing as the data access service then you can make your code easier, especially there is a host key need to set in order to avoid firewall block on repeat call

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.

unified rese template for all DAS

Comment thread server/src/main/resources/application-dev.yaml Outdated
@utas-raymondng

Copy link
Copy Markdown
Collaborator

Branch outdated

@weited
weited force-pushed the feature/8727-serve-das-visual-tiles branch from c52621c to 1b4d674 Compare July 24, 2026 03:37
weited added 7 commits July 24, 2026 13:40
Proxies DAS's visual-tile images, product/manifest listing, colormaps, and
legend through public ogcapi-java routes so the frontend never needs to talk
to DAS directly: a hand-written OGC map-tile route (collectionMapGetTile's
generated stub is @hidden and replaced) plus a new /ext/tiler namespace for
product discovery, backed by DasTilerService and cached with EhCache.
@weited
weited force-pushed the feature/8727-serve-das-visual-tiles branch from 1b4d674 to 1b7aa82 Compare July 24, 2026 03:41

@utas-raymondng utas-raymondng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@utas-raymondng
utas-raymondng merged commit 6efe5b8 into main Jul 24, 2026
4 checks passed
@utas-raymondng
utas-raymondng deleted the feature/8727-serve-das-visual-tiles branch July 24, 2026 03:50
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.

3 participants