[Geoserver-users] Geoserver ImageMosaicJDBC returns grey color for 'out of bbox'-region

Hi,

I am using the ImageMosaicJDBC plugin to access raster data stored in an
oracle 12g databaste with spatial extension.

I created a raster layer in GeoServer 2.8.0, which works fine. When I
request the layer via wms or openlayer, the region, which is outside of my
bounding box seems to be grey instead of white/nodata.

<http://osgeo-org.1560.x6.nabble.com/file/n5255345/grey.jpg&gt;

Because we use the downloaded layer for further processing we get problems
with that grey color. Creating a layer based on the same tiff file but
stored in the file system the region contains white/nodata-values like
expected.

Is there any setting to define the color for the 'out of bbox'-region?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I think you can set a background color.

Cheers
Christian

···

On Wed, Mar 9, 2016 at 1:42 PM, hanshupe <paul.schneeweiss@anonymised.com> wrote:

Hi,

I am using the ImageMosaicJDBC plugin to access raster data stored in an
oracle 12g databaste with spatial extension.

I created a raster layer in GeoServer 2.8.0, which works fine. When I
request the layer via wms or openlayer, the region, which is outside of my
bounding box seems to be grey instead of white/nodata.

<http://osgeo-org.1560.x6.nabble.com/file/n5255345/grey.jpg>

Because we use the downloaded layer for further processing we get problems
with that grey color. Creating a layer based on the same tiff file but
stored in the file system the region contains white/nodata-values like
expected.

Is there any setting to define the color for the ‘out of bbox’-region?


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

That's what I expected, but unfortunately the ImageMosaicJDBC plugin ignores
the background color setting. I tried to set the background color in the
geoserver layer settings as well as to define the BGCOLOR WMS parameter
directly in the URL. Both settings didn't influence the grey background.
Is anyone using ImageMosaicJDBC in conjunction with Oracle who can confirm
this behaviour?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256198.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Maybe Oracle itself uses this background. If this is the case then GeoServer has no chance to “recolor”.

Christian

···

On Mon, Mar 14, 2016 at 12:25 PM, hanshupe <paul.schneeweiss@anonymised.com> wrote:

That’s what I expected, but unfortunately the ImageMosaicJDBC plugin ignores
the background color setting. I tried to set the background color in the
geoserver layer settings as well as to define the BGCOLOR WMS parameter
directly in the URL. Both settings didn’t influence the grey background.
Is anyone using ImageMosaicJDBC in conjunction with Oracle who can confirm
this behaviour?


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256198.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Hi Christian,
I tried some configurations on the oracle georaster object and found out
that the problem occurs with the ImageMosaicJDBC plugin with floating
numbers (Real 32 bits / celldepth=32BIT_REAL). When I convert the datatype
for example to 16 or 8bit I don't get a wrong background color (but of
course my values get truncated so I need 32bit floats). The same 32bit real
GeoTIFF accessed from the file system works well.

How does ImageMosaicJDBC determine the background color of the area that
lies outside of the raster image?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256328.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

The background color is passed as RGBA Color object. The object is can handle integers and floats. Maybe the int–>float conversion is the problem.

A debug session would be nice but is not possible. Maybe I can send you a jar file producing additional log files.

Please set the logging level (Settings->Global) to GEOTOOLS_DEVELOPER_LOGGING and check the log file first. Maybe you can find a hint.

Christian

···

On Mon, Mar 14, 2016 at 10:57 PM, hanshupe <paul.schneeweiss@anonymised.com> wrote:

Hi Christian,
I tried some configurations on the oracle georaster object and found out
that the problem occurs with the ImageMosaicJDBC plugin with floating
numbers (Real 32 bits / celldepth=32BIT_REAL). When I convert the datatype
for example to 16 or 8bit I don’t get a wrong background color (but of
course my values get truncated so I need 32bit floats). The same 32bit real
GeoTIFF accessed from the file system works well.

How does ImageMosaicJDBC determine the background color of the area that
lies outside of the raster image?


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256328.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

I turned on the logging mode, the output related to the background color was:

2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
----PARAMS START-------
2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
OutputTransparentColor: null
2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
BackgroundColor: java.awt.Color[r=255,g=255,b=255]
2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
Interpolation: javax.media.jai.InterpolationNearest@anonymised.com

Our raster image has only one band, which is 32BIT_REAL. The background
color outside of the raster object should contain nodata values only (which
is set to -9999 in this case).
Debug session or jar-file with additional output would be great!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256364.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

HI Paul,
if the data is single band then you need a colormap in the raster symbolizer
to display it. You can then simply set the -9999 value to a transparent color

Cheers
Andrea

···

On Tue, Mar 15, 2016 at 8:41 AM, Paul Schneeweiss <paul.schneeweiss@anonymised.com> wrote:

I turned on the logging mode, the output related to the background color was:

