Hi Simone or Daniele, I guess you are the only ones here to have some insight in what should be done here.
Given that some types of raster should not do changed in SampleModel throught styling, I was wondering if anyways something can be done. For example in the new styler for uDig I would need to have the possibility to set a pixel to transparent. I see the ImageWorker already has the methods to do so, so I am wondering what it would take to bring that into SLD as a vendor option? Another nice thing to have would be a color substitution. To better explain myself you would be able to for example view a b&w map over an ortophoto by changing the white background transparent and the black foreground to some more visible color. What do you think about it, how much would a hypotetic effort be? Thanks for any advice, Andrea On Thu, Aug 19, 2010 at 12:05 PM, andrea antonello <[email protected]> wrote: > Quick update. > > The samplemodel of the image is modified by the styling operation. > Ad since b&white map was in MultiPixelPackedSampleModel, it resulted > nicely handled (those images are heavily compressed). > After the styling the image has a PixelInterleavedSampleModel model, > which very probably makes it explode. > > Hmmm, so for these types of maps, it is better not to play with style. > Is there a way to make just a color transparent? > > Andrea > > > > On Thu, Aug 19, 2010 at 9:26 AM, andrea antonello > <[email protected]> wrote: >> Hi, >> as part of the new raster style editor for udig I am trying to style a >> black and white geotiff. >> My first test is to just make two ColorMapEntry to change the two main >> colors to something else: >> >> ColorMap colorMap = sf.createColorMap(); >> >> Color one = Color.green; >> Color two = Color.red; >> >> ColorMapEntry entry = sf.createColorMapEntry(); >> entry.setQuantity(ff.literal(0)); >> entry.setColor(ff.literal(one)); >> entry.setOpacity(ff.literal(1)); >> colorMap.addColorMapEntry(entry); >> >> entry = sf.createColorMapEntry(); >> entry.setQuantity(ff.literal(1)); >> entry.setColor(ff.literal(two)); >> entry.setOpacity(ff.literal(1)); >> colorMap.addColorMapEntry(entry); >> >> rasterSym.setColorMap(colorMap); >> >> >> That would be the same as the non programmatic way add the following to the >> sld: >> >> <FeatureTypeStyle> >> <Rule> >> <RasterSymbolizer> >> <ColorMap> >> <ColorMapEntry color="#00FF00" quantity="0" /> >> <ColorMapEntry color="#FF0000" quantity="1" /> >> </ColorMap> >> </RasterSymbolizer> >> </Rule> >> </FeatureTypeStyle> >> >> >> Alright, what happens is that the image that before was reading and >> displaying nice, now starts freezing everything as if it was reading >> everything and not just the overviews. >> >> Can anyone with a proper insight give me some advice about how to proceed? >> >> Also, is there a different way to just alpha a single color in a coverage? >> >> Thanks, >> Andrea >> > ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
