Skip to content

Commit 6991f8c

Browse files
committed
Bump GeoTools version up to 30.x-SNAPSHOT
1 parent ae5e2ca commit 6991f8c

14 files changed

Lines changed: 29 additions & 32 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Changed
1010
- Fix FileRangeReaderProvider parsing URI in windows [#3507](https://github.com/locationtech/geotrellis/pull/3507)
1111
- Regrid: force crop to avoid going out of memory [#3518](https://github.com/locationtech/geotrellis/pull/3518)
12+
- Bump GeoTools version up to 30.x [#3521](https://github.com/locationtech/geotrellis/pull/3521)
1213

1314
## [3.7.0] - 2023-02-26
1415

geotools/src/main/scala/geotrellis/geotools/FeatureToSimpleFeatureMethods.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ package geotrellis.geotools
1919
import geotrellis.proj4.CRS
2020
import geotrellis.util.MethodExtensions
2121
import geotrellis.vector._
22-
23-
import org.opengis.feature.simple.SimpleFeature
22+
import org.geotools.api.feature.simple.SimpleFeature
2423

2524
trait FeatureToSimpleFeatureMethods[G <: Geometry, T] extends MethodExtensions[Feature[G, T]] {
2625

geotools/src/main/scala/geotrellis/geotools/GeometryToSimpleFeature.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ package geotrellis.geotools
1818

1919
import geotrellis.vector._
2020
import geotrellis.proj4.CRS
21-
22-
import org.geotools.feature.simple.{SimpleFeatureTypeBuilder, SimpleFeatureBuilder}
23-
import org.opengis.feature.simple.SimpleFeature
21+
import org.geotools.api.feature.simple.SimpleFeature
22+
import org.geotools.feature.simple.{SimpleFeatureBuilder, SimpleFeatureTypeBuilder}
2423

2524
object GeometryToSimpleFeature {
2625
val geometryField = "the_geom"

geotools/src/main/scala/geotrellis/geotools/GeometryToSimpleFeatureMethods.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import geotrellis.proj4._
2020
import geotrellis.util.MethodExtensions
2121
import geotrellis.vector._
2222

23-
import org.opengis.feature.simple.SimpleFeature
23+
import org.geotools.api.feature.simple.SimpleFeature
2424

2525
trait GeometryToSimpleFeatureMethods[G <: Geometry] extends MethodExtensions[G] {
2626

geotools/src/main/scala/geotrellis/geotools/GridCoverage2DConverters.scala

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@ import geotrellis.proj4.CRS
2020
import geotrellis.raster._
2121
import geotrellis.raster.io.geotiff.util._
2222
import geotrellis.vector.Extent
23-
2423
import it.geosolutions.imageio.utilities.ImageIOUtilities
2524
import org.geotools.coverage.Category
2625
import org.geotools.coverage.GridSampleDimension
2726
import org.geotools.coverage.grid._
28-
import org.geotools.geometry.Envelope2D
2927
import org.geotools.referencing.{CRS => GeoToolsCRS}
3028
import org.geotools.coverage.util.CoverageUtilities
3129
import org.geotools.util.NumberRange
32-
import org.opengis.coverage.SampleDimensionType
33-
import org.opengis.referencing.crs.CoordinateReferenceSystem
30+
import org.geotools.geometry.jts.ReferencedEnvelope
31+
import org.geotools.api.coverage._
32+
import org.geotools.api.referencing.crs.CoordinateReferenceSystem
3433
import spire.syntax.cfor._
3534

3635
import java.awt.Color
@@ -198,18 +197,18 @@ object GridCoverage2DConverters {
198197
}
199198

200199
/**
201-
* A function to produce a GeoTools Envelope2D from a Geotrellis
200+
* A function to produce a GeoTools ReferencedEnvelope from a Geotrellis
202201
* Extent and CRS.
203202
*
204203
* @param extent The Geotrellis Extent
205204
* @param crs The CRS of the raster
206205
*
207-
* @return A GeoTools Envelope2D
206+
* @return A GeoTools ReferencedEnvelope
208207
*/
209-
def getEnvelope2D(extent: Extent): Envelope2D = {
208+
def getEnvelope2D(extent: Extent): ReferencedEnvelope = {
210209
val Extent(xmin, ymin, xmax, ymax) = extent
211210

212-
new Envelope2D(null, xmin, ymin, (xmax - xmin), (ymax - ymin))
211+
ReferencedEnvelope.rect(xmin, ymin, xmax - xmin, ymax - ymin, null)
213212
}
214213

215214
def getGeotoolsCRS(crs: CRS): CoordinateReferenceSystem = {
@@ -222,20 +221,20 @@ object GridCoverage2DConverters {
222221
}
223222

224223
/**
225-
* A function to produce a GeoTools Envelope2D from a Geotrellis
224+
* A function to produce a GeoTools ReferencedEnvelope from a Geotrellis
226225
* Extent and CRS. If the CRS cannot be converted, a null GeoTools
227226
* CRS is used.
228227
*
229228
* @param extent The Geotrellis Extent
230229
* @param crs The CRS of the raster
231230
*
232-
* @return A GeoTools Envelope2D
231+
* @return A GeoTools ReferencedEnvelope
233232
*/
234-
def getEnvelope2D(extent: Extent, crs: CRS): Envelope2D = {
233+
def getEnvelope2D(extent: Extent, crs: CRS): ReferencedEnvelope = {
235234
val Extent(xmin, ymin, xmax, ymax) = extent
236235
val geoToolsCRS = getGeotoolsCRS(crs)
237236

238-
new Envelope2D(geoToolsCRS, xmin, ymin, (xmax - xmin), (ymax - ymin))
237+
ReferencedEnvelope.rect(xmin, ymin, xmax - xmin, ymax - ymin, geoToolsCRS)
239238
}
240239

241240
def getValueRange(cellType: CellType): (Double, Double) =

geotools/src/main/scala/geotrellis/geotools/SimpleFeatureToFeature.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package geotrellis.geotools
1818

1919
import geotrellis.vector._
20-
import org.opengis.feature.simple.SimpleFeature
20+
import org.geotools.api.feature.simple.SimpleFeature
2121

2222
import scala.collection._
2323
import scala.collection.JavaConverters._

geotools/src/main/scala/geotrellis/geotools/SimpleFeatureToFeatureMethods.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ package geotrellis.geotools
1818

1919
import geotrellis.util.MethodExtensions
2020
import geotrellis.vector._
21-
22-
import org.opengis.feature.simple.SimpleFeature
21+
import org.geotools.api.feature.simple.SimpleFeature
2322

2423
import scala.reflect.ClassTag
2524

geotools/src/main/scala/geotrellis/geotools/SimpleFeatureToGeometryMethods.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package geotrellis.geotools
1919
import geotrellis.util.MethodExtensions
2020
import geotrellis.vector._
2121

22-
import org.opengis.feature.simple.SimpleFeature
22+
import org.geotools.api.feature.simple.SimpleFeature
2323

2424
import scala.reflect.ClassTag
2525

geotools/src/main/scala/geotrellis/geotools/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import geotrellis.raster._
2020
import geotrellis.util.MethodExtensions
2121
import geotrellis.vector._
2222

23+
import org.geotools.api.feature.simple.SimpleFeature
2324
import org.geotools.coverage.grid.GridCoverage2D
24-
import org.opengis.feature.simple.SimpleFeature
2525

2626
package object geotools {
2727
implicit class withSinglebandRasterToGridCoverage2DMethods(val self: Raster[Tile]) extends MethodExtensions[Raster[Tile]]

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import sbt._
1818

1919
object Version {
20-
val geotools = "25.4"
20+
val geotools = "30-SNAPSHOT"
2121
val spire = "0.17.0"
2222
val accumulo = "1.10.3"
2323
val cassandra = "4.15.0"

0 commit comments

Comments
 (0)