Search in sources :

Example 6 with SelectedChannelType

use of org.geotools.styling.SelectedChannelType in project sldeditor by robward-scisys.

the class VOGeoServerContrastEnhancementNormalizeBlueTest method createChannelSelectionError.

/**
 * Creates the channel selection error object.
 *
 * @param styleFactory the style factory
 * @param contrastMethod the contrast method
 * @return the channel selection
 */
private ChannelSelection createChannelSelectionError(StyleFactoryImpl styleFactory, ContrastMethod contrastMethod) {
    ContrastEnhancement contrastEnhancement = (ContrastEnhancement) styleFactory.contrastEnhancement(null, contrastMethod.name());
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Map<String, Expression> options = contrastEnhancement.getOptions();
    options.put("algorithm", ff.literal("TestStretchToMinimumMaximum"));
    options.put("minValue", ff.literal("1.0"));
    options.put("maxValue", ff.literal("5.0"));
    SelectedChannelType channelType = styleFactory.createSelectedChannelType("channel name", contrastEnhancement);
    SelectedChannelType[] channels = new SelectedChannelType[3];
    channels[0] = channelType;
    channels[1] = channelType;
    channels[2] = channelType;
    ChannelSelection channelSelection = styleFactory.createChannelSelection(channels);
    return channelSelection;
}
Also used : SelectedChannelType(org.geotools.styling.SelectedChannelType) ContrastEnhancement(org.geotools.styling.ContrastEnhancement) Expression(org.opengis.filter.expression.Expression) ChannelSelection(org.geotools.styling.ChannelSelection) FilterFactory(org.opengis.filter.FilterFactory)

Example 7 with SelectedChannelType

use of org.geotools.styling.SelectedChannelType in project sldeditor by robward-scisys.

the class VOGeoServerContrastEnhancementNormalizeGreenTest method createChannelSelection.

/**
 * Creates the channel selection object.
 *
 * @param styleFactory the style factory
 * @param contrastMethod the contrast method
 * @return the channel selection
 */
private ChannelSelection createChannelSelection(StyleFactoryImpl styleFactory, ContrastMethod contrastMethod) {
    ContrastEnhancement contrastEnhancement = (ContrastEnhancement) styleFactory.contrastEnhancement(null, contrastMethod.name());
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Map<String, Expression> options = contrastEnhancement.getOptions();
    options.put("algorithm", ff.literal("StretchToMinimumMaximum"));
    options.put("minValue", ff.literal("1"));
    options.put("maxValue", ff.literal("5"));
    SelectedChannelType channelType = styleFactory.createSelectedChannelType("channel name", contrastEnhancement);
    SelectedChannelType[] channels = new SelectedChannelType[3];
    channels[0] = channelType;
    channels[1] = channelType;
    channels[2] = channelType;
    ChannelSelection channelSelection = styleFactory.createChannelSelection(channels);
    return channelSelection;
}
Also used : SelectedChannelType(org.geotools.styling.SelectedChannelType) ContrastEnhancement(org.geotools.styling.ContrastEnhancement) Expression(org.opengis.filter.expression.Expression) ChannelSelection(org.geotools.styling.ChannelSelection) FilterFactory(org.opengis.filter.FilterFactory)

Example 8 with SelectedChannelType

use of org.geotools.styling.SelectedChannelType in project sldeditor by robward-scisys.

the class VOGeoServerContrastEnhancementNormalizeGreenTest method createChannelSelectionError.

/**
 * Creates the channel selection error object.
 *
 * @param styleFactory the style factory
 * @param contrastMethod the contrast method
 * @return the channel selection
 */
private ChannelSelection createChannelSelectionError(StyleFactoryImpl styleFactory, ContrastMethod contrastMethod) {
    ContrastEnhancement contrastEnhancement = (ContrastEnhancement) styleFactory.contrastEnhancement(null, contrastMethod.name());
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Map<String, Expression> options = contrastEnhancement.getOptions();
    options.put("algorithm", ff.literal("TestStretchToMinimumMaximum"));
    options.put("minValue", ff.literal("1.0"));
    options.put("maxValue", ff.literal("5.0"));
    SelectedChannelType channelType = styleFactory.createSelectedChannelType("channel name", contrastEnhancement);
    SelectedChannelType[] channels = new SelectedChannelType[3];
    channels[0] = channelType;
    channels[1] = channelType;
    channels[2] = channelType;
    ChannelSelection channelSelection = styleFactory.createChannelSelection(channels);
    return channelSelection;
}
Also used : SelectedChannelType(org.geotools.styling.SelectedChannelType) ContrastEnhancement(org.geotools.styling.ContrastEnhancement) Expression(org.opengis.filter.expression.Expression) ChannelSelection(org.geotools.styling.ChannelSelection) FilterFactory(org.opengis.filter.FilterFactory)

