Skip to content

Commit e087ce5

Browse files
update ref. It also changed in integration tests, so probably again ac change in source data. Around 2020-03. Add netcdf export to visually comparpare when needed.
1 parent 01213df commit e087ce5

File tree

3 files changed

+77
-72
lines changed

3 files changed

+77
-72
lines changed

geotrellis-integrationtests/src/test/resources/org/openeo/geotrellis/integrationtests/collectiontests/expected/TERRASCOPE_S2_FAPAR_V2_2020-03-01_2020-03-31/part-00000-4acbbe6b-988b-4cb7-b0bf-996aa2a02421-c000.csv

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ date,feature_index,avg(band_0)
116116
2020-03-01T00:00:00.000Z,18,
117117
2020-03-01T00:00:00.000Z,5,191.49074074074073
118118
2020-03-03T00:00:00.000Z,5,180.25233644859813
119-
2020-03-01T00:00:00.000Z,2,11.282051282051283
119+
2020-03-01T00:00:00.000Z,2,
120120
2020-03-01T00:00:00.000Z,22,
121121
2020-03-01T00:00:00.000Z,17,
122122
2020-03-03T00:00:00.000Z,2,62.42152466367713
@@ -139,19 +139,19 @@ date,feature_index,avg(band_0)
139139
2020-03-13T00:00:00.000Z,43,
140140
2020-03-13T00:00:00.000Z,29,
141141
2020-03-16T00:00:00.000Z,39,
142-
2020-03-21T00:00:00.000Z,31,190.81142857142856
143-
2020-03-21T00:00:00.000Z,0,163.53639846743295
142+
2020-03-21T00:00:00.000Z,31,191.24
143+
2020-03-21T00:00:00.000Z,0,
144144
2020-03-19T00:00:00.000Z,28,
145-
2020-03-21T00:00:00.000Z,33,162.9516129032258
146-
2020-03-19T00:00:00.000Z,39,85.99465240641712
147-
2020-03-21T00:00:00.000Z,39,114.7807486631016
148-
2020-03-21T00:00:00.000Z,28,89.21739130434783
149-
2020-03-19T00:00:00.000Z,0,154.83673469387756
150-
2020-03-19T00:00:00.000Z,31,64.3491124260355
151-
2020-03-19T00:00:00.000Z,33,118.95161290322581
145+
2020-03-21T00:00:00.000Z,33,135.07407407407408
146+
2020-03-19T00:00:00.000Z,39,92.41176470588235
147+
2020-03-21T00:00:00.000Z,39,108.36619718309859
148+
2020-03-21T00:00:00.000Z,28,90.30088495575221
149+
2020-03-19T00:00:00.000Z,0,176.06451612903226
150+
2020-03-19T00:00:00.000Z,31,
151+
2020-03-19T00:00:00.000Z,33,129.0
152152
2020-03-16T00:00:00.000Z,26,109.35260115606937
153-
2020-03-21T00:00:00.000Z,26,187.85260115606937
154-
2020-03-19T00:00:00.000Z,26,59.7
153+
2020-03-21T00:00:00.000Z,26,187.9931506849315
154+
2020-03-19T00:00:00.000Z,26,
155155
2020-03-26T00:00:00.000Z,33,151.53225806451613
156156
2020-03-24T00:00:00.000Z,33,153.93548387096774
157157
2020-03-24T00:00:00.000Z,28,84.78985507246377
@@ -197,43 +197,41 @@ date,feature_index,avg(band_0)
197197
2020-03-26T00:00:00.000Z,36,20.936893203883496
198198
2020-03-29T00:00:00.000Z,36,
199199
2020-03-16T00:00:00.000Z,49,
200-
2020-03-21T00:00:00.000Z,23,96.19661016949152
201-
2020-03-19T00:00:00.000Z,23,17.29032258064516
202-
2020-03-21T00:00:00.000Z,38,135.751677852349
203-
2020-03-19T00:00:00.000Z,49,60.5625
204-
2020-03-19T00:00:00.000Z,38,
205-
2020-03-21T00:00:00.000Z,49,77.35031847133757
200+
2020-03-21T00:00:00.000Z,23,95.39661016949152
201+
2020-03-19T00:00:00.000Z,23,
202+
2020-03-21T00:00:00.000Z,38,134.83892617449663
203+
2020-03-19T00:00:00.000Z,49,
204+
2020-03-21T00:00:00.000Z,49,79.85350318471338
206205
2020-03-16T00:00:00.000Z,14,
207206
2020-03-16T00:00:00.000Z,21,
208-
2020-03-19T00:00:00.000Z,14,68.67391304347827
207+
2020-03-19T00:00:00.000Z,14,70.38356164383562
209208
2020-03-19T00:00:00.000Z,8,
210-
2020-03-21T00:00:00.000Z,14,161.11764705882354
211-
2020-03-21T00:00:00.000Z,8,123.56410256410257
212-
2020-03-19T00:00:00.000Z,21,118.71428571428571
209+
2020-03-21T00:00:00.000Z,14,160.79876160990713
210+
2020-03-21T00:00:00.000Z,8,123.66666666666667
211+
2020-03-19T00:00:00.000Z,21,132.23809523809524
213212
2020-03-21T00:00:00.000Z,40,100.69333333333333
214-
2020-03-21T00:00:00.000Z,21,183.78571428571428
213+
2020-03-21T00:00:00.000Z,21,183.92857142857142
215214
2020-03-19T00:00:00.000Z,40,64.6923076923077
216215
2020-03-16T00:00:00.000Z,11,
217216
2020-03-16T00:00:00.000Z,1,51.680851063829785
218217
2020-03-16T00:00:00.000Z,20,
219-
2020-03-19T00:00:00.000Z,1,75.515625
220-
2020-03-19T00:00:00.000Z,11,52.75
221-
2020-03-21T00:00:00.000Z,1,182.34722222222223
222-
2020-03-21T00:00:00.000Z,20,182.33641975308643
223-
2020-03-19T00:00:00.000Z,20,61.5
224-
2020-03-21T00:00:00.000Z,11,178.96428571428572
218+
2020-03-19T00:00:00.000Z,1,
219+
2020-03-19T00:00:00.000Z,11,
220+
2020-03-21T00:00:00.000Z,1,181.41666666666666
221+
2020-03-21T00:00:00.000Z,20,188.37179487179486
222+
2020-03-19T00:00:00.000Z,20,
223+
2020-03-21T00:00:00.000Z,11,178.9142857142857
225224
2020-03-16T00:00:00.000Z,6,
226225
2020-03-16T00:00:00.000Z,15,56.45054945054945
227226
2020-03-16T00:00:00.000Z,27,
228227
2020-03-16T00:00:00.000Z,9,58.029411764705884
229-
2020-03-19T00:00:00.000Z,15,36.78260869565217
230-
2020-03-21T00:00:00.000Z,15,43.228070175438596
228+
2020-03-19T00:00:00.000Z,15,41.82857142857143
229+
2020-03-21T00:00:00.000Z,15,43.01169590643275
231230
2020-03-19T00:00:00.000Z,27,78.77586206896552
232231
2020-03-19T00:00:00.000Z,6,
233232
2020-03-21T00:00:00.000Z,27,186.66666666666666
234233
2020-03-21T00:00:00.000Z,6,
235-
2020-03-19T00:00:00.000Z,9,
236-
2020-03-21T00:00:00.000Z,9,105.08239700374531
234+
2020-03-21T00:00:00.000Z,9,104.00754716981132
237235
2020-03-24T00:00:00.000Z,23,87.51186440677967
238236
2020-03-26T00:00:00.000Z,23,80.4135593220339
239237
2020-03-24T00:00:00.000Z,49,47.92356687898089

geotrellis-integrationtests/src/test/resources/org/openeo/geotrellis/integrationtests/collectiontests/expected/TERRASCOPE_S2_NDVI_V2_2020-03-01_2020-03-31/part-00000-e6c3f64b-cdd7-4290-b1b1-aba0748a2432-c000.csv

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ date,feature_index,avg(band_0)
116116
2020-03-01T00:00:00.000Z,18,
117117
2020-03-01T00:00:00.000Z,5,241.69444444444446
118118
2020-03-03T00:00:00.000Z,5,227.2336448598131
119-
2020-03-01T00:00:00.000Z,2,34.743589743589745
119+
2020-03-01T00:00:00.000Z,2,
120120
2020-03-01T00:00:00.000Z,22,
121121
2020-03-01T00:00:00.000Z,17,
122122
2020-03-03T00:00:00.000Z,2,122.51569506726457
@@ -139,19 +139,19 @@ date,feature_index,avg(band_0)
139139
2020-03-13T00:00:00.000Z,43,
140140
2020-03-13T00:00:00.000Z,29,
141141
2020-03-16T00:00:00.000Z,39,
142-
2020-03-21T00:00:00.000Z,31,246.46857142857144
143-
2020-03-21T00:00:00.000Z,0,222.13793103448276
142+
2020-03-21T00:00:00.000Z,31,246.85714285714286
143+
2020-03-21T00:00:00.000Z,0,
144144
2020-03-19T00:00:00.000Z,28,
145-
2020-03-21T00:00:00.000Z,33,222.90322580645162
146-
2020-03-19T00:00:00.000Z,39,149.83957219251337
147-
2020-03-21T00:00:00.000Z,39,178.40641711229947
148-
2020-03-21T00:00:00.000Z,28,154.731884057971
149-
2020-03-19T00:00:00.000Z,0,214.0
150-
2020-03-19T00:00:00.000Z,31,113.02958579881657
151-
2020-03-19T00:00:00.000Z,33,181.70967741935485
145+
2020-03-21T00:00:00.000Z,33,203.1851851851852
146+
2020-03-19T00:00:00.000Z,39,156.40641711229947
147+
2020-03-21T00:00:00.000Z,39,172.7887323943662
148+
2020-03-21T00:00:00.000Z,28,156.12389380530973
149+
2020-03-19T00:00:00.000Z,0,229.09677419354838
150+
2020-03-19T00:00:00.000Z,31,
151+
2020-03-19T00:00:00.000Z,33,189.3548387096774
152152
2020-03-16T00:00:00.000Z,26,201.29768786127167
153-
2020-03-21T00:00:00.000Z,26,248.57514450867052
154-
2020-03-19T00:00:00.000Z,26,111.05
153+
2020-03-21T00:00:00.000Z,26,246.9554794520548
154+
2020-03-19T00:00:00.000Z,26,
155155
2020-03-26T00:00:00.000Z,33,207.33870967741936
156156
2020-03-24T00:00:00.000Z,33,211.3548387096774
157157
2020-03-24T00:00:00.000Z,28,146.59420289855072
@@ -199,44 +199,42 @@ date,feature_index,avg(band_0)
199199
2020-03-26T00:00:00.000Z,36,64.08252427184466
200200
2020-03-29T00:00:00.000Z,36,
201201
2020-03-16T00:00:00.000Z,49,
202-
2020-03-21T00:00:00.000Z,23,158.70508474576272
203-
2020-03-19T00:00:00.000Z,23,32.895161290322584
204-
2020-03-21T00:00:00.000Z,38,194.93288590604027
205-
2020-03-19T00:00:00.000Z,49,70.1875
206-
2020-03-19T00:00:00.000Z,38,
207-
2020-03-21T00:00:00.000Z,49,132.95541401273886
202+
2020-03-21T00:00:00.000Z,23,157.9457627118644
203+
2020-03-19T00:00:00.000Z,23,
204+
2020-03-21T00:00:00.000Z,38,194.16107382550337
205+
2020-03-19T00:00:00.000Z,49,
206+
2020-03-21T00:00:00.000Z,49,135.15286624203821
208207
2020-03-16T00:00:00.000Z,14,
209208
2020-03-16T00:00:00.000Z,40,
210209
2020-03-16T00:00:00.000Z,21,
211-
2020-03-19T00:00:00.000Z,14,135.78623188405797
210+
2020-03-19T00:00:00.000Z,14,135.87671232876713
212211
2020-03-19T00:00:00.000Z,8,
213-
2020-03-21T00:00:00.000Z,14,216.74922600619195
214-
2020-03-21T00:00:00.000Z,8,194.7863247863248
215-
2020-03-19T00:00:00.000Z,21,183.0
212+
2020-03-21T00:00:00.000Z,14,216.53250773993807
213+
2020-03-21T00:00:00.000Z,8,194.06837606837607
214+
2020-03-19T00:00:00.000Z,21,192.73809523809524
216215
2020-03-21T00:00:00.000Z,40,162.33333333333334
217-
2020-03-21T00:00:00.000Z,21,239.9047619047619
216+
2020-03-21T00:00:00.000Z,21,240.66666666666666
218217
2020-03-19T00:00:00.000Z,40,129.71794871794873
219218
2020-03-16T00:00:00.000Z,11,
220219
2020-03-16T00:00:00.000Z,1,110.68085106382979
221220
2020-03-16T00:00:00.000Z,20,
222-
2020-03-19T00:00:00.000Z,1,157.96875
223-
2020-03-19T00:00:00.000Z,11,104.5
224-
2020-03-21T00:00:00.000Z,1,242.98611111111111
225-
2020-03-21T00:00:00.000Z,20,247.54320987654322
226-
2020-03-19T00:00:00.000Z,20,120.0
227-
2020-03-21T00:00:00.000Z,11,234.24285714285713
221+
2020-03-19T00:00:00.000Z,1,
222+
2020-03-19T00:00:00.000Z,11,
223+
2020-03-21T00:00:00.000Z,1,242.01388888888889
224+
2020-03-21T00:00:00.000Z,20,247.57051282051282
225+
2020-03-19T00:00:00.000Z,20,
226+
2020-03-21T00:00:00.000Z,11,233.55
228227
2020-03-16T00:00:00.000Z,6,152.25
229228
2020-03-16T00:00:00.000Z,15,70.45054945054945
230229
2020-03-16T00:00:00.000Z,27,
231230
2020-03-16T00:00:00.000Z,9,119.24489795918367
232-
2020-03-19T00:00:00.000Z,15,90.93478260869566
233-
2020-03-21T00:00:00.000Z,15,99.88888888888889
231+
2020-03-19T00:00:00.000Z,15,99.55714285714286
232+
2020-03-21T00:00:00.000Z,15,99.67251461988305
234233
2020-03-19T00:00:00.000Z,27,143.63793103448276
235234
2020-03-19T00:00:00.000Z,6,
236235
2020-03-21T00:00:00.000Z,27,242.16666666666666
237236
2020-03-21T00:00:00.000Z,6,
238-
2020-03-19T00:00:00.000Z,9,
239-
2020-03-21T00:00:00.000Z,9,168.5056179775281
237+
2020-03-21T00:00:00.000Z,9,167.48301886792453
240238
2020-03-24T00:00:00.000Z,23,145.0
241239
2020-03-26T00:00:00.000Z,23,139.5322033898305
242240
2020-03-24T00:00:00.000Z,49,96.71974522292993

