Skip to content

Commit 36d1d36

Browse files
Add NetCDF data upload output type
1 parent 5f23ef3 commit 36d1d36

File tree

9 files changed

+326
-89
lines changed

9 files changed

+326
-89
lines changed

packages/api/generated-schema-clean.gql

+1
Original file line numberDiff line numberDiff line change
@@ -3388,6 +3388,7 @@ enum DataUploadOutputType {
33883388
FLAT_GEOBUF
33893389
GEO_JSON
33903390
GEO_TIFF
3391+
NET_CDF
33913392
PMTILES
33923393
PNG
33933394
XMLMETADATA

packages/api/generated-schema.gql

+1
Original file line numberDiff line numberDiff line change
@@ -3388,6 +3388,7 @@ enum DataUploadOutputType {
33883388
FLAT_GEOBUF
33893389
GEO_JSON
33903390
GEO_TIFF
3391+
NET_CDF
33913392
PMTILES
33923393
PNG
33933394
XMLMETADATA
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--! Previous: sha1:fc2579e6e5275d22de4e81f534d1666a014721f8
2+
--! Hash: sha1:b8cbc01e7d5166e77a68f5e3072082b77ff40769
3+
4+
-- Enter migration here
5+
alter type data_upload_output_type add value if not exists 'NetCDF';

packages/api/schema.sql

+307-87
Large diffs are not rendered by default.

packages/client/src/admin/data/QuotaUsageTreemap.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ export function humanizeOutputType(type: DataUploadOutputType | "Archives") {
396396
return "Shapefile";
397397
case DataUploadOutputType.Png:
398398
return "PNG Image";
399+
case DataUploadOutputType.NetCdf:
400+
return "NetCDF";
399401
case "Archives":
400402
return "Archived Versions";
401403
case DataUploadOutputType.Xmlmetadata:

packages/client/src/generated/graphql.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2893,6 +2893,7 @@ export enum DataUploadOutputType {
28932893
FlatGeobuf = 'FLAT_GEOBUF',
28942894
GeoJson = 'GEO_JSON',
28952895
GeoTiff = 'GEO_TIFF',
2896+
NetCdf = 'NET_CDF',
28962897
Pmtiles = 'PMTILES',
28972898
Png = 'PNG',
28982899
Xmlmetadata = 'XMLMETADATA',

packages/client/src/generated/queries.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2891,6 +2891,7 @@ export enum DataUploadOutputType {
28912891
FlatGeobuf = 'FLAT_GEOBUF',
28922892
GeoJson = 'GEO_JSON',
28932893
GeoTiff = 'GEO_TIFF',
2894+
NetCdf = 'NET_CDF',
28942895
Pmtiles = 'PMTILES',
28952896
Png = 'PNG',
28962897
Xmlmetadata = 'XMLMETADATA',

packages/spatial-uploads-handler/src/handleUpload.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export type SupportedTypes =
2727
| "GeoJSON"
2828
| "FlatGeobuf"
2929
| "ZippedShapefile"
30-
| "GeoTIFF";
30+
| "GeoTIFF"
31+
| "NetCDF";
3132

3233
export interface ResponseOutput {
3334
/** Remote location string as used in rclone */

packages/spatial-uploads-handler/src/processRasterUpload.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ export async function processRasterUpload(options: {
9090

9191
// Add original file to outputs
9292
outputs.push({
93-
type: ext === ".tif" || ext === ".tiff" ? "GeoTIFF" : "PNG",
93+
type:
94+
ext === ".tif" || ext === ".tiff"
95+
? "GeoTIFF"
96+
: ext === ".nc"
97+
? "NetCDF"
98+
: "PNG",
9499
remote: `${process.env.RESOURCES_REMOTE}/${baseKey}/${jobId}${ext}`,
95100
local: path,
96101
size: statSync(path).size,

0 commit comments

Comments
 (0)