h2gis icon indicating copy to clipboard operation
h2gis copied to clipboard

Raster datatype refactoring

Open ebocher opened this issue 6 years ago • 6 comments

In order to not break H2 with Android, the Raster data type proposed to support georeferenced image must be refactored.

  1. The Raster type must be specified by a set of interfaces
  2. ImageIO driver must be added via OSGI

See https://github.com/h2database/h2database/pull/945

ebocher avatar Mar 12 '18 19:03 ebocher

Is it technically possible to satisfy the Android compatibility requested by the H2 team? @nicolas-f

ebocher avatar Aug 20 '18 15:08 ebocher

With a complete rewrite of H2 raster it would be possible. But reading image files require additional dependency to work on both JavaVM and Android Dalvik.

nicolas-f avatar Aug 21 '18 07:08 nicolas-f

So I propose : Add a raster type to H2 (with a limited set of functions) Add the others functions and drivers (file reader and writer) as an H2GIS extension.

ebocher avatar Aug 21 '18 14:08 ebocher

@ebocher Actually you aren't required to provide compatibility in this functionality. It may not work without AWT, it's OK.

The problem was in introduced hard dependencies to unavailable on some platforms classes in totally unrelated code. The whole database was broken on such platforms, this is not acceptable.

This problem is not specific only to Android. Since Java 9 not all modules can be available. java.desktop module that was required by this functionality should not be strongly required by H2. It may be required by this functionality, however.

katzyn avatar Aug 23 '18 13:08 katzyn

@katzyn I want to re-open this issue and plan a road map. Raster support is an import issue for spatial database and build more complex analysis. Do you have any pre-requisites, requirements, etc.? Thanks in advance.

ebocher avatar Mar 09 '21 19:03 ebocher

I think existing issues with LOB storage backends need to be resolved first.

And implementation of the new data type may not have any strong references to optional Java modules.

katzyn avatar Mar 11 '21 10:03 katzyn