geotrellis-integrationtests/src/test/scala/org/openeo/geotrellis/integrationtests/CollectionTests.scala

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import com.azavea.gdal.GDALWarp
44
import com.fasterxml.jackson.databind.{JsonNode, ObjectMapper}
55
import geotrellis.layer.SpaceTimeKey
66
import geotrellis.proj4.{CRS, LatLng}
7-
import geotrellis.raster.CellSize
7+
import geotrellis.raster.{CellSize, ShortConstantNoDataCellType}
8+
import geotrellis.raster.gdal.GDALRasterSource
9+
import geotrellis.raster.io.geotiff.GeoTiff
810
import geotrellis.spark.MultibandTileLayerRDD
911
import geotrellis.spark.util.SparkUtils
1012
import org.apache.hadoop.hdfs.HdfsConfiguration
@@ -16,9 +18,11 @@ import org.junit.jupiter.params.ParameterizedTest
1618
import org.junit.jupiter.params.provider.Arguments.arguments
1719
import org.junit.jupiter.params.provider.{Arguments, MethodSource}
1820
import org.openeo.geotrellis.file.{ProbaVPyramidFactoryTest, PyramidFactory}
19-
import org.openeo.geotrellis.{AggregateSpatialTest, ComputeStatsGeotrellisAdapter, LayerFixtures, OpenEOProcesses, ProjectedPolygons}
21+
import org.openeo.geotrellis.netcdf.{NetCDFOptions, NetCDFRDDWriter}
22+
import org.openeo.geotrellis.{AggregateSpatialTest, ComputeStatsGeotrellisAdapter, LayerFixtures, MergeCubesSpec, OpenEOProcesses, ProjectedPolygons}
2023
import org.openeo.geotrelliscommon.DataCubeParameters
2124
import org.openeo.opensearch.OpenSearchClient
25+
import ucar.nc2.dataset.NetcdfDataset
2226