2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
----PARAMS START-------
2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
OutputTransparentColor: null
2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
BackgroundColor: java.awt.Color[r=255,g=255,b=255]
2016-03-15 09:36:18,767 INFO [org.geotools.gce.imagemosaic.jdbc] -
Interpolation: javax.media.jai.InterpolationNearest@anonymised.com

Our raster image has only one band, which is 32BIT_REAL. The background
color outside of the raster object should contain nodata values only (which
is set to -9999 in this case).
Debug session or jar-file with additional output would be great!


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256364.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Hi Andrea
Thanks for the hint. I didn't mention it, but I actually don't care about
the actual visualization of the output, like how the float values are
colored. It's important that the float values are preserved in the resulting
image and thus the nodata values and the background color as well.
As I said that works as expected when I access the layer from the file
system, but not via ImageMosaicJDBC (and oracle db) so I assumed the problem
is there.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256400.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Paul,
I’m a bit confused by your answer… a WMS is never going to preserve the raw float
values*, it always renders them to a 8bit palette, it’s just making one up
on the fly by constrast stretching the input values.

If you want the raw values, you should be using the WCS protocol, not the WMS one

Cheers
Andrea

*: there is actually a community module called DDS that generates the output in “raw”
format, as a DDS/BIL raw binary that is normally used to serve DEM data to worldwind
or Cesium, both are wrongly using the WMS protocol to get raw data because of
its simplicity compared to WCS.

···

On Tue, Mar 15, 2016 at 10:47 AM, hanshupe <paul.schneeweiss@anonymised.com> wrote:

Hi Andrea
Thanks for the hint. I didn’t mention it, but I actually don’t care about
the actual visualization of the output, like how the float values are
colored. It’s important that the float values are preserved in the resulting
image and thus the nodata values and the background color as well.
As I said that works as expected when I access the layer from the file
system, but not via ImageMosaicJDBC (and oracle db) so I assumed the problem
is there.


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256400.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Hi Andrea, ok you are right i didn't mean to get get raw float values. The
only problem in my case is actually that in contrast to the file-based layer
the ImageMosaicJDBC plugin in combination with the 32bit float data type
seems to generate background color values which I never defined.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256423.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Hans,
the issue is simply that the GeoServer rendering chain is unaware of nodata
values.

We have some changes in the pipe to properly support nodata that we hoped
to activate by default in GeoServer 2.8.x, but when the release time came we
found they were not ready for prime time.
They have improved considerably since then and we are using them in production
in some cases, but there are still some glitches… if you are using a 2.8.x series
and want to try them out, you need to add a system variable to the JVM running
GeoServer:
-Dorg.geotools.coverage.jaiext.enabled=true

Cheers
Andrea

···

On Tue, Mar 15, 2016 at 12:10 PM, hanshupe <paul.schneeweiss@anonymised.com> wrote:

Hi Andrea, ok you are right i didn’t mean to get get raw float values. The
only problem in my case is actually that in contrast to the file-based layer
the ImageMosaicJDBC plugin in combination with the 32bit float data type
seems to generate background color values which I never defined.


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256423.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


I have already tried it with JAIEXT (In the JAI settings I just added all
JAIEXT operations to JAI operations - hope that was correct) and it didn't
change the output. I am currently using GS 2.8.0 btw., are there some
changes in GS 2.9.0 beta?

What confuses me is that my output is as expected when I add the layer based
on a GeoTIFF file. Only the layer (with the same GeoTIFF imported in oracle)
based on the ImageMosaicJDBC source shows the undesired background values.
Hence I assumed the problem comes from the ImageMosaicJDBC plugin and not
from GS?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5256430.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Tue, Mar 15, 2016 at 12:34 PM, hanshupe <paul.schneeweiss@anonymised.com>
wrote:

I have already tried it with JAIEXT (In the JAI settings I just added all
JAIEXT operations to JAI operations - hope that was correct) and it didn't
change the output. I am currently using GS 2.8.0 btw., are there some
changes in GS 2.9.0 beta?

Hum... the fixes we have made so far have landed on 2.8.x too, you can try
2.8.2
But I don't remember a specific one indeed.

What confuses me is that my output is as expected when I add the layer
based
on a GeoTIFF file. Only the layer (with the same GeoTIFF imported in
oracle)
based on the ImageMosaicJDBC source shows the undesired background values.
Hence I assumed the problem comes from the ImageMosaicJDBC plugin and not
from GS?

Oh ok... then it might be that the image mosaic JDBC does not set the NODATA
properties? Unsure, I have no direct experience with that plugin

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

I created a ticket for that issue with detailed steps to reproduce the
problem:

https://osgeo-org.atlassian.net/browse/GEOS-7582

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-ImageMosaicJDBC-returns-grey-color-for-out-of-bbox-region-tp5255345p5271258.html
Sent from the GeoServer - User mailing list archive at Nabble.com.