Skip to content

Replace JAI Background Discussion

Jody Garnett edited this page Aug 16, 2016 · 1 revision

Background and Discussion on Replace JAI

From GeoTools 11-17-2015 meeting:

JAI Replacement Update
----------------------

- Technical debt page: https://github.com/geotools/geotools/wiki/Replace-JAI (please help update this)
- LocationTech Steeting Committee: will worth with LocationTech to fundraise for development.
- OSGeo Board has responded positively: Will work with OSGeo to update downstream GeoTools / GeoServer and related project
- EclipseCon Europe - had a good discussion the "science working group", and the GeoTrellis lead Rob Emanuele
- The replacement should be a joint LocationTech/OSGeo project.
- Still need a good name for this project (TileProcessingEngine, OpenJI, OpenTI (for tile imaging, OpenTIP)?

From OSGeo Board 11-12-2015 meeting:

14:50 Quick GeoTools update from Jody
* We have been working to make GeoTools depend only on open source
this year we have a much harder task: https://github.com/geotools/geotools/wiki/Replace-JAI
* I wanted to bring this effort, established at the last geotools/geoserver meeting to the attention of the board.
* jeff: OSGeo is interested as it affects several projects
* helena: we need to check this kind of support with the conditions of our non profit status
* mike: as part of our 501c4, organizations could support this but they wouldn't receive a tax deduction for doing so

Andrea from GeoTools Developer mailing list:

Two pretty important aspects to take into account:
* Ability to process tiles in parallel
* The basic implementation must all be pure java, we cannot have core depend on native libs (it makes deployment
  significantly harder, in some enviroment native deps are simply banned)

Retaining the ability for native libs accelerate processing if installed and available is a definite plus though

From GeoTools 11-03-2015 meeting:

ImageProcessing
---------------
To review - Java Advanced Imaging is "end of life" and we are looking at
stratagies to replace.

JAI
- key feature is the tile based processing engine, you set up your
processing chain (kind of like functional programming) and the engine
will bring in raster data a chunk at a time allowing processing of files
larger than memory.
- no_data and region of interest support has been added as additional
operations via JAI-EXT for the processing engine.

Alternatives:

1. OpenCV (see above)
- http://opencv.org/
- BSD license, C/C++ codebase with bindings for Java
- Use OpenCL to share work with CPU/GPU
- Does it have the ability to work data larger then memory? Need to
check ...

2. ImageJ
- had a look, seems to be comparable to JAI (ie it is an image
processing engine)
- Eclipse Science Working Group is starting in on this one (and may have
room for collaboration)
- Found the engine here: http://imagej.net/ImgLib2
- Could not see any support for working with raster data larger than
memory. Has region of interest (ROI) support, not sure about no_data.
- At least one nD dimensional data format.
- has high level operators (feaure extractions etc...)

3. JAI Replacement
- Need a project name for JAI replacement, then start fund raising
- Interest from Boundless, GeoSolutions, LocationTech, H2Gis too
- would like work though OSGeo and LocationTech
- mostly focused on the technical requirements
- name? JAI-NG, GTAI, GeoAI, JSCIP (Java Scalable Image Processing)
JAI-15, OpenJImaging, OpenJI? OpenJAI? JIOpen? GeoNee
- No use of JAI interfaces ... because Oracle
- "Java" is a trademark
- This is a *lot* of work, both in the project, and in migrating
GeoTools and GeoServer.
- Q: How well does GeoTools protect downstream projects? Pretty good
(except for direct rendering path and some WPS). Remaining code is
hidden behind "image worker".
- Note: RenderedImage is a Java class, not PlanarImage which is the JAI
subclass.

4. GeoTrellis
- requires data to be broken into tiles before use, making use of sparc
to handle concurrent processing.
- Not sure about no_data and ROI support.

OpenCV Discussion
-----------------

Jeff Bower has a proposal sent out, Andrea has had a quick glance at the
proposal.

Discussion:
- possible replacement for native JAI replacment? Ie implement JAI
Operators we care about in terms of OpenCV (Scale, Translate, General
Affine, Warp, Crop, Lookup) and then give the a higher priority so they
are used if OpenCV plugin they are used.
- discussion focused on WMS optimization above, Jeff's customers may be
using WPS for "image analyitics" - so they may be using WPS?!
- standard operations may be worse because of latency in calling JAI
operations via an accelerator.
- concern about moving data on and off GPU? OpenCV can be configured to
stay on CPU
- note: GIS procesing is not normal image processing - requires region
of interest (similar to a mask), and 'no data' (some values should not
be processed).
- OpenCV has some support for the above :)
Clone this wiki locally