[Schmitzm-commits] r932 - trunk/src/schmitzm/geotools/styling

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jul 5 23:48:14 CEST 2010


Author: alfonx
Date: 2010-07-05 23:48:14 +0200 (Mon, 05 Jul 2010)
New Revision: 932

Modified:
   trunk/src/schmitzm/geotools/styling/StylingUtil.java
Log:
Minor JavaDoc

Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-07-01 23:11:05 UTC (rev 931)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-07-05 21:48:14 UTC (rev 932)
@@ -227,6 +227,7 @@
 					zeroLit) }, new org.geotools.styling.Symbol[0],
 			FeatureUtil.FILTER_FACTORY2.literal(1), size3, zeroLit);
 
+	/** THis string is set as the Name of the Rules that describe selected features **/
 	public static final String SELECTION_RULE_ID = "SelectionRule";
 
 	/**
@@ -1782,6 +1783,7 @@
 		// Symboizers
 		Symbolizer[] symbolizers = createSelectionSymbolizers(geometryForm,
 				type);
+
 		rule.symbolizers().addAll(Arrays.asList(symbolizers));
 
 		return rule;
@@ -1790,6 +1792,12 @@
 	public static Symbolizer[] createSelectionSymbolizers(
 			GeometryForm geometryForm, SelectionStylesTypes type) {
 		Symbolizer[] symbolizers = new Symbolizer[0];
+//
+//		// TODO Not a good idea to put the 500 here as constant!
+//		final Function offsetFunction = FilterUtil.FILTER_FAC2.function(
+//				"offset", FilterUtil.FILTER_FAC2.property("the_geom"),
+//				FilterUtil.FILTER_FAC2.literal(-500), FilterUtil.FILTER_FAC2
+//						.literal(500));
 
 		switch (geometryForm) {
 
@@ -1808,6 +1816,20 @@
 
 			break;
 		case POLYGON: { // Black
+
+//			// Dark shadow
+//			PolygonSymbolizer polSshadow = STYLE_BUILDER
+//					.createPolygonSymbolizer(STYLE_BUILDER.createStroke(
+//							Color.DARK_GRAY, 2, 0.7), null);
+//			symbolizers = LangUtil.extendArray(new Symbolizer[] { polSshadow },
+//					symbolizers);
+
+			// <ogc:Function name="offset">
+			// <ogc:PropertyName>the_geom</ogc:PropertyName>
+			// <ogc:Literal>0.00004</ogc:Literal>
+			// <ogc:Literal>-0.00004</ogc:Literal>
+			// </ogc:Function>
+
 			Stroke outline = STYLE_BUILDER.createStroke(Color.red, 3);
 
 			Mark dots = null;
@@ -1824,6 +1846,12 @@
 			fill.setGraphicFill(fillGraphic);
 			PolygonSymbolizer polS0 = STYLE_BUILDER.createPolygonSymbolizer(
 					outline, fill);
+			// Add an offset to create a shadow effect
+			// Calculating the centroid of the whole Polygon so that not every
+			// Insel
+			// gets a chart
+//			polS0.setGeometry(offsetFunction);
+
 			symbolizers = LangUtil.extendArray(symbolizers, polS0);
 		}
 
@@ -1831,13 +1859,13 @@
 				Stroke outline = STYLE_BUILDER.createStroke(Color.yellow
 						.brighter(), 1);
 				Mark dots = null;
-				
+
 				if (type == SelectionStylesTypes.LeftTop2RightBottom_lines) {
 					dots = STYLE_BUILDER.createMark("shape://backslash");
 				} else {
 					dots = STYLE_BUILDER.createMark("shape://slash");
 				}
-				
+
 				dots.setStroke(STYLE_BUILDER.createStroke(Color.yellow
 						.brighter(), 1.));
 				Graphic fillGraphic = STYLE_BUILDER.createGraphic(null, dots,
@@ -1847,6 +1875,7 @@
 				fill.setGraphicFill(fillGraphic);
 				PolygonSymbolizer polS0 = STYLE_BUILDER
 						.createPolygonSymbolizer(outline, fill);
+//				polS0.setGeometry(offsetFunction);
 				symbolizers = LangUtil.extendArray(symbolizers, polS0);
 			}
 			break;



More information about the Schmitzm-commits mailing list