1

I am a little bit stack here.

I want to serve a background tif using geoserver and I don't know which is the best way in terms of efficiency. My raster is 1-band GTiff UInt16 with height/terrain values. I don't care about displaying the values, I just only need them for visualization purposes.

Option A) Associate a color-ramp from a text file using gdaldem and serve the image as Type: Byte, 3-band RGB, GTiff and let geoserver display it by using the following sld code:

RasterSymbolizer>
 <ChannelSelection>
  <RedChannel>
  <SourceChannelName>1</SourceChannelName>
  </RedChannel>
  <GreenChannel>
  <SourceChannelName>2</SourceChannelName>
  </GreenChannel>
  <BlueChannel>
  <SourceChannelName>3</SourceChannelName>
  </BlueChannel>            
 </ChannelSelection>
</RasterSymbolizer>

Option B) Uploading into geoserver the 1-band, Type: UInt16, original raster and then apply a color-ramp by using a style/SLD code on raster values.

Which is faster? more efficient?

  • 1
    I would guess that the difference in speed is negligible compared to damage you can do by having unsuitable source imagery. Be sure to have tiled images with overviews. The rest is only fine tuning. You can get a definitive answer by making a small trial with both options and benchmarking. Nobody else has your hardware and environment so you are the best expert of all. – user30184 Apr 15 '15 at 8:18
  • If I go for the option B, does geoserver deal well with overviews and sld code on top of that? or overviews only for the option A. – Web-GIS entrepreneur Apr 15 '15 at 8:52
2

You can use both options.

For Option a) you don't need to create a specific SLD providing the image is RGB. GeoServer will pick the channels automatically, if you do indicate them separately you might cause unnecessary processing.

Option b) requires less processing and should work fine but it might be slightly slower since you will do the transcoding from values to color on each request.

In both cases GeoServer would make use of overview if available. For 1gb image you can keep using the geotiff format.

Simone.

0

Create your style using the SLD tool from geoserver. That why it is there ! U can also use QGIS to generate the SLD (SLD4raster) see plugin

Also if you tiff file is big u can use the geoserver mosaic plugin mosaic

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.