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

GDAL upgrade to 3.8.0 #571

Closed
jdries opened this issue Nov 7, 2023 · 8 comments
Closed

GDAL upgrade to 3.8.0 #571

jdries opened this issue Nov 7, 2023 · 8 comments
Assignees

Comments

@jdries
Copy link
Contributor

jdries commented Nov 7, 2023

GDAL 3.8 has an important performance fix for reading via curl:
https://github.com/OSGeo/gdal/pull/8065/files

/vsicurl/: avoid the same region to be downloaded at the same time from concurrent threads (#8041)

@jdries jdries self-assigned this Nov 20, 2023
@EmileSonneveld
Copy link
Contributor

It would also help for working with signed bytes: #527 (comment)

jdries added a commit to Open-EO/openeo-geotrellis-kubernetes that referenced this issue Dec 6, 2023
jdries added a commit to Open-EO/openeo-geotrellis-kubernetes that referenced this issue Dec 6, 2023
@jdries
Copy link
Contributor Author

jdries commented Dec 6, 2023

On dev, gdal 3.8.1:
| CPU usage | 114.746 cpu-seconds |
| Wall time | 65 seconds |
Input Pixel | 43.75 mega-pixel
Memory usage | 293,366.836 mb-seconds
Network Received | 774,659,843 b

On Prod, gdal 3.7:
CPU usage | 201.745 cpu-seconds
Wall time | 126 seconds
Input Pixel | 45 mega-pixel
Memory usage | 664,469.121 mb-seconds
Network Received | 9,124,609,845 b

So network received is drastically lower!
There is however a problem with georeferencing, data in 3.8.1 is shifted a lot!

jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 7, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 8, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Dec 8, 2023
@jdries
Copy link
Contributor Author

jdries commented Dec 11, 2023

Pixel shift is detected by unit tests, e.g.:
org.openeo.geotrellis.layers.FileLayerProviderTest#testPixelValueOffsetNeededDark

@jdries
Copy link
Contributor Author

jdries commented Dec 11, 2023

The projection information was no longer returned, it seems that we need an explicit rebuild of GDALWarp:

geotrellis/gdal-warp-bindings#124

@jdries
Copy link
Contributor Author

jdries commented Dec 11, 2023

Simple code to spot the issue:

@Test
 def testGDALRasterSource():Unit = {
   val rs = GDALRasterSource("/home/driesj/java/openeo-geotrellis-extensions/openeo-geotrellis/target/test-classes/org/openeo/geotrellis/eodata/Sentinel-2/MSI/L2A/2023/04/05/S2A_MSIL2A_20230405T105031_N0509_R051_T31UFS_20230405T162253.SAFE/GRANULE/L2A_T31UFS_A040660_20230405T105026/IMG_DATA/R10m/T31UFS_20230405T105031_B04_10m.jp2")
   println(rs.dataset.getProjection)
   println(rs.crs)
   println(rs.extent)
   println(rs.metadata)
   val raster = rs.read().get
   GeoTiff(raster,rs.crs).write("/tmp/out.tiff",true)
 }

@jdries
Copy link
Contributor Author

jdries commented Jan 11, 2024

Logged downstream issue:
geotrellis/gdal-warp-bindings#126
OSGeo/gdal#9059

jdries added a commit to Open-EO/openeo-geotrellis-kubernetes that referenced this issue Feb 19, 2024
jdries added a commit to Open-EO/openeo-geotrellis-kubernetes that referenced this issue Feb 19, 2024
jdries added a commit that referenced this issue Feb 19, 2024
@jdries
Copy link
Contributor Author

jdries commented Feb 20, 2024

done, based on a single batch job run, network bytes seem to be reduced by 50%

tcassaert pushed a commit that referenced this issue Feb 27, 2024
@pomadchin
Copy link

pomadchin commented May 15, 2024

👋 GT <= 3.7.0 does not fully support GDAL 3.7.x +, see locationtech/geotrellis#3538

In particular: https://github.com/locationtech/geotrellis/pull/3538/files#diff-e3f79b70bbf4adb275aa45d4a2aa8724969651e97e8ac697d60fb2aa82dfc795R61-R70

GDAL Introduced Int8 cellType for the signed bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants