Hi Jon,
Not sure is you want to create a new set of images, but gdal_translate
can be used to create a 3-band image like you describe in your first
example. It's been a little while since I've done this, but I'm pretty
sure that if you took a 4-band image that was currently ordered like
this:
Band | Color
------------
1 Red
2 Green
3 Blue
4 IR
You can create a 3-band false color image that uses the IR band like
this:
gdal_translate -b 4 -b 1 -b 2 <in_file> <out_file>
I know what you mean about the lack of blue, its a challenge to make
pseudo-natural color look right.
--
Roger
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Jon
Britton
Sent: Thursday, January 31, 2008 1:19 AM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Problem displaying 4-band raster images
As some kind of false colour composite. The kind would vary depending on
what the user wants (ideally). The most basic I would require is the
following, which nicely displays vegetation:
Red: band 3 (Near infra-red band)
Green: band 2 (red band)
Blue: band 1 (green band)
I know that the SLD ChannelSelect tag would allow me to do this. The
thing is about the SPOT data I have is that there is no blue band. There
are more complex composities which would allow the data to be displayed
in a more 'natural' way to make up for the lack of a blue band, eg:
Red: band2
Green: (3 * band1 + band3)/4
Blue: (3 * band1 - band3)/4
I'm not sure if this would supported by SLDs but is quite a common
method of displaying this sort of data.
Thanks,
Jon
Roger.Andre wrote:
Just out of curiosity, how would you like to display the 4-band data?
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net on behalf of Jon
Britton
Sent: Wed 1/30/2008 12:12 PM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Problem displaying 4-band raster images
Thanks for the help.
I think I will have to leave it for now, I don't really have too much
time.
I might have a look at some point over the next week or so. Really I
was just questioning whether this default behaviour of treating band 4
as the alpha channel is really a good idea, since I would have thought
multi-band raster data does not need an alpha channel.
Anyway, thanks for your reply. I look forward to when I can get
support for RasterSymbolizer since for my purposes it would be very
useful indeed!
Exciting times ahead 
Thanks,
Jon
sjf8 wrote:
Jon,
As you probably know, RasterSymbolizer allows you to pull out
specific bands and indicate them to be put into the red, green and
blue color bands.
As for displaying a 4-band image...in my **very limited** experience
most folks work with 4-band images by mapping some set of the bands
into the rgba color-space. If the fourth band is being treated as
alpha, it's probably because that's the default implementation of a
non-RasterSymbolizer-enhanced geoserver.
If you're building geotools/geoserver from source, you can apply the
patch at http://jira.codehaus.org/browse/GEOT-1691 to the latest
geotools 2.4.x checkout, then rebuild geotools and geoserver, and
you'll have rastersymbolizer support (preliminary! May have bugs!)
built into your geoserver. That might help you to render your image
better.
Alternatively, you can wait till GT-2.4.0/GS-1.6.0 goes out the door
and then I'll be applying that patch to 2.4.x and it will show up in
geoserver 1.6.x nightly builds. Also, there's some hope that an
improved version of that code will be landing on geotools trunk
sometime soon (in the next week/weeks?) which will make
rastersymbolizer support available on geoserver 1.7.x (trunk) nightly
snapshots.
If you get the patch applied to GT 2.4.x, let us know if you find
bugs.
We can try to track them down, or at least get them fixed in the
trunk version when it shows up.
--saul
On Wed, 2008-01-30 at 07:48 -0800, Jon Britton wrote:
Is this problem I'm getting simply a bug or is there a reason for
GeoServer doing this with the 4th band? Or maybe it's to do with the
information stored in the GeoTiff? I know GDAL sometimes says a band
is the alpha channel.
Cheers,
Jon
aaime wrote:
>
> Jon Britton ha scritto:
>> Hi,
>> Thought it would be sensible to make a new post from this.
>>
>> Basically, GeoServer treats 4-band images rather strangely. Below
>> are
two
>> images, the first one displays the 4 band image, the second shows
>> the same image with the 4th band removed with GDAL. It seems as
>> thought
GeoServer
>> treats the 4th band as alpha.
>>
>> Has any work started on getting RasterSymbolizer to work with
GeoServer?
>
> Yes, there is a branch with work underway, and we should start
> merging stuff back after the 1.6.0 release, thought it's not clear
> whether the changes will be against 1.6.x or trunk...
>
> Simone, Chris, what are the plans on this one?
>
> Cheers
> Andrea
>
>
--------------------------------------------------------------------
-----
> This SF.net email is sponsored by: Microsoft Defy all challenges.
> Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
---------------------------------------------------------------------
---- This SF.net email is sponsored by: Microsoft Defy all
challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
View this message in context:
http://www.nabble.com/Problem-displaying-4-band-raster-images-tp151830
90p15189596.html Sent from the GeoServer - User mailing list archive
at Nabble.com.
----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
View this message in context:
http://www.nabble.com/Problem-displaying-4-band-raster-images-tp15183090
p15200699.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users