Ciao MIlton, please read below...
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Founder - Software Engineer
Via Carignoni 51
55041  Camaiore (LU)
Italy

phone: +39 0584983027
fax:      +39 0584983027
mob:    +39 333 8128928


http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Fri, Dec 4, 2009 at 6:47 PM, Milton Jonathan
<mil...@tecgraf.puc-rio.br> wrote:
> Hello Simone
>
> My questions then are:
>
> 1. Is it easy to use ImageMosaic without the "put the data in a directory"
> part? Because I think it would be impractical if we would need to move each
> individual image into a separate directory in order to render it with
> transparency..
The short answer is no. However you could easily grab some code from
the ImageMosaic to do this work since it simply relies on the
ImageWorker and add it to GeoTiff class or better better to the Base
reader class so that all the plugins could use it.


>
> 2. Alternatively, is it easy to use JAI for the collar approach? In other
> words, is this operation already available or does it need to be coded? I
> understand perfectly that this is better when dealing with rotated satellite
> images, but the transparency feature is easier for the user to understand,
> seems easier/faster to render, and is useful in other cases too.

I actually have no idea, I have not given a thought to how to do this.
We should look for some image processing algorithm to do this I am
pretty sure we are not the first ones to approach this problem.

>
> Another issue here is that, whatever the solution, we will need to store
> this information somewhere (i.e., if transparency is being used and/or which
> color is transparent, or alternatively if we need to extract the collar of
> the image and any necessary parameters in order to do that). Before your
> feedbacks, I was sure that the RasterSymbolizer would be the place to store
> this kind of metadata (and I still think what we're talking about here is a
> Style). So, is there any mechanism in the ImageMosaic so that the user can
> define once the transparency color and this info is then kept somewhere? Or
> do you need to specify the transparency color everytime you render it?
>
There is a specific parameter for that, actually there are two:

http://docs.geoserver.org/1.7.x/en/user/tutorials/image_mosaic_plugin/imagemosaic.html

Simone.

> By the way, what's the best reference doc for the ImageMosaic plugin?
>
> Thanks for all
> Milton
>
> Simone Giannecchini wrote:
>>
>> Ciao Milton,
>> please read below...
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Founder - Software Engineer
>> Via Carignoni 51
>> 55041  Camaiore (LU)
>> Italy
>>
>> phone: +39 0584983027
>> fax:      +39 0584983027
>> mob:    +39 333 8128928
>>
>>
>> http://www.geo-solutions.it
>> http://geo-solutions.blogspot.com/
>> http://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Thu, Dec 3, 2009 at 2:51 PM, Milton Jonathan
>> <mil...@tecgraf.puc-rio.br> wrote:
>>>
>>> Hello
>>>
>>> This is probably a stupid question but.. how does one set a
>>> "transparency color" for a RasterSymbolizer? What I mean is to define a
>>> specific color to be transparent (as we do in everyday image editing
>>> tools), so that the background of rotated satellite images doesn't show
>>> on the map.
>>
>> RasterSymbolizer is not really meant to do that. It is supposed to
>> linearly interpolate values into colors.
>> I have slightly changed this in the GeoTools implementation, see these
>> docs for referece:
>>
>> http://geoserver.org/display/GEOSDOC/RasterSymbolizer
>> http://docs.codehaus.org/display/GEOTOOLS/Raster+Symbolizer+support
>>
>> Something similar to what you need can be done with the ImageMosaic
>> input transparent color, notice that that works for RGB like images
>> though. However the best things IMHO would be to develop a simple JAI
>> operation that can be used
>> to recognize the black collars and then use the concept of ROI to move
>> them around. I am saying this since, let's assume that you have a
>> grayscale raster, 16 bits unsigned (popular in remote sensing) where
>> the collar is pure black (0 intensity) it is ok to say black -->
>> transparent; however in an orthphoto, usually RGB, you can still have
>> black holes sometimes, however, if you do black --> transparent you
>> might be washing out part of your image that are of interest. In this
>> case, a collar approach would be much better.
>>
>>> The important thing here is that the raster may have more than 1 band or
>>> channel (e.g., 3 RGB bands, or n bands with a ChannelSelection to choose
>>> which ones will be represented as RGB). For images with a single gray
>>> channel, it looks as if I could achieve this result by setting an
>>> opacity value for a specific entry in a ColorMap. However, how do I
>>> specify a ColorMapEntry whose quantity is a combination of the 3 bands?
>>> (e.g., yellow should be transparent)
>>
>> You can try to use the ImageMosaic. Easiest thing is to put your data
>> in a dir and point the mosaic plugin to that dir so that it will index
>> it and create a reader for you.
>>
>> Simone
>>>
>>> Thanks
>>> Milton
>>>
>>> --
>>>
>>> Milton Jonathan
>>> Grupo GIS e Meio Ambiente
>>> Tecgraf/PUC-Rio
>>> Tel: +55-21-3527-2502
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>> a free event focused on virtualization and cloud computing.
>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>> http://p.sf.net/sfu/redhat-sfdev2dev
>>> _______________________________________________
>>> Geotools-gt2-users mailing list
>>> Geotools-gt2-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>>
>>
>
> --
>
> Milton Jonathan
> Grupo GIS e Meio Ambiente
> Tecgraf/PUC-Rio
> Tel: +55-21-3527-2502
>
>

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to