[jira] Created: (GEOT-2819) Duplication of ColorMapEntry broken AND RasterSymbolizerImpl default property name is "raster" instead of "geom"

1 message Options
Embed this post
Permalink
JIRA jira@codehaus.org

[jira] Created: (GEOT-2819) Duplication of ColorMapEntry broken AND RasterSymbolizerImpl default property name is "raster" instead of "geom"

Reply Threaded More More options
Print post
Permalink
Duplication of ColorMapEntry broken AND RasterSymbolizerImpl default property name is "raster" instead of "geom"
----------------------------------------------------------------------------------------------------------------

                 Key: GEOT-2819
                 URL: http://jira.codehaus.org/browse/GEOT-2819
             Project: GeoTools
          Issue Type: Bug
          Components: core coverage, core styling
    Affects Versions: 2.6.0
         Environment: Java 1.6
            Reporter: Stefan Alfons Krüger
             Fix For: 2.6.1
         Attachments: DuplicatingBrokenForColorMapEntry_AndDefaultPoprNameFixForRasterSymbolizerImpl.patch

Two things:

1. DuplicatingStyleVisitor foregts quantity value. Fixed and JUnit test provided.

2. The default constructor RasterSymbolizerImpl() sets the geometry property name to "raster". This is hardly ever called, because for example StyleFactoryImpl.java is explicitly setting it to "geom"
    public RasterSymbolizer getDefaultRasterSymbolizer() {
        return createRasterSymbolizer("geom",
            filterFactory.literal(1.0), null, null, null, null,
            null, null);
    }

Also the FeatureUtilities.wrapGridCoverage and wrapGridCoverageReader methods set geom attribute to "geom" by default. So in the rare case, that the RasteSymbolizer is created with  " new RasterSymbolizerImpl() ", it doesn't find the attribute "raster", beause it's called "geom".

So my conclusion is, that "geom" is a correct default, and "raster" is a bad default.

This patch also changes the default constructor of RasterSymbolizerImpl to use "geom" instead of "raster".

Tested all JUnit tests against my patch.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel