Skip to content

Commit fbad253

Browse files
committed
Merge branch 'release/4.2.0'
2 parents 1772870 + 1763fb2 commit fbad253

File tree

112 files changed

+6693
-1132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+6693
-1132
lines changed

.circleci/config.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ aliases:
66
key: sbt-cache-{{ checksum "/tmp/scala_version" }}-{{ epoch }}
77
paths:
88
- "~/.ivy2/cache"
9-
- "~/.sbt"
109
- "~/.cache/coursier"
10+
- "~/.sbt"
11+
- "~/.m2"
1112

1213
- &run_cibuild
1314
- checkout
@@ -25,10 +26,10 @@ aliases:
2526
- run:
2627
name: "Import signing key"
2728
command: |
29+
gpg --keyserver keyserver.ubuntu.com \
30+
--recv-keys 0x13E9AA1D8153E95E && \
2831
echo "${GPG_KEY}" | base64 -d > signing_key.asc && \
29-
gpg --batch \
30-
--passphrase "${GPG_PASSPHRASE}" \
31-
--import signing_key.asc
32+
gpg --import signing_key.asc
3233
- run:
3334
name: Executing cipublish
3435
command: ./scripts/cipublish
@@ -40,11 +41,11 @@ aliases:
4041
environment:
4142
SCALA_VERSION: 2.11.12
4243

43-
- &openjdk8-scala2_12_8_environment
44+
- &openjdk8-scala2_12_11_environment
4445
docker:
4546
- image: circleci/openjdk:8-jdk
4647
environment:
47-
SCALA_VERSION: 2.12.10
48+
SCALA_VERSION: 2.12.11
4849

4950
version: 2
5051
workflows:
@@ -56,8 +57,8 @@ workflows:
5657
tags:
5758
only:
5859
- /^(.*)$/
59-
- "openjdk8-scala2.12.10":
60-
filters: # required since `openjdk8-scala2.12.10_deploy` has tag filters AND requires `openjdk8-scala2.12.10`
60+
- "openjdk8-scala2.12.11":
61+
filters: # required since `openjdk8-scala2.12.11_deploy` has tag filters AND requires `openjdk8-scala2.12.11`
6162
tags:
6263
only:
6364
- /^(.*)$/
@@ -73,9 +74,9 @@ workflows:
7374
- develop
7475
- /release\/.*/
7576
- /hotfix\/.*/
76-
- "openjdk8-scala2.12.10_deploy":
77+
- "openjdk8-scala2.12.11_deploy":
7778
requires:
78-
- "openjdk8-scala2.12.10"
79+
- "openjdk8-scala2.12.11"
7980
filters:
8081
tags:
8182
only:
@@ -91,14 +92,14 @@ jobs:
9192
<<: *openjdk8-scala2_11_12_environment
9293
steps: *run_cibuild
9394

94-
"openjdk8-scala2.12.10":
95-
<<: *openjdk8-scala2_12_8_environment
95+
"openjdk8-scala2.12.11":
96+
<<: *openjdk8-scala2_12_11_environment
9697
steps: *run_cibuild
9798

9899
"openjdk8-scala2.11.12_deploy":
99100
<<: *openjdk8-scala2_11_12_environment
100101
steps: *run_cipublish
101102

102-
"openjdk8-scala2.12.10_deploy":
103-
<<: *openjdk8-scala2_12_8_environment
103+
"openjdk8-scala2.12.11_deploy":
104+
<<: *openjdk8-scala2_12_11_environment
104105
steps: *run_cipublish

