[Geoserver-users] SLD - Raster problem

Hello,

I'm trying to execute the ras:StyleCoverage process from the WPS request
Builder.
I copy the SLD code of a raster image from Styles --> [raster image] and I
paste it
to the ras:StyleCoverage process' form.
I intergrate the sld code from the examples of the following link:
http://docs.geoserver.org/latest/en/user/styling/sld-cookbook/rasters.html
to the main code of the form.

But whenever I execute the process, GeoServer opens the image but with no
changes.
The processed image is exactly the same with the original image.

What do I do wrong ?

Greetings,
George

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Raster-problem-tp5103936.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao Gpetr,
I would more information to help out with this problem.

  • a gdalinfo on the data
  • a sample style
  • version of geoserver

Generally speaking an isolate test-case with sample data would be much appreciated.

···

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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


On Sat, Feb 15, 2014 at 3:49 AM, Gpetr <gkpetrak@anonymised.com> wrote:

Hello,

I’m trying to execute the ras:StyleCoverage process from the WPS request
Builder.
I copy the SLD code of a raster image from Styles → [raster image] and I
paste it
to the ras:StyleCoverage process’ form.
I intergrate the sld code from the examples of the following link:
http://docs.geoserver.org/latest/en/user/styling/sld-cookbook/rasters.html
to the main code of the form.

But whenever I execute the process, GeoServer opens the image but with no
changes.
The processed image is exactly the same with the original image.

What do I do wrong ?

Greetings,
George


View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Raster-problem-tp5103936.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk


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

Ciao Simone, thank you for your reply,

The version of GeoServer that I'm using is the 2.4-SNAPSHOT.
For the test I'm using a satellite image with red green and blue bands
(RGB).
The informations of the image from the gdalinfo command are:

