[Geoserver-users] handle multi band rasters with SLD or Transformation?

I got myself in a tangle today working with LandSat 5 data - I know this should be the easiest thing in the world right?

RasterSymbolizer lets you select a number of channels (4,5,1 generally match with RGB for a “true color” image). But here is where I run into trouble - the data is in the range 0.0 to 1.1 (with -Infinite as NO_DATA). I had hoped that setting this up in the geoserver layer definition, and then using SLD to select out the bands would magically work.

Ran into a couple problems:

  • In the resulting visual NO_DATA is not respected as transparent … tried also in a layer group
  • I was not sure I need to transform the data from each band (remember 0.0 - 1.0 float) to 0 to 256. We cannot do a colormap entry on each band … so I am a bit stuck.

Exploring the problem with a single band (and color map) we can map no data to a transparent color just fine - but this does not get me a full color image :frowning:

Having a look at geometry transformations to see if we can stage a decent RGB channel before letting SLD have a crack at it:

  • BandMerge lets me combine several bands into a resolution image
  • Reclassify could be used to remap the 0.0f to 1.0f range to 0 to 256 integers expected by SLD

Putting these two ideas together (as a geometry transformation) may work - but I wanted to check before proceeding.

Random troubles (not sure if these are a bug to report or user error):

  • Setting transparency color to #000000 fails to render (error rendering coverage on the fast path). I assume this works for RGB image and I am getting in trouble for combining #0000000 (with a byte for each band) and my original data that has a float.

Error rendering coverage on the fast path
java.lang.IllegalStateException: Unsupported data type.
Unsupported data type.
Details:
org.geoserver.platform.ServiceException: Error rendering coverage on the fast path
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:338)

···

On 18 March 2015 at 15:55, Jody Garnett <jody.garnett@anonymised.com> wrote:

I got myself in a tangle today working with LandSat 5 data - I know this should be the easiest thing in the world right?

RasterSymbolizer lets you select a number of channels (4,5,1 generally match with RGB for a “true color” image). But here is where I run into trouble - the data is in the range 0.0 to 1.1 (with -Infinite as NO_DATA). I had hoped that setting this up in the geoserver layer definition, and then using SLD to select out the bands would magically work.

Ran into a couple problems:

  • In the resulting visual NO_DATA is not respected as transparent … tried also in a layer group
  • I was not sure I need to transform the data from each band (remember 0.0 - 1.0 float) to 0 to 256. We cannot do a colormap entry on each band … so I am a bit stuck.

Exploring the problem with a single band (and color map) we can map no data to a transparent color just fine - but this does not get me a full color image :frowning:

Having a look at geometry transformations to see if we can stage a decent RGB channel before letting SLD have a crack at it:

  • BandMerge lets me combine several bands into a resolution image
  • Reclassify could be used to remap the 0.0f to 1.0f range to 0 to 256 integers expected by SLD

Putting these two ideas together (as a geometry transformation) may work - but I wanted to check before proceeding.


Jody Garnett

Jody,
random answer… don’t believe we are familiar with this issue, so the usual drill applies, open a ticket,
make it reproducible by adding data, style and request, if you can, add you own analysis of the issue or do a pull request

Cheers
Andrea

···

On Wed, Mar 18, 2015 at 11:56 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Random troubles (not sure if these are a bug to report or user error):

  • Setting transparency color to #000000 fails to render (error rendering coverage on the fast path). I assume this works for RGB image and I am getting in trouble for combining #0000000 (with a byte for each band) and my original data that has a float.

Error rendering coverage on the fast path
java.lang.IllegalStateException: Unsupported data type.
Unsupported data type.
Details:
org.geoserver.platform.ServiceException: Error rendering coverage on the fast path
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:338)


Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/


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


Jody Garnett

On 18 March 2015 at 15:55, Jody Garnett <jody.garnett@anonymised.com> wrote:

I got myself in a tangle today working with LandSat 5 data - I know this should be the easiest thing in the world right?

RasterSymbolizer lets you select a number of channels (4,5,1 generally match with RGB for a “true color” image). But here is where I run into trouble - the data is in the range 0.0 to 1.1 (with -Infinite as NO_DATA). I had hoped that setting this up in the geoserver layer definition, and then using SLD to select out the bands would magically work.

Ran into a couple problems:

  • In the resulting visual NO_DATA is not respected as transparent … tried also in a layer group
  • I was not sure I need to transform the data from each band (remember 0.0 - 1.0 float) to 0 to 256. We cannot do a colormap entry on each band … so I am a bit stuck.

Exploring the problem with a single band (and color map) we can map no data to a transparent color just fine - but this does not get me a full color image :frowning:

Having a look at geometry transformations to see if we can stage a decent RGB channel before letting SLD have a crack at it:

  • BandMerge lets me combine several bands into a resolution image
  • Reclassify could be used to remap the 0.0f to 1.0f range to 0 to 256 integers expected by SLD

Putting these two ideas together (as a geometry transformation) may work - but I wanted to check before proceeding.

==

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

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
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.