Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raster styles - interpolate color ranges #196

Merged
merged 2 commits into from
Jul 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/user/en/images/raster_style_pages/SingleBandRasters.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 15 additions & 2 deletions docs/user/en/reference/Raster Style Pages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ following pages are available.

* `Simple Raster`_

* `Single Band Rasters`_
* `Legacy Raster`_

* `Single Band Raster`_

* `XML`_

Expand Down Expand Up @@ -67,7 +69,7 @@ Allows simple control over the rendering of a raster image.
- 1.0: Direct 1 to 1 ratio
- 1-\*: Minimises the contribution; dimming the channel accordingly

Single Band Rasters
Legacy Raster
===================

Used to handle single band rasters (such as digital elevation models) where you can map value ranges
Expand All @@ -77,6 +79,17 @@ to artificial colours for display. A number of predefined color maps are provide
:align: center
:alt:

Single Band Raster
===================

An updated interface fo styling single band rasters (ex. digital elevation models). Users can generate color themes for their
rasters using predefined theme types and color palettes. This interface also provides tools for generating breaks based on
values from the raster. Generated values and colors can be manually modified if required.

.. figure:: /images/raster_style_pages/SingleBandRastersNew.png
:align: center
:alt:

XML
===

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.List;

import org.locationtech.udig.style.sld.SLDPlugin;
import org.locationtech.udig.style.sld.editor.CustomDynamicPalette;
import org.locationtech.udig.style.sld.internal.Messages;

import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.CellLabelProvider;
Expand Down Expand Up @@ -347,7 +347,13 @@ private void updateColors(){
i++;
}
}else{
Color[] clrs = currentPalette.getColors(currentPalette.getMaxColors());
//we want to turn this into a dynamic palette and generate gradients for
//in between colors
CustomDynamicPalette newPalette = new CustomDynamicPalette(
currentPalette.getName(),
currentPalette.getDescription(),
currentPalette.getColors(currentPalette.getMaxColors()));
Color[] clrs = newPalette.getColors(colors.size());
if (reverseColors){
reverse(clrs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.List;

import org.locationtech.udig.style.sld.SLDPlugin;
import org.locationtech.udig.style.sld.editor.CustomDynamicPalette;
import org.locationtech.udig.style.sld.internal.Messages;

import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.CellLabelProvider;
Expand Down Expand Up @@ -417,7 +417,13 @@ private void updateColors(){
i++;
}
}else{
Color[] clrs = currentPalette.getColors(currentPalette.getMaxColors());
//we want to turn this into a dynamic palette and generate gradients for
//in between colors
CustomDynamicPalette newPalette = new CustomDynamicPalette(
currentPalette.getName(),
currentPalette.getDescription(),
currentPalette.getColors(currentPalette.getMaxColors()));
Color[] clrs = newPalette.getColors(colors.size());
if (reverseColors){
reverse(clrs);
}
Expand Down