Ciao Martin,
a way to achieve that is by using the RasterSymbolizer (2.5.0 and
successive releases).
See http://docs.codehaus.org/display/GEOTOOLS/Raster+Symbolizer+support
for more information.


Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

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



On Mon, Feb 16, 2009 at 3:59 PM, Martin Tomko <martin.to...@geo.uzh.ch> wrote:
> Dear all,
> I am creating a gridcoverage2D (and consequently a geotiff, based on
> processing of a source geotiff DEM), and I want to quickly visualize the
> results of the analysis. Instead of opening it in some GIS, I would like
> to assign a color model to the result.and display it through the show()
> method. I tried to change the viewtype, but it does not seem to help.
>
> My GridCoverage2D is created as follows:
>
> WritableRaster hor = ...;
> GridCoverage2D gchor = gcFactoryhor.create("hor", hor, env);
> gchor.view(ViewType.GEOPHYSICS);
> gchor.show();
>
> and I use a GeoTiffWriter to output the geoTiff. Note that ArcMap open
> the geotiff fine (requiring classification to assign colors), as well as
> a normal image viewer (e.g., XnView), but the result is just a binary
> nodata/anydata black and white rendering.
>
> I see that it is possible to assign colors in the GridCoverage2D gchor =
> gcFactoryhor.create(...) part, but I am not sure how to map the values
> in the raster to the colors. Any hints welcome.
>
> Thanks
> Martin
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to