View • Attachments (0) • Info
JGrass bases heavily on raster analysis, which introduces the need of some new concepts we will need.
We use raster maps for doing analyses on them they are rendered with some colortable but mainly they are read as numbers there are two mandatory concepts in this that I feel are missing in udig.
issues by JGrass
proposed solutions by UDig
workflow:
issues by JGrass
The GRASS format keeps the data matrix compressed (deflate) row by row with a header that keeps row addresses in order to read only the active region so when an operation choses a raster map for processing the map is read with the active region bounds and resolution.
There are various files that form the concept of header:
GRASS maps can be of type integer, float and double.
PROBLEM:
Consuming JGrass Binary format.
SOLUTION 1
If you have read/write software you don't necessarily need to create a geotools reader/writer you just need to create an adapter from your model to GridCoverage and pass that to the GridCoverageRenderer.
SOLUTION 2
Write a fully-fledged plugin for GeoTools Coverage package
THOUGHTS
The StreamingRenderer uses Coverage Plugins' Readers to create coverages when feeding the GridCoverageRender. It does so by providing an envelope and the requested viewport size to the reader which selects the best availaible resolution depending on the view's resolution and on the capabilities of the underlying format in terms of overviews and/or decimation on reading, as well as tiling. (this is ok for the rendering, but not for what we need most, i.e. datahandling. In that case I define the working resolution on an independent way. Also for high resolution pringing that will be an issue.)
If we go directly to the GridCoverageRenderer no "external" optimization is performed and the provided data is processed. This means no overviews and no decimation.
In this special case (JGrass binary format) we could do subsetting and decimation on the fly at the reader level as well as intelligent tiling. JGRass binary format has stripes like striped geotiff so in the end what you could do is loading only the stripes you need and of each stripe only the needed part possibly with a bit of multithreading (undelrying JAI-ImageIO framework comes with that almost by default)
If we develop a plugin there also are various tricks that we can use to speed things up
If you wrap your architecture behind a GridCoverage2D you might loose some performance gain ( in some cases, with big dataset you would get awful performances) and you might waste a lot of time trying to actually mimic the GridCoverage2D. IMHO the latter solution could be much faster but could also generate some (quite some?) problems
later on. It would great to investigate this path a bit deeper, especially if this integration needs to be done very quickly.
This is also somehow a resume of the format part, they are linked.
proposed solutions by UDig
UDig recomends an "adapter" to GridCoverage; you may also wish to render you raster model directly (it is an option). We don't expect you to do your operations in terms of geotools interfaces.
UDig sees 3 ways to do rendering right now.
|
Browse Space |
Explore Confluence |
Add Content |
|
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. |