Skip to content

Commit

Permalink
Merge pull request #459 from AuScope/AUS-4290
Browse files Browse the repository at this point in the history
AUS-4290 Limit download image size for ESRI WCS
  • Loading branch information
jia020 authored Dec 4, 2024
2 parents 2beb869 + 7ed76de commit cffc464
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,9 @@ export class DownloadPanelComponent implements OnInit {
if (this.wcsDownloadForm.timePosition) {
timePositions = [this.wcsDownloadForm.timePosition];
}
const maxImageSize = config.wcsSupportedLayer[this.layer.id].maxImageSize;
observableResponse = this.downloadWcsService.download(this.layer, this.bbox, this.wcsDownloadForm.inputCrs,
this.wcsDownloadForm.downloadFormat, this.wcsDownloadForm.outputCrs, timePositions);
this.wcsDownloadForm.downloadFormat, this.wcsDownloadForm.outputCrs, timePositions, maxImageSize);

// Download datasets using a URL in the WFS GetFeature response
} else if (this.isDatasetURLSupportedLayer) {
Expand Down
113 changes: 78 additions & 35 deletions src/environments/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,110 +36,153 @@ export const config = {
'erl-mineraloccurrenceview',
'erl-commodityresourceview'
],
// Layers that support downloading datasets via WCS
// Layers that support downloading datasets via WCS have limits
// 'downloadAreaMaxSize' is a limit (in metres squared) to the size of the bounding box drawn on the map
// 'maxImageSize' is a limit on the the lagrest side of the downloaded image/dataset
// For ESRI MapServers set 'maxImageSize' to 1024
// For GSKY set 'maxImageSize' to 4096
//
// (Set 'downloadAreaMaxSize' to Number.MAX_SAFE_INTEGER to disable area download limits)
wcsSupportedLayer: {
'regolith-depth-layer': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 1024
},
'aster-aloh': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-ferrous': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-opaque': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-ferric-oxide-content': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-feoh': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-ferric-oxide-comp': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-group-index': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-quartz-index': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-mgoh-content': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-green-veg': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-ferr-carb': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-mgoh-group-comp': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-aloh-group-content': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-gypsum-content': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'aster-silica-content': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-1': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-2': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-3': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-4': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-5': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-6': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-7': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-8': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-9': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-10': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-11': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-12': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-13': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-14': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-15': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-16': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-17': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-18': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
},
'ga-geophys-19': {
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER
downloadAreaMaxSize: Number.MAX_SAFE_INTEGER,
maxImageSize: 4096
}
},
// Layers that require the proxy service to add layers
Expand Down

0 comments on commit cffc464

Please sign in to comment.