[Schmitzm-commits] r143 - trunk/src/schmitzm/geotools/styling
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 15 19:45:03 CEST 2009
Author: alfonx
Date: 2009-06-15 19:45:02 +0200 (Mon, 15 Jun 2009)
New Revision: 143
Modified:
trunk/src/schmitzm/geotools/styling/StylingUtil.java
Log:
* Nothing
Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java 2009-06-15 12:09:05 UTC (rev 142)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java 2009-06-15 17:45:02 UTC (rev 143)
@@ -12,7 +12,6 @@
package schmitzm.geotools.styling;
import java.awt.Color;
-import java.awt.RenderingHints;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
@@ -25,10 +24,9 @@
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
@@ -47,7 +45,6 @@
import org.geotools.data.memory.MemoryFeatureCollection;
import org.geotools.factory.CommonFactoryFinder;
import org.geotools.factory.GeoTools;
-import org.geotools.factory.Hints;
import org.geotools.feature.Feature;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.GeometryAttributeType;
@@ -93,7 +90,9 @@
import schmitzm.geotools.FilterUtil;
import schmitzm.geotools.feature.FeatureUtil;
+import schmitzm.geotools.feature.FeatureUtil.GeometryForm;
import schmitzm.geotools.grid.GridUtil;
+import schmitzm.lang.LangUtil;
import com.sun.xml.bind.StringInputStream;
import com.vividsolutions.jts.geom.Geometry;
@@ -103,9 +102,6 @@
import com.vividsolutions.jts.geom.MultiPolygon;
import com.vividsolutions.jts.geom.Polygon;
-import schmitzm.geotools.feature.FeatureUtil.GeometryForm;
-import schmitzm.lang.LangUtil;
-
/**
* Diese Klasse enthaelt Hilfsfunktionen zum GeoTools-Styling
*
@@ -1626,5 +1622,46 @@
return style;
}
+
+//
+// /**
+// * Doubles the number of palettes by adding the reverse palette to every
+// * palette. The name of the reverse palette is the name of the original
+// * palette plus the letter R.
+// *
+// * @author SK
+// * @param palettes The original list of {@link BrewerPalette BrewerPalettes}
+// */
+// public static BrewerPalette[] addReversePalettes(BrewerPalette[] palettes) {
+// BrewerPalette[] newPalettes = new BrewerPalette[palettes.length * 2];
+//
+// int pos = 0;
+// for (BrewerPalette bp : palettes) {
+// newPalettes[pos] = bp;
+// pos++;
+// Color[] newColors = new Color[bp.getMaxColors()];
+//
+// List<Color> colorList = java.util.Arrays.asList(bp.getColors(bp.getMaxColors()));
+// Collections.reverse(colorList);
+// colorList.toArray(newColors);
+//
+// try {
+// newPalettes[pos] = StylingUtil.createBrewerPalette(bp.getName()
+// + "R", newColors);
+// newPalettes[pos].setPaletteSuitability(bp
+// .getPaletteSuitability());
+// newPalettes[pos].setDescription(bp.getDescription()+" reversed");
+// newPalettes[pos].setType(bp.getType());
+// newPalettes[pos].setColorScheme(bp.getColorScheme());
+// } catch (IOException e) {
+// LOGGER.error(e);
+// newPalettes[pos] = bp;
+// }
+//
+// pos++;
+// }
+//
+// return newPalettes;
+// }
}
More information about the Schmitzm-commits
mailing list