Feature/8727 serve das visual tiles#302
Conversation
There was a problem hiding this comment.
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
DasTilerServicewith 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.
6cb9eff to
3977749
Compare
eed458f to
294bdb2
Compare
| long totalHits = getDocumentsCount(vocabsIndexName); | ||
| if (totalHits == 0) { | ||
| throw new DocumentNotFoundException("No documents found in " + vocabsIndexName); | ||
| throw new ResourceNotFoundException("No documents found in " + vocabsIndexName); |
There was a problem hiding this comment.
Any impact to frontend ?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
unified rese template for all DAS
294bdb2 to
ca3e00b
Compare
|
Branch outdated |
c52621c to
1b4d674
Compare
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.
1b4d674 to
1b7aa82
Compare
No description provided.