Skip to content

Commit

Permalink
WMS Parent Time Default fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed May 7, 2021
1 parent eebf538 commit 64ce7b4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Added
- Add MosaicRasterSourceIO logging [#366](https://github.com/geotrellis/geotrellis-server/pull/366)

## Fixed
- WMS Parent Layer default time should be omitted [#368](https://github.com/geotrellis/geotrellis-server/pull/368)

## [4.4.0] - 2021-04-30

## Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,25 +312,23 @@ object CapabilitiesView {
// TODO: bounding box for global layer
BoundingBox = Nil,
Dimension = time match {
case tp @ OgcTimePositions(nel) =>
case tp: OgcTimePositions =>
Dimension(
tp.toString,
Map(
"@name" -> DataRecord("time"),
"@units" -> DataRecord("ISO8601"),
"@default" -> DataRecord(nel.head.toInstant.toString)
"@name" -> DataRecord("time"),
"@units" -> DataRecord("ISO8601")
)
) :: Nil
case ti @ OgcTimeInterval(start, _, _) =>
case ti: OgcTimeInterval =>
Dimension(
ti.toString,
Map(
"@name" -> DataRecord("time"),
"@units" -> DataRecord("ISO8601"),
"@default" -> DataRecord(start.toString)
"@name" -> DataRecord("time"),
"@units" -> DataRecord("ISO8601")
)
) :: Nil
case OgcTimeEmpty => Nil
case OgcTimeEmpty => Nil
},
Attribution = None,
AuthorityURL = Nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ case class WmsModel[F[_]: Monad](
sources: RepositoryM[F, List, OgcSource],
extendedParametersBinding: Option[ParamMap => Option[Expression => Expression]] = None
) {

def time: F[OgcTime] = sources.store.map(_.map(_.time)).map(_.reduce(_ |+| _))

/** Take a specific request for a map and combine it with the relevant [[OgcSource]]
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object Dependencies {

val dispatchVer = "0.11.3"
val gtVer = "3.6.0"
val stac4sVer = "0.2.2"
val stac4sVer = "0.3.0"
val jaxbApiVer = "2.3.1"
val refinedVer = "0.9.20"
val shapelessVer = "2.3.3"
Expand Down
10 changes: 5 additions & 5 deletions stac-example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ postgres:
migrations:
docker run --rm \
--network stac-example_default \
quay.io/azavea/franklin:71fb6bf \
quay.io/azavea/franklin:404f1c0 \
migrate \
--db-user franklin \
--db-name franklin \
Expand All @@ -23,7 +23,7 @@ import-landsat-stac-collection:
--network stac-example_default \
-e AWS_REGION=us-east-1 \
-v ${PWD}/catalog:/opt/data/ \
quay.io/azavea/franklin:71fb6bf \
quay.io/azavea/franklin:404f1c0 \
import-catalog \
--db-user franklin \
--db-name franklin \
Expand All @@ -36,7 +36,7 @@ import-landsat-stac-periodic-collection:
--network stac-example_default \
-e AWS_REGION=us-east-1 \
-v ${PWD}/catalog:/opt/data/ \
quay.io/azavea/franklin:71fb6bf \
quay.io/azavea/franklin:404f1c0 \
import-catalog \
--db-user franklin \
--db-name franklin \
Expand All @@ -49,7 +49,7 @@ import-landsat-stac-layers:
--network stac-example_default \
-e AWS_REGION=us-east-1 \
-v ${PWD}/catalog:/opt/data/ \
quay.io/azavea/franklin:71fb6bf \
quay.io/azavea/franklin:404f1c0 \
import-catalog \
--db-user franklin \
--db-name franklin \
Expand All @@ -61,7 +61,7 @@ run-franklin:
docker run --rm \
--network stac-example_default \
-p 9090:9090 \
quay.io/azavea/franklin:71fb6bf \
quay.io/azavea/franklin:404f1c0 \
serve \
--db-user franklin \
--db-name franklin \
Expand Down

0 comments on commit 64ce7b4

Please sign in to comment.