.sbtopts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-J-Xmx2G
22
-J-Xms1G
3-
-J-Xss2M
3+
-J-Xss5M
44
-Djava.awt.headless=true
55
-Dsbt.color=always
66
-Dsbt.supershell=false

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [4.2.0] - 2020-06-23
10+
11+
### Added
12+
- Configurable ResampleMethod in source definitions [#229](https://github.com/geotrellis/geotrellis-server/issues/229)
13+
- Enable TargetCell parameter for focal operations [#212](https://github.com/geotrellis/geotrellis-server/issues/212)
14+
- WMS Extended capabilities and operations [#235](https://github.com/geotrellis/geotrellis-server/issues/235)
15+
- WCS GetCapabilities user defined parameters [#237](https://github.com/geotrellis/geotrellis-server/issues/237)
16+
- WMS GetMap support of extended parameters [#236](https://github.com/geotrellis/geotrellis-server/issues/236)
17+
- WCS GetCoverage support of extended parameters [#238](https://github.com/geotrellis/geotrellis-server/issues/238)
18+
- ColorRampStyle.clampWithColor option to render colors outside the requested render range as colors in the ramp instead of as transparent pixels [#220](https://github.com/geotrellis/geotrellis-server/issues/220)
19+
- Expose overview strategy into the layers configuration [#252](https://github.com/geotrellis/geotrellis-server/pull/252)
20+
- RGB styling configuration [#249](https://github.com/geotrellis/geotrellis-server/issues/249)
21+
- Add STAC Support [#263](https://github.com/geotrellis/geotrellis-server/pull/263)
22+
- Fix ExtentRefication, wcs and wms default behavior when time is not specified for temporal layers [#278](https://github.com/geotrellis/geotrellis-server/pull/278)
23+
- Expose STAC temporal metadata [#279](https://github.com/geotrellis/geotrellis-server/pull/279)
24+
- Support for Time lists in WMS GetCapabilities [#259](https://github.com/geotrellis/geotrellis-server/issues/259)
25+
- Default attribute should not be used to serve response inside Time extent [#260](https://github.com/geotrellis/geotrellis-server/issues/260)
26+
- Enabling Time Dimension for mapalgebrasourceconf on Temporal Layers [#262](https://github.com/geotrellis/geotrellis-server/issues/262)
27+
28+
### Changed
29+
30+
- The `layers.layer-name.sources` field in application.conf is renamed to `source` and now supports a single RasterSource URI string. See `ogc-example/src/main/resources/application.conf` for examples.
31+
- `type = "simplesourceconf"` should be changed to `type = "rastersourceconf"` in application.conf
32+
- Remove GeoTrellisRasterSourceLegacy [#197](https://github.com/geotrellis/geotrellis-server/issues/197)
33+
- Receive GPG key while publishing artifacts [#271](https://github.com/geotrellis/geotrellis-server/pull/271)
34+
35+
### Fixed
36+
37+
- Addressed GeoTrellisRasterSourceLegacy issues and minimized number of RasterSource instances constructed for GeoTrellis Layers [#219](https://github.com/geotrellis/geotrellis-server/issues/219)
38+
- Some source resolutions are sometimes skipped leading to reading too much tiles [#215](https://github.com/geotrellis/geotrellis-server/issues/215)
39+
- LayerHistogram should select the CellSize large enough to compute the histogram [#261](https://github.com/geotrellis/geotrellis-server/pull/261)
40+
941
## [4.1.0] - 2020-03-03
1042

1143
### Added
@@ -15,8 +47,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1547
- RasterSource Catalog [#162](https://github.com/geotrellis/geotrellis-server/issues/162)
1648
- {WCS|WMTS|WMS}Model uses RasterSource catalog [#163](https://github.com/geotrellis/geotrellis-server/issues/163)
1749
- WCS DescribeCoverage may include time TemporalDomain [#211](https://github.com/geotrellis/geotrellis-server/issues/211)
50+
- WCS GetCoverage may include time param `TIMESEQUENCE` [#157](https://github.com/geotrellis/geotrellis-server/issues/157)
51+
- WMS GetCapabilities may include time TemporalDomain [#185](https://github.com/geotrellis/geotrellis-server/issues/185)
52+
- WMS GetMap may include time param `TIME` [#175](https://github.com/geotrellis/geotrellis-server/issues/175)
1853

1954
### Changed
55+
- GT Server sources are now loaded via the GeoTrellis RasterSource SPI API. Each `sources` definition in your application.conf should be migrated to a list of [valid RasterSource SPI URIs](https://github.com/geotrellis/geotrellis-server/pull/222/commits/5937bf6022ba192eb8ab3a7cf28c6b08738fc56a) [#222](https://github.com/geotrellis/geotrellis-server/pull/222)
2056
- Included split dependencies a la GeoTrellis 3.2 for cats ecosystem libraries [\#184](https://github.com/geotrellis/geotrellis-server/pull/184)
2157
- Dropped WCS 1.0.0 support
2258
- Updated MAML up to 0.6.0 [#199](https://github.com/geotrellis/geotrellis-server/pull/199)
@@ -64,7 +100,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
64100
### Changed
65101
- Update geotrellis-contrib [#135](https://github.com/geotrellis/geotrellis-server/pull/135)
66102

67-
[Unreleased]: https://github.com/geotrellis/geotrellis-server/compare/4.1.0...HEAD
103+
[Unreleased]: https://github.com/geotrellis/geotrellis-server/compare/4.2.0...HEAD
104+
[4.2.0]: https://github.com/geotrellis/geotrellis-server/compare/4.2.0...4.1.0
68105
[4.1.0]: https://github.com/geotrellis/geotrellis-server/compare/4.0.1...4.1.0
69106
[4.0.1]: https://github.com/geotrellis/geotrellis-server/compare/4.0.0...4.0.1
70107
[4.0.0]: https://github.com/geotrellis/geotrellis-server/compare/3.4.0...4.0.0

build.sbt

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ lazy val commonSettings = Seq(
1414
// only appends the `-SNAPSHOT` suffix if there are uncommitted
1515
// changes in the workspace.
1616
version := {
17-
// Avoid Cyclic reference involving error
18-
if (git.gitCurrentTags.value.isEmpty || git.gitUncommittedChanges.value)
17+
if (git.gitHeadCommit.value.isEmpty) "0.0.1-SNAPSHOT"
18+
else if (git.gitDescribedVersion.value.isEmpty)
19+
git.gitHeadCommit.value.get.substring(0, 7) + "-SNAPSHOT"
20+
else if (git.gitCurrentTags.value.isEmpty || git.gitUncommittedChanges.value)
1921
git.gitDescribedVersion.value.get + "-SNAPSHOT"
2022
else
2123
git.gitDescribedVersion.value.get
@@ -43,9 +45,10 @@ lazy val commonSettings = Seq(
4345
Resolver.bintrayRepo("azavea", "geotrellis"),
4446
Resolver.sonatypeRepo("releases"),
4547
Resolver.sonatypeRepo("snapshots"),
46-
"osgeo" at "https://download.osgeo.org/webdav/geotools/",
47-
"locationtech-releases" at "https://repo.locationtech.org/content/groups/releases",
48-
"locationtech-snapshots" at "https://repo.locationtech.org/content/groups/snapshots"
48+
"osgeo-snapshots" at "https://repo.osgeo.org/repository/snapshot/",
49+
"osgeo-releases" at "https://repo.osgeo.org/repository/release/",
50+
"eclipse-releases" at "https://repo.eclipse.org/content/groups/releases",
51+
"eclipse-snapshots" at "https://repo.eclipse.org/content/groups/snapshots"
4952
),
5053
addCompilerPlugin(kindProjector cross CrossVersion.full),
5154
addCompilerPlugin(macrosParadise cross CrossVersion.full),
@@ -77,11 +80,6 @@ lazy val commonSettings = Seq(
7780
headerLicense := Some(HeaderLicense.ALv2(java.time.Year.now.getValue.toString, "Azavea")),
7881
headerMappings := Map(
7982
FileType.scala -> CommentStyle.cStyleBlockComment.copy(commentCreator = new CommentCreator() {
80-
val Pattern = "(?s).*?(\\d{4}(-\\d{4})?).*".r
81-
def findYear(header: String): Option[String] = header match {
82-
case Pattern(years, _) => Some(years)
83-
case _ => None
84-
}
8583
def apply(text: String, existingText: Option[String]): String = {
8684
// preserve year of old headers
8785
val newText = CommentStyle.cStyleBlockComment.commentCreator.apply(text, existingText)
@@ -165,7 +163,7 @@ lazy val root = project
165163
.settings(commonSettings)
166164
.settings(publishSettings)
167165
.settings(noPublishSettings)
168-
.aggregate(core, example, ogc, ogcExample, opengis, stac)
166+
.aggregate(core, example, ogc, `ogc-example`, opengis, stac)
169167

170168
lazy val core = project
171169
.settings(moduleName := "geotrellis-server-core")
@@ -180,8 +178,7 @@ lazy val core = project
180178
circeOptics.value,
181179
circeShapes.value,
182180
geotrellisS3,
183-
geotrellisSpark,
184-
spark,
181+
geotrellisStore,
185182
cats.value,
186183
catsEffect.value,
187184
mamlJvm,
@@ -215,9 +212,8 @@ lazy val example = project
215212
http4sXml.value,
216213
scalaXml,
217214
geotrellisS3,
218-
geotrellisSpark,
215+
geotrellisStore,
219216
geotrellisGdal,
220-
spark,
221217
decline,
222218
commonsIO,
223219
concHashMap,
@@ -275,17 +271,16 @@ lazy val ogc = project
275271
.settings(
276272
assembly / assemblyJarName := "geotrellis-server-ogc.jar",
277273
libraryDependencies ++= Seq(
278-
spark,
279274
geotrellisS3,
280-
geotrellisSpark,
275+
geotrellisStore,
281276
commonsIo, // to make GeoTiffRasterSources work
282277
scaffeine,
283278
scalatest,
284279
jaxbApi
285280
)
286281
)
287282

288-
lazy val ogcExample = (project in file("ogc-example"))
283+
lazy val `ogc-example` = project
289284
.dependsOn(ogc)
290285
.enablePlugins(DockerPlugin)
291286
.settings(moduleName := "geotrellis-server-ogc-example")
@@ -294,9 +289,8 @@ lazy val ogcExample = (project in file("ogc-example"))
294289
.settings(
295290
assembly / assemblyJarName := "geotrellis-server-ogc-services.jar",
296291
libraryDependencies ++= Seq(
297-
spark,
298292
geotrellisS3,
299-
geotrellisSpark,
293+
geotrellisStore,
300294
geotrellisCassandra,
301295
geotrellisHBase,
302296
geotrellisAccumulo,
@@ -349,6 +343,42 @@ lazy val stac = project
349343
)
350344
)
351345

346+
lazy val `stac-example` = project
347+
.dependsOn(ogc)
348+
.settings(moduleName := "geotrellis-stac-example")
349+
.settings(commonSettings)
350+
.settings(publishSettings)
351+
.settings(crossScalaVersions := Seq(scalaVer))
352+
.settings(libraryDependencies ++= Seq(
353+
geotrellisGdal,
354+
http4sDsl.value,
355+
http4sBlazeServer.value,
356+
http4sBlazeClient.value,
357+
http4sCirce.value,
358+
http4sXml.value,
359+
logback,
360+
pureConfig,
361+
pureConfigCatsEffect,
362+
scaffeine,
363+
scalatest,
364+
decline,
365+
stac4s
366+
),
367+
excludeDependencies ++= Seq(
368+
// log4j brought in via uzaygezen is a pain for us
369+
ExclusionRule("log4j", "log4j"),
370+
ExclusionRule("org.slf4j", "slf4j-log4j12"),
371+
ExclusionRule("org.slf4j", "slf4j-nop")
372+
),
373+
assembly / assemblyJarName := "geotrellis-stac-example.jar",
374+
libraryDependencies := (CrossVersion
375+
.partialVersion(scalaVersion.value) match {
376+
case Some((2, scalaMajor)) if scalaMajor >= 12 =>
377+
libraryDependencies.value ++ Seq(ansiColors212)
378+
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
379+
libraryDependencies.value ++ Seq(ansiColors211)
380+
}))
381+
352382
lazy val bench = project
353383
.dependsOn(core)
354384
.settings(commonSettings)

core/src/main/scala/geotrellis/server/ExtentReification.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@ package geotrellis.server
1818

1919
import geotrellis.raster.{ProjectedRaster, MultibandTile, CellSize}
2020
import geotrellis.vector.Extent
21-
import cats._
22-
import cats.data.EitherT
2321
import cats.effect._
2422
import simulacrum._
2523

26-
import java.util.UUID
27-
2824

2925
@typeclass trait ExtentReification[A] {
3026
@op("extentReification") def extentReification(self: A)(implicit contextShift: ContextShift[IO]): (Extent, CellSize) => IO[ProjectedRaster[MultibandTile]]

core/src/main/scala/geotrellis/server/HasRasterExtents.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package geotrellis.server
1818

19-
import geotrellis.proj4.CRS
2019
import geotrellis.raster.RasterExtent
2120

2221
import cats.data.{NonEmptyList => NEL}

core/src/main/scala/geotrellis/server/LayerHistogram.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ object LayerHistogram {
7777
)
7878
}
7979
cellSize <- IO {
80-
SampleUtils.chooseLargestCellSize(rasterExtents.map(_.cellSize))
80+
SampleUtils.chooseLargestCellSize(rasterExtents, maxCells)
8181
}
8282
_ <- IO {
8383
logger.trace(

core/src/main/scala/geotrellis/server/extent/SampleUtils.scala

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ package geotrellis.server.extent
1818

1919
import geotrellis.vector.Extent
2020
import geotrellis.raster._
21-
2221
import cats.data.{NonEmptyList => NEL}
23-
import cats.effect._
24-
import cats.implicits._
25-
import cats.syntax.either._
26-
2722

2823
object SampleUtils {
2924
val logger = org.log4s.getLogger
@@ -48,6 +43,20 @@ object SampleUtils {
4843
(tl, tr, bl, br)
4944
}
5045

46+
/** Choose the largest cellsize with the minCells amount */
47+
final def chooseLargestCellSize(rasterExtents: NEL[RasterExtent], minCells: Int): CellSize =
48+
rasterExtents
49+
.reduceLeft { (chosenRE: RasterExtent, nextRE: RasterExtent) =>
50+
val (chosenCS, nextCS) = chosenRE.cellSize -> nextRE.cellSize
51+
val chosenSize = chosenCS.height * chosenCS.width
52+
val nextSize = nextCS.height * nextCS.width
53+
54+
if (nextSize > chosenSize && nextRE.size > minCells)
55+
nextRE
56+
else
57+
chosenRE
58+
}.cellSize
59+
5160
/** Choose the largest cellsize */
5261
final def chooseLargestCellSize(nativeCellSizes: NEL[CellSize]): CellSize =
5362
nativeCellSizes
@@ -74,16 +83,13 @@ object SampleUtils {
7483
chosenCS
7584
})
7685

77-
final def intersectExtents(extents: NEL[Extent]): Option[Extent] = {
86+
final def intersectExtents(extents: NEL[Extent]): Option[Extent] =
7887
extents.tail.foldLeft(Option(extents.head))({
7988
case (Some(ex1), ex2) => ex1 intersection ex2
8089
case _ => None
8190
})
82-
}
8391

8492
final def unionExtents(extents: NEL[Extent]): Option[Extent] =
8593
Some(extents.tail.foldLeft(extents.head)({ (ex1, ex2) => ex1 combine ex2 }))
8694

87-
8895
}
89-

0 commit comments

Comments
 (0)