Example 9 with SelectedChannelType

use of org.geotools.styling.SelectedChannelType in project sldeditor by robward-scisys.

the class VOGeoServerContrastEnhancementNormalizeGreyTest method createChannelSelectionError.

/**
 * Creates the channel selection error object.
 *
 * @param styleFactory the style factory
 * @param contrastMethod the contrast method
 * @return the channel selection
 */
private ChannelSelection createChannelSelectionError(StyleFactoryImpl styleFactory, ContrastMethod contrastMethod) {
    ContrastEnhancement contrastEnhancement = (ContrastEnhancement) styleFactory.contrastEnhancement(null, contrastMethod.name());
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Map<String, Expression> options = contrastEnhancement.getOptions();
    options.put("algorithm", ff.literal("TestStretchToMinimumMaximum"));
    options.put("minValue", ff.literal("1.0"));
    options.put("maxValue", ff.literal("5.0"));
    SelectedChannelType channelType = styleFactory.createSelectedChannelType("channel name", contrastEnhancement);
    SelectedChannelType[] channels = new SelectedChannelType[3];
    channels[0] = channelType;
    channels[1] = channelType;
    channels[2] = channelType;
    ChannelSelection channelSelection = styleFactory.createChannelSelection(channels);
    return channelSelection;
}
Also used : SelectedChannelType(org.geotools.styling.SelectedChannelType) ContrastEnhancement(org.geotools.styling.ContrastEnhancement) Expression(org.opengis.filter.expression.Expression) ChannelSelection(org.geotools.styling.ChannelSelection) FilterFactory(org.opengis.filter.FilterFactory)

Example 10 with SelectedChannelType

use of org.geotools.styling.SelectedChannelType in project sldeditor by robward-scisys.

the class VOGeoServerContrastEnhancementNormalizeOverallTest method createChannelSelectionError.

/**
 * Creates the channel selection error object.
 *
 * @param styleFactory the style factory
 * @param contrastMethod the contrast method
 * @return the channel selection
 */
private ChannelSelection createChannelSelectionError(StyleFactoryImpl styleFactory, ContrastMethod contrastMethod) {
    ContrastEnhancement contrastEnhancement = (ContrastEnhancement) styleFactory.contrastEnhancement(null, contrastMethod.name());
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Map<String, Expression> options = contrastEnhancement.getOptions();
    options.put("algorithm", ff.literal("TestStretchToMinimumMaximum"));
    options.put("minValue", ff.literal("1.0"));
    options.put("maxValue", ff.literal("5.0"));
    SelectedChannelType channelType = styleFactory.createSelectedChannelType("channel name", contrastEnhancement);
    SelectedChannelType[] channels = new SelectedChannelType[3];
    channels[0] = channelType;
    channels[1] = channelType;
    channels[2] = channelType;
    ChannelSelection channelSelection = styleFactory.createChannelSelection(channels);
    return channelSelection;
}
Also used : SelectedChannelType(org.geotools.styling.SelectedChannelType) ContrastEnhancement(org.geotools.styling.ContrastEnhancement) Expression(org.opengis.filter.expression.Expression) ChannelSelection(org.geotools.styling.ChannelSelection) FilterFactory(org.opengis.filter.FilterFactory)

Aggregations

ContrastEnhancement (org.geotools.styling.ContrastEnhancement)16 SelectedChannelType (org.geotools.styling.SelectedChannelType)16 ChannelSelection (org.geotools.styling.ChannelSelection)13 Expression (org.opengis.filter.expression.Expression)13 FilterFactory (org.opengis.filter.FilterFactory)12 RasterSymbolizer (org.geotools.styling.RasterSymbolizer)4 GroupConfigInterface (com.sldeditor.ui.detail.config.base.GroupConfigInterface)3 MultiOptionGroup (com.sldeditor.ui.detail.config.base.MultiOptionGroup)3 GraphicPanelFieldManager (com.sldeditor.ui.detail.GraphicPanelFieldManager)2 RasterSymbolizerDetails (com.sldeditor.ui.detail.RasterSymbolizerDetails)2 FieldConfigString (com.sldeditor.ui.detail.config.FieldConfigString)2 OptionGroup (com.sldeditor.ui.detail.config.base.OptionGroup)2 ColorMap (org.geotools.styling.ColorMap)2 FeatureTypeStyle (org.geotools.styling.FeatureTypeStyle)2 NamedLayer (org.geotools.styling.NamedLayer)2 Rule (org.geotools.styling.Rule)2 ShadedRelief (org.geotools.styling.ShadedRelief)2 Style (org.geotools.styling.Style)2 StyleFactoryImpl (org.geotools.styling.StyleFactoryImpl)2 StyledLayerDescriptor (org.geotools.styling.StyledLayerDescriptor)2