Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge/Sync Stable back into cwbi-dev #504

Merged
merged 76 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c88696e
Merge pull request #414 from USACE/develop
adamscarberry Jun 27, 2023
123582f
Develop to stable (#422)
adamscarberry Jun 28, 2023
e40b63c
Merge pull request #425 from USACE/develop
adamscarberry Aug 9, 2023
357b888
Merge pull request #428 from USACE/develop
adamscarberry Sep 6, 2023
f121658
Merge pull request #431 from USACE/develop
adamscarberry Sep 12, 2023
bc4d7f3
Merge pull request #433 from USACE/develop
adamscarberry Sep 13, 2023
384d991
Merge pull request #436 from USACE/develop
adamscarberry Sep 13, 2023
84fabce
Merge pull request #438 from USACE/develop
adamscarberry Sep 26, 2023
ac04e4e
Merge pull request #440 from USACE/develop
adamscarberry Sep 27, 2023
eba37cc
Merge pull request #442 from USACE/develop
adamscarberry Sep 29, 2023
ef39ccf
Merge pull request #444 from USACE/develop
adamscarberry Sep 29, 2023
2bae191
Merge pull request #447 from USACE/develop
adamscarberry Oct 10, 2023
0f54e5e
Merge pull request #448 from USACE/develop
adamscarberry Oct 10, 2023
f6ead14
Merge pull request #452 from USACE/develop
jeffsuperglide Oct 30, 2023
0b13793
Merge pull request #454 from USACE/develop
adamscarberry Nov 1, 2023
64f37e5
Merge pull request #456 from USACE/develop
adamscarberry Nov 2, 2023
e27b243
Merge pull request #459 from USACE/develop
adamscarberry Nov 29, 2023
12ff60a
add migration to fix watershed extents (#462)
adamscarberry Mar 4, 2024
8d6df35
Merge pull request #463 from USACE/develop
adamscarberry Mar 4, 2024
8e11627
updating packager to add srid. add srid column to watershed table
Enovotny Mar 21, 2024
cefd5cc
updating V file number
Enovotny Apr 1, 2024
059cfb8
update
Enovotny Apr 1, 2024
b169b3a
add watersheds for NWDP
Enovotny Apr 1, 2024
533faa6
Merge pull request #467 from USACE/feature/NWDMwatersheds
Enovotny Apr 1, 2024
5729720
convert watersheds to meters
Enovotny Apr 1, 2024
e22197c
Merge pull request #468 from USACE/feature/NWDMwatersheds
Enovotny Apr 1, 2024
acc6688
Merge pull request #469 from USACE/develop
Enovotny Apr 1, 2024
e632479
fix watershed extents (#470)
adamscarberry Apr 8, 2024
8474816
Merge pull request #471 from USACE/develop
adamscarberry Apr 8, 2024
f28c1bd
update UTM dss grid information
Enovotny May 8, 2024
c910216
update v file number
Enovotny May 9, 2024
bd67c64
set dockercompose back to main
Enovotny May 9, 2024
befeb6d
cleanup
Enovotny May 9, 2024
95bbcb5
Merge pull request #473 from USACE/feature/APRFC_projection
Enovotny May 21, 2024
491009e
fix Eau Galle watershed extents
msweier May 24, 2024
13c29c4
Merge pull request #475 from USACE/408-product-mvp-eau-galle-extents
msweier May 24, 2024
54ab9c9
Merge pull request #476 from USACE/feature/APRFC_projection
Enovotny May 28, 2024
b005c4e
Merge pull request #477 from USACE/develop
Enovotny May 28, 2024
e0b2cf4
Security/413 patch api and listener (#479)
adamscarberry Jul 3, 2024
81b6be0
Merge pull request #480 from USACE/develop
adamscarberry Jul 8, 2024
7b3b966
Fix aprfc qpe units from mm to in
msweier Jul 10, 2024
c31facd
Merge pull request #482 from USACE/380-product-aprfc-data-products
msweier Jul 11, 2024
4c8c803
remove incorrect migration (#483)
adamscarberry Jul 11, 2024
eb35153
fix units in aprfc qpe from in to mm
msweier Jul 12, 2024
c502632
Merge branch 'develop' into 380-product-aprfc-data-products
msweier Jul 18, 2024
784b230
Remove not needed files
msweier Jul 18, 2024
3ac119e
Security/414 patch async geoprocess (#481)
adamscarberry Jul 24, 2024
166b557
Merge pull request #484 from USACE/380-product-aprfc-data-products
msweier Jul 29, 2024
c2f4b27
Merge pull request #485 from USACE/develop
adamscarberry Jul 30, 2024
9f7edcc
Added New Florida extents for SAJ
katfeingold Aug 2, 2024
7ae22ab
Added new SAJ Florida watershed
katfeingold Aug 2, 2024
616055f
Added new SAJ Florida watershed
katfeingold Aug 6, 2024
58a3419
Added new SAJ Florida watershed
katfeingold Aug 6, 2024
b75d152
Feature/419 420 add sad nad extents (#487)
adamscarberry Aug 6, 2024
a221eef
Merge pull request #488 from USACE/develop
adamscarberry Aug 6, 2024
b37dfa0
fixed the number Added new SAJ Florida watershed
katfeingold Aug 6, 2024
9e5908b
Merge pull request #489 from USACE/411-product-additional-florida-ext…
katfeingold Aug 12, 2024
0107d7e
Merge pull request #490 from USACE/411-product-additional-florida-ext…
katfeingold Aug 12, 2024
96b1c00
Adding new Lower Yellowstone watershed extents for NWO, #412
katfeingold Aug 12, 2024
ab1c811
Added lower yellowstone watershed for NWO
katfeingold Aug 14, 2024
92a5cb7
removing the wrong file that was added
katfeingold Aug 14, 2024
33d3b39
Merge pull request #492 from USACE/412-qa-review-nwo-grid-extents
katfeingold Aug 14, 2024
4b7dac6
Delete sql/common/V2.41.0__add_SAD_division_extents.sql
katfeingold Aug 14, 2024
ec4dcf4
Delete sql/common/V2.42.0__add_NAD_division_extents.sql
katfeingold Aug 14, 2024
99bdaa2
Merge pull request #493 from USACE/412-qa-review-nwo-grid-extents
katfeingold Aug 14, 2024
b451e27
Adjusted extends for Crooked River #418 in NWP
katfeingold Aug 15, 2024
3d597da
Fix aprfc qpf units
msweier Aug 16, 2024
6757422
Merge pull request #495 from USACE/380-product-aprfc-data-products
msweier Aug 16, 2024
690499b
Adjusted the extents, as previous were in feet not meters
katfeingold Aug 19, 2024
c35793e
Merge pull request #494 from USACE/418-watershed-extents-nwp-request-…
katfeingold Aug 19, 2024
5696b54
remove migration (#497)
adamscarberry Sep 10, 2024
ba1e9b3
Merge pull request #498 from USACE/develop
adamscarberry Sep 10, 2024
3c230e2
Fix/#496 fix aprfc qpf units (#499)
adamscarberry Sep 10, 2024
6c039ee
Merge pull request #500 from USACE/develop
adamscarberry Sep 16, 2024
6cea96f
remove schemaspy docs due to depedency vuln (#501)
adamscarberry Sep 16, 2024
f779fbd
Merge pull request #502 from USACE/develop
adamscarberry Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine AS builder
FROM golang:1.21-alpine AS builder
# Install Git
RUN apk update && apk add --no-cache ca-certificates
# Copy In Source Code
Expand Down
45 changes: 23 additions & 22 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
module github.com/USACE/cumulus-api/api

go 1.20
go 1.21

toolchain go1.21.0

require (
github.com/USACE/go-simple-asyncer v0.0.0-20201015223104-446ae10887a8
github.com/aws/aws-sdk-go v1.47.1
github.com/aws/aws-sdk-go v1.54.13
github.com/btcsuite/btcutil v1.0.2
github.com/georgysavva/scany v1.2.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.4.0
github.com/gosimple/slug v1.13.1
github.com/jackc/pgx/v4 v4.18.1
github.com/jackc/pgx/v4 v4.18.3
github.com/jmoiron/sqlx v1.3.5
github.com/kelseyhightower/envconfig v1.4.0
github.com/labstack/echo-contrib v0.15.0
github.com/labstack/echo/v4 v4.11.2
golang.org/x/crypto v0.14.0
golang.org/x/net v0.17.0
github.com/labstack/echo-contrib v0.17.1
github.com/labstack/echo/v4 v4.12.0
golang.org/x/crypto v0.24.0
golang.org/x/net v0.26.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/gosimple/unidecode v1.0.1 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.1 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgtype v1.14.3 // indirect
github.com/jackc/puddle v1.3.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/streadway/amqp v1.1.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
112 changes: 58 additions & 54 deletions api/go.sum

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions api/models/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ type PackagerRequest struct {
type Extent struct {
Name string `json:"name"`
Bbox []float64 `json:"bbox"`
Srid float64 `json:"srid"`
}

// PackagerContentItem is a single item for Packager to include in output file
Expand Down Expand Up @@ -181,9 +182,12 @@ func GetDownloadPackagerRequest(db *pgxpool.Pool, downloadID *uuid.UUID) (*Packa
json_build_object(
'name', w.name,
'bbox', ARRAY[
ST_XMin(w.geometry),ST_Ymin(w.geometry),
ST_XMax(w.geometry),ST_YMax(w.geometry)
]
ST_XMin(ST_Transform(w.geometry,w.output_srid)),
ST_YMin(ST_Transform(w.geometry,w.output_srid)),
ST_XMax(ST_Transform(w.geometry,w.output_srid)),
ST_YMax(ST_Transform(w.geometry,w.output_srid))
],
'srid', w.output_srid
) AS extent,
CONCAT(
'cumulus/download/', f.abbreviation,
Expand Down
31 changes: 13 additions & 18 deletions async_geoprocess/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
FROM ghcr.io/osgeo/gdal:ubuntu-full-3.7.0

# Note:
# 1) The apt-get upgrade below is due to the latest gdal:ubuntu-full-3.7.0
# base image being slightly out of date with patching.
# 2) The individual lines below to install/upgrade was to get
# the packages to properly update and the docker vulnerabilities
# to be resolved.

RUN apt-get update -y && apt-get upgrade -y \
&& apt-get install -y python3-pip git \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --no-cache-dir --upgrade pip \
&& python3 -m pip install --no-cache-dir --upgrade setuptools \
&& python3 -m pip install --no-cache-dir --upgrade wheel \
&& python3 -m pip install --no-cache-dir --upgrade pillow \
&& python3 -m pip install --no-cache-dir --upgrade numpy
FROM ghcr.io/osgeo/gdal:ubuntu-full-3.9.1

RUN apt-get update -y && apt-get install -y \
git \
python3-pip \
python3-venv \
python3-dev \
postgresql-server-dev-all \
libhdf5-dev \
zlib1g-dev \
libnetcdf-dev \
&& rm -rf /var/lib/apt/lists/*

RUN useradd appuser

Expand All @@ -29,7 +24,7 @@ ENV PYTHONUNBUFFERED=1
ENV GDAL_DATA=/usr/share/gdal

# pip install the cumulus package
RUN python3 -m pip install $CUMULUS_GEOPROC_PIP_URL
RUN python3 -m pip install --break-system-packages $CUMULUS_GEOPROC_PIP_URL

WORKDIR /app/async_geoprocess

Expand Down
2 changes: 1 addition & 1 deletion async_listener/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BUILD GO BINARIES
FROM golang:1.19-alpine AS builder
FROM golang:1.21-alpine AS builder
# Install Git
RUN apk update && apk add --no-cache git ca-certificates
# Copy In Source Code
Expand Down
2 changes: 1 addition & 1 deletion async_listener/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
)

require (
github.com/aws/aws-sdk-go v1.44.290 // indirect
github.com/aws/aws-sdk-go v1.54.13 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/streadway/amqp v1.1.0 // indirect
)
30 changes: 2 additions & 28 deletions async_listener/go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/USACE/go-simple-asyncer v0.0.0-20201015223104-446ae10887a8 h1:ZiPYYp2OgNoJ489M5jiyqt23LV3yQ9w+ZiqiswQLWP8=
github.com/USACE/go-simple-asyncer v0.0.0-20201015223104-446ae10887a8/go.mod h1:2Zftz61ghmwOivA7LUAWt8rUV1CXmHuKYYvK2bFSxMY=
github.com/aws/aws-sdk-go v1.35.7/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
github.com/aws/aws-sdk-go v1.44.290 h1:Md4+os9DQtJjow0lWLMzeJljsimD+XS2xwwHDr5Z+Lk=
github.com/aws/aws-sdk-go v1.44.290/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.54.13 h1:zpCuiG+/mFdDY/klKJvmSioAZWk45F4rLGq0JWVAAzk=
github.com/aws/aws-sdk-go v1.54.13/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
Expand All @@ -20,36 +20,10 @@ github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1Sd
github.com/streadway/amqp v1.1.0 h1:py12iX8XSyI7aN/3dUT8DFIDJazNJsVJdxNVEpnQTZM=
github.com/streadway/amqp v1.1.0/go.mod h1:WYSrTEYHOXHd0nwFeUXAe2G2hRnQT+deZJJf88uS9Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
13 changes: 12 additions & 1 deletion async_packager/src/cumulus_packager/heclib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
AXIS["Easting",EAST],AXIS["Northing",NORTH]]'
"""str: UTM WKT"""


# ProjectionDatum
class ProjectionDatum(Enum):
UNDEFINED_PROJECTION_DATUM = 0
Expand All @@ -79,6 +80,7 @@ class CompressionMethod(Enum):

compression_method = {i.name: i.value for i in CompressionMethod}


# StorageDataType
class StorageDataType(Enum):
GRID_FLOAT = 0
Expand All @@ -89,6 +91,7 @@ class StorageDataType(Enum):

storage_data_type = {i.name: i.value for i in StorageDataType}


# DataType
class DataType(Enum):
PER_AVER = 0
Expand All @@ -101,42 +104,49 @@ class DataType(Enum):

data_type = {i.name.replace("_", "-"): i.value for i in DataType}


# GridStructVersion
class GridStructVersion(Enum):
VERSION_100 = -100


grid_struct_version = {i.name: i.value for i in GridStructVersion}


# DssGridType
class DssGridType(Enum):
UNDEFINED_GRID_TYPE = 400
HRAP = 410
SHG = ALBERS = 420
SPECIFIED_GRID_TYPE = 430
UTM6N = 430


dss_grid_type = {i.name: i.value for i in DssGridType}


# DssGridTypeName
class DssGridTypeName(Enum):
HRAP = "HRAP"
SHG = "ALBERS"
UTM = "UMT%s%s"
UTM = "UTM%s%s"


dss_grid_type_name = {i.name: i.value for i in DssGridTypeName}


# SpatialRefereceDefinition
class SpatialReferenceDefinition(Enum):
UNDEFINED_GRID_TYPE = None
HRAP = HRAP_SRC_DEFINITION
SHG = ALBERS = SHG_SRC_DEFINITION
SPECIFIED_GRID_TYPE = None
UTM6N = UTM_SRC_DEFINITION % ("6", "N", "-147", "0")


spatial_reference_definition = {i.name: i.value for i in SpatialReferenceDefinition}


# TimeZones
class TimeZone(Enum):
GMT = UTC = 0
Expand Down Expand Up @@ -194,6 +204,7 @@ def __init__(self, *args, **kw):
self._nullValue = UNDEFINED
super().__init__(*args, **kw)


def zwrite_record(
dssfilename: str,
gridStructStore: zStructSpatialGrid,
Expand Down
8 changes: 6 additions & 2 deletions async_packager/src/cumulus_packager/packager/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,18 @@ def handle_message(payload_resp: namedtuple, dst: str):

"""
logger.info(f'Handle message with plugin "{payload_resp.format}"')
extent = payload_resp.extent
logger.info(f"extent {extent}")
dst_srs = f'EPSG:{extent["srid"]}'
logger.info(f"output projection of grids will be {dst_srs}")
result = pkg_writer(
plugin=payload_resp.format,
id=payload_resp.download_id,
src=json.dumps(payload_resp.contents),
extent=json.dumps(payload_resp.extent),
extent=json.dumps(extent),
dst=dst,
cellsize=2000,
dst_srs="EPSG:5070",
dst_srs=dst_srs,
)

return result
12 changes: 10 additions & 2 deletions async_packager/src/cumulus_packager/writers/dss7.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""DSS7 package writer

"""

import json
import os
import sys
Expand Down Expand Up @@ -69,8 +70,15 @@ def writer(
destination_srs.ImportFromEPSG(int(epsg_code))

###### this can go away when the payload has the resolution ######
grid_type_name = "SHG"
grid_type = heclib.dss_grid_type[grid_type_name]
if epsg_code == "26906":
grid_type_name = "UTM6N"
grid_type = 430
else:
grid_type_name = "SHG"
grid_type = heclib.dss_grid_type[grid_type_name]
logger.info(
f"grid type name {grid_type_name}",
)
zcompression = heclib.compression_method["ZLIB_COMPRESSION"]
srs_definition = heclib.spatial_reference_definition[grid_type_name]
tz_name = "GMT"
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.minio.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

networks:
default:
name: cumulus-api_default
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
cumulusdb:
image: postgis/postgis:13-3.1
Expand Down
Loading
Loading