Skip to content

Commit bc21537

Browse files
✨ support geotiff as output format with monthly ZIP archives
1 parent 49dd0a2 commit bc21537

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

server/src/main/java/au/org/aodn/ogcapi/server/processes/RestApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,13 @@ public ResponseEntity<InlineResponse200> execute(
6363
String collectionTitle = DatasetDownloadEnums.Parameter.COLLECTION_TITLE.getStringInput(body);
6464
String fullMetadataLink = DatasetDownloadEnums.Parameter.FULL_METADATA_LINK.getStringInput(body);
6565
String suggestedCitation = DatasetDownloadEnums.Parameter.SUGGESTED_CITATION.getStringInput(body);
66+
String outputFormat = DatasetDownloadEnums.Parameter.OUTPUT_FORMAT.getStringInput(body);
6667
Object multiPolygon = DatasetDownloadEnums.Parameter.MULTI_POLYGON.getObjectInput(body);
6768

6869
// move the notify user email from data-access-service to here to make the first email faster
6970
restServices.notifyUser(recipient, uuid, startDate, endDate, multiPolygon, collectionTitle, fullMetadataLink, suggestedCitation);
7071

71-
var response = restServices.downloadData(uuid, key, startDate, endDate, multiPolygon, recipient, collectionTitle, fullMetadataLink, suggestedCitation);
72+
var response = restServices.downloadData(uuid, key, startDate, endDate, multiPolygon, recipient, collectionTitle, fullMetadataLink, suggestedCitation, outputFormat);
7273

7374
var value = new InlineValue(response.getBody());
7475
var status = new InlineValue(Integer.toString(HttpStatus.OK.value()));

server/src/main/java/au/org/aodn/ogcapi/server/processes/RestServices.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ public ResponseEntity<String> downloadData(
8080
String recipient,
8181
String collectionTitle,
8282
String fullMetadataLink,
83-
String suggestedCitation
83+
String suggestedCitation,
84+
String outputFormat
8485
) throws JsonProcessingException {
8586

8687
Map<String, String> parameters = new HashMap<>();
@@ -92,6 +93,9 @@ public ResponseEntity<String> downloadData(
9293
parameters.put(DatasetDownloadEnums.Parameter.COLLECTION_TITLE.getValue(), collectionTitle);
9394
parameters.put(DatasetDownloadEnums.Parameter.FULL_METADATA_LINK.getValue(), fullMetadataLink);
9495
parameters.put(DatasetDownloadEnums.Parameter.SUGGESTED_CITATION.getValue(), suggestedCitation);
96+
if (outputFormat != null) {
97+
parameters.put(DatasetDownloadEnums.Parameter.OUTPUT_FORMAT.getValue(), outputFormat);
98+
}
9599
if (polygons == null || polygons.toString().isEmpty()) {
96100
throw new IllegalArgumentException("Polygons parameter should now be null. If users didn't specify polygons, a 'non-specified' should be sent.");
97101

0 commit comments

Comments
 (0)