Driver: GTiff/GeoTIFF
Files: L8_ms_30_04_13.tif
Size is 6375, 2820
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (22.234617285022399,38.179278213209521)
Pixel Size = (0.000306062103134,-0.000306062103134)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 22.2346173, 38.1792782) ( 22d14' 4.62"E, 38d10'45.40"N)
Lower Left ( 22.2346173, 37.3161831) ( 22d14' 4.62"E, 37d18'58.26"N)
Upper Right ( 24.1857632, 38.1792782) ( 24d11' 8.75"E, 38d10'45.40"N)
Lower Right ( 24.1857632, 37.3161831) ( 24d11' 8.75"E, 37d18'58.26"N)
Center ( 23.2101902, 37.7477306) ( 23d12'36.68"E, 37d44'51.83"N)
Band 1 Block=6375x1 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=6375x1 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=6375x1 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=6375x1 Type=Byte, ColorInterp=Alpha

The SLD code from the Styles --> [Raster Image] is the following:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld&quot;
xmlns:sld="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot; version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>l8_ms_30_04_13</sld:Name>
    <sld:UserStyle>
      <sld:Name>l8_ms_30_04_13</sld:Name>
      <sld:Title>l8_ms_30_04_13</sld:Title>
      <sld:FeatureTypeStyle>
        <sld:Name>name</sld:Name>
        <sld:Rule>
          <sld:RasterSymbolizer/>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

I intergrate the "Brightness and contrast" example from the following link:
http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/rasters.html#brightness-and-contrast

The final code that I insert on the form, is the following:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld&quot;
xmlns:sld="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot; version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>l8_ms_30_04_13</sld:Name>
    <sld:UserStyle>
      <sld:Name>l8_ms_30_04_13</sld:Name>
      <sld:Title>l8_ms_30_04_13</sld:Title>
      <sld:FeatureTypeStyle>
        <sld:Name>name</sld:Name>
        <sld:Rule>
         <sld:RasterSymbolizer/>
         <ContrastEnhancement>
           <Normalize />
           <GammaValue>0.5</GammaValue>
         </ContrastEnhancement>
         <ColorMap>
           <ColorMapEntry color="#008000" quantity="70" />
           <ColorMapEntry color="#663333" quantity="256" />
         </ColorMap>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

After the process, the problem remains the same.
How can fix it ?

Thank you again for your help,
Regards,
George

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Raster-problem-tp5103936p5104117.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao Gpetr,
please, read below…

···

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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


On Mon, Feb 17, 2014 at 1:52 AM, Gpetr <gkpetrak@anonymised.com> wrote:

Ciao Simone, thank you for your reply,

The version of GeoServer that I’m using is the 2.4-SNAPSHOT.
For the test I’m using a satellite image with red green and blue bands
(RGB).
The informations of the image from the gdalinfo command are:

Driver: GTiff/GeoTIFF
Files: L8_ms_30_04_13.tif
Size is 6375, 2820
Coordinate System is:
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4326”]]
Origin = (22.234617285022399,38.179278213209521)
Pixel Size = (0.000306062103134,-0.000306062103134)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 22.2346173, 38.1792782) ( 22d14’ 4.62"E, 38d10’45.40"N)
Lower Left ( 22.2346173, 37.3161831) ( 22d14’ 4.62"E, 37d18’58.26"N)
Upper Right ( 24.1857632, 38.1792782) ( 24d11’ 8.75"E, 38d10’45.40"N)
Lower Right ( 24.1857632, 37.3161831) ( 24d11’ 8.75"E, 37d18’58.26"N)
Center ( 23.2101902, 37.7477306) ( 23d12’36.68"E, 37d44’51.83"N)
Band 1 Block=6375x1 Type=Byte, ColorInterp=Red
Mask Flags: PER_DATASET ALPHA
Band 2 Block=6375x1 Type=Byte, ColorInterp=Green
Mask Flags: PER_DATASET ALPHA
Band 3 Block=6375x1 Type=Byte, ColorInterp=Blue
Mask Flags: PER_DATASET ALPHA
Band 4 Block=6375x1 Type=Byte, ColorInterp=Alpha

The SLD code from the Styles → [Raster Image] is the following:

<?xml version="1.0" encoding="UTF-8"?>

<sld:StyledLayerDescriptor xmlns=“http://www.opengis.net/sld
xmlns:sld=“http://www.opengis.net/sld
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:gml=“http://www.opengis.net/gml” version=“1.0.0”>
sld:NamedLayer
sld:Namel8_ms_30_04_13</sld:Name>
sld:UserStyle
sld:Namel8_ms_30_04_13</sld:Name>
sld:Titlel8_ms_30_04_13</sld:Title>
sld:FeatureTypeStyle
sld:Namename</sld:Name>
sld:Rule
sld:RasterSymbolizer/
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>

I intergrate the “Brightness and contrast” example from the following link:
http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/rasters.html#brightness-and-contrast

The final code that I insert on the form, is the following:

<?xml version="1.0" encoding="UTF-8"?>

<sld:StyledLayerDescriptor xmlns=“http://www.opengis.net/sld
xmlns:sld=“http://www.opengis.net/sld
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:gml=“http://www.opengis.net/gml” version=“1.0.0”>
sld:NamedLayer
sld:Namel8_ms_30_04_13</sld:Name>
sld:UserStyle
sld:Namel8_ms_30_04_13</sld:Name>
sld:Titlel8_ms_30_04_13</sld:Title>
sld:FeatureTypeStyle
sld:Namename</sld:Name>
sld:Rule
sld:RasterSymbolizer/


0.5





</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>

This won’t work on your dataset. You are trying to apply a colormap to a 4 band image, it does not make sense.

I would do this:

  • select 3 bands out of 4, removing the alpha (assuming it is an alpha)
  • aply the contrast enhancement on each single band (or gloablly)

Check the following links:

http://docs.geoserver.org/stable/en/user/styling/sld-reference/rastersymbolizer.html

http://docs.codehaus.org/display/GEOTOOLS/Raster+Symbolizer+support

After the process, the problem remains the same.
How can fix it ?

Thank you again for your help,
Regards,
George


View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Raster-problem-tp5103936p5104117.html

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


Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk


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

Hello Simone, thanks for you helpful reply,

You 're right the RGB images have another Alpha band ?
I tried some more processes specifying the bands (red, green, blue) but
nothing change.

The following code is one of my tests:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld&quot;
xmlns:sld="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot; version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>l8_ms_30_04_13</sld:Name>
    <sld:UserStyle>
      <sld:Name>l8_ms_30_04_13</sld:Name>
      <sld:Title>l8_ms_30_04_13</sld:Title>
      <sld:FeatureTypeStyle>
        <sld:Name>name</sld:Name>
        <sld:Rule>
          <Opacity>0.5</Opacity>
          <ChannelSelection>
          <RedChannel>
          <SourceChannelName>4</SourceChannelName>
         </RedChannel>
         <GreenChannel>
        <SourceChannelName>3</SourceChannelName> >
        </GreenChannel>
         <BlueChannel>
         <SourceChannelName>2</SourceChannelName>
         </BlueChannel>
         </ChannelSelection>
         <sld:RasterSymbolizer/>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

What do I do wrong ? Is needed to remove the Alpha band ? and how can I do
it from GeoServer ?

Thank you in advace,
George

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Raster-problem-tp5103936p5104591.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao Gpetr,
can you send a sample, even privately?

···

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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


On Wed, Feb 19, 2014 at 3:37 AM, Gpetr <gkpetrak@anonymised.com> wrote:

Hello Simone, thanks for you helpful reply,

You 're right the RGB images have another Alpha band ?
I tried some more processes specifying the bands (red, green, blue) but
nothing change.

The following code is one of my tests:

<?xml version="1.0" encoding="UTF-8"?>

<sld:StyledLayerDescriptor xmlns=“http://www.opengis.net/sld
xmlns:sld=“http://www.opengis.net/sld
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:gml=“http://www.opengis.net/gml” version=“1.0.0”>
sld:NamedLayer
sld:Namel8_ms_30_04_13</sld:Name>
sld:UserStyle
sld:Namel8_ms_30_04_13</sld:Name>
sld:Titlel8_ms_30_04_13</sld:Title>
sld:FeatureTypeStyle
sld:Namename</sld:Name>
sld:Rule

0.5


4


3 >


2

sld:RasterSymbolizer/
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>

What do I do wrong ? Is needed to remove the Alpha band ? and how can I do
it from GeoServer ?

Thank you in advace,
George


View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Raster-problem-tp5103936p5104591.html

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


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


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