2327
import java.net.URL
2428
import java.nio.file.{Files, Paths}
@@ -121,20 +125,20 @@ object CollectionTests {
121125
// arguments("TERRASCOPE_S1_SLC_COHERENCE_V1"),
122126
// arguments("TERRASCOPE_S1_GAMMA0_V1"),
123127
arguments("TERRASCOPE_S2_FAPAR_V2"), // Has layer
124-
arguments("TERRASCOPE_S2_NDVI_V2"), // Has layer
128+
// arguments("TERRASCOPE_S2_NDVI_V2"), // Has layer
125129
// arguments("TERRASCOPE_S2_LAI_V2"),
126130
// arguments("TERRASCOPE_S2_FCOVER_V2"),
127131
// arguments("TERRASCOPE_S2_TOC_V2"), // Has layer. Took 55min in CI
128132
// arguments("S1_GRD_SIGMA0_ASCENDING"),
129133
// arguments("S1_GRD_SIGMA0_DESCENDING"),
130-
arguments("PROBAV_L3_S5_TOC_100M"), // Has layer
131-
arguments("PROBAV_L3_S10_TOC_333M"), // Has layer
134+
// arguments("PROBAV_L3_S5_TOC_100M"), // Has layer
135+
// arguments("PROBAV_L3_S10_TOC_333M"), // Has layer
132136
// arguments("COPERNICUS_30"),
133137
// arguments("COPERNICUS_90"),
134138
// arguments("CGLS_FAPAR_V2_GLOBAL"),
135139
// arguments("CGLS_LAI_V2_GLOBAL"),
136140
// arguments("CGLS_LAI300_V1_GLOBAL"),
137-
arguments("CGLS_DMP300_V1_GLOBAL"),
141+
// arguments("CGLS_DMP300_V1_GLOBAL"),
138142
))
139143
}
140144

@@ -335,6 +339,11 @@ class CollectionTests {
335339
Paths.get(output_dir, file_name).toString,
336340
)
337341

342+
val newPath = Paths.get(output_dir, file_name).toString + "/openEo.nc"
343+
val options = new NetCDFOptions
344+
options.setBandNames(new util.ArrayList(util.Arrays.asList("band")))
345+
NetCDFRDDWriter.writeRasters(layer, newPath, options)
346+
338347
println("Outputted path: " + Paths.get(output_dir, file_name).toString)
339348

340349
if (Files.exists(Paths.get(expected_dir, file_name))) {

0 commit comments

Comments
 (0)