hi everyone,
it looks like that imagemosaic-jdbc only supports png format. For a project
in our research group we have to support also tiff files with float pixel
values.
i started to look into the code and know where to make the modifications.
My question now is:
I have to create a BufferedImage that deals with float values coming from a
float data buffer, filled with data coming from the database.
- postgis database returns at tif (st_astiff) in binary array
- the array is passed to the jai decoder from which i get a buffered image
SeekableStream stream = new ByteArraySeekableStream(imageBytes);
String decoderName = null;
for (String dn : ImageCodec.getDecoderNames(stream)) {
decoderName = dn;
break;
}
ImageDecoder decoder = ImageCodec.createImageDecoder(decoderName,
stream, null);
PlanarImage img = PlanarImage.wrapRenderedImage(decoder
.decodeAsRenderedImage());
return img.getAsBufferedImage();
- the buffered image has then as color model:
FloatDoubleColorModel: ColorModel: #pixelBits = 32 numComponents = 1 color
space = java.awt.color.ICC_ColorSpace@6f42ac7 transparency = 1 has alpha =
false isAlphaPre = false
- the buffered image has then as sample model:
ComponentSampleModelJAI: dataType=4 numBands=1 width=78 height=130
bandOffsets=[ 0]
The problem is now, that when making a getfeatureinfo on that wms layer with
geoserver I get incorrect values, while the shape of the image is ok.
Any suggestion what am I doing wrong?
Do I use the wrong sample model?
thanks for any help
Markus
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/imagemosaic-jdbc-float-type-support-on-tiff-tp4998379.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users