[Schmitzm-commits] r1234 - in trunk: src/schmitzm/geotools/gui src/schmitzm/geotools/styling src_junit/schmitzm/geotools/styling
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Nov 4 20:40:11 CET 2010
Author: alfonx
Date: 2010-11-04 20:40:10 +0100 (Thu, 04 Nov 2010)
New Revision: 1234
Modified:
trunk/src/schmitzm/geotools/gui/XMapPane.java
trunk/src/schmitzm/geotools/styling/StylingUtil.java
trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java
trunk/src_junit/schmitzm/geotools/styling/gdaloutput.txt
Log:
Modified: trunk/src/schmitzm/geotools/gui/XMapPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/XMapPane.java 2010-11-04 17:29:59 UTC (rev 1233)
+++ trunk/src/schmitzm/geotools/gui/XMapPane.java 2010-11-04 19:40:10 UTC (rev 1234)
@@ -1678,6 +1678,8 @@
@Override
protected void paintComponent(final Graphics g) {
+
+ setBackground(Color.blue);
// Maybe update the cursor and maybe stop the repainting timer
updateCursor();
Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java 2010-11-04 17:29:59 UTC (rev 1233)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java 2010-11-04 19:40:10 UTC (rev 1234)
@@ -3037,6 +3037,7 @@
final PropertyName literalLabelField1,
final PropertyName literalLabelField2) {
if (literalLabelField2 != null
+ && !literalLabelField2.getPropertyName().isEmpty()
&& !literalLabelField2.toString().equalsIgnoreCase("-")) {
final Literal trenner = FilterUtil.FILTER_FAC2.literal(": ");
final Function f3 = FilterUtil.FILTER_FAC2.function("strConcat",
Modified: trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java
===================================================================
--- trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java 2010-11-04 17:29:59 UTC (rev 1233)
+++ trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java 2010-11-04 19:40:10 UTC (rev 1234)
@@ -7,10 +7,14 @@
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
+import javax.xml.transform.TransformerException;
import junit.framework.TestCase;
@@ -24,6 +28,7 @@
import org.geotools.styling.RasterSymbolizer;
import org.geotools.styling.Style;
import org.geotools.styling.StyleBuilder;
+import org.junit.Ignore;
import org.junit.Test;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
@@ -122,18 +127,18 @@
assertEquals("3.0", colorMapEntries[1].getQuantity().toString());
assertEquals("4.0", colorMapEntries[2].getQuantity().toString());
}
-//
-// @Test
-// @Ignore
-// public void testParseColormapToSld() throws IOException, TransformerException {
-// URL colormapUrl = StylingUtilTest.class.getResource("gdaloutput.txt");
-// assertNotNull(colormapUrl);
-// ColorMap cm = StylingUtil.parseColormapToSld(colormapUrl);
-// assertEquals(256, cm.getColorMapEntries().length);
-//
-// RasterSymbolizer createRasterSymbolizer = StylingUtil.STYLE_BUILDER.createRasterSymbolizer(cm, 1.0);
-// Style style = StylingUtil.STYLE_BUILDER.createStyle(createRasterSymbolizer);
-// StylingUtil.saveStyleToSLD(style, new File("/home/stefan/Desktop/colors.sld"));
-// }
+ @Test
+ @Ignore
+ public void testParseColormapToSld() throws IOException, TransformerException {
+ URL colormapUrl = StylingUtilTest.class.getResource("gdaloutput.txt");
+ assertNotNull(colormapUrl);
+ ColorMap cm = StylingUtil.parseColormapToSld(colormapUrl);
+ assertEquals(256, cm.getColorMapEntries().length);
+
+ RasterSymbolizer createRasterSymbolizer = StylingUtil.STYLE_BUILDER.createRasterSymbolizer(cm, 1.0);
+ Style style = StylingUtil.STYLE_BUILDER.createStyle(createRasterSymbolizer);
+ StylingUtil.saveStyleToSld(style, new File("/home/stefan/Desktop/colors.sld"));
+ }
+
}
Modified: trunk/src_junit/schmitzm/geotools/styling/gdaloutput.txt
===================================================================
--- trunk/src_junit/schmitzm/geotools/styling/gdaloutput.txt 2010-11-04 17:29:59 UTC (rev 1233)
+++ trunk/src_junit/schmitzm/geotools/styling/gdaloutput.txt 2010-11-04 19:40:10 UTC (rev 1234)
@@ -1,291 +1,274 @@
Driver: GTiff/GeoTIFF
-Files: satbild.tif
-Size is 9128, 10474
-Coordinate System is:
-PROJCS["Merchich_Lambert_Conformal_Conic",
- GEOGCS["Merchich",
- DATUM["Merchich",
- SPHEROID["Clarke 1880 (IGN)",6378249.2,293.466020999993,
- AUTHORITY["EPSG","7011"]],
- AUTHORITY["EPSG","6261"]],
- PRIMEM["Greenwich",0],
- UNIT["degree",0.0174532925199433]],
- PROJECTION["Lambert_Conformal_Conic_2SP"],
- PARAMETER["standard_parallel_1",31.7239256],
- PARAMETER["standard_parallel_2",34.8664577],
- PARAMETER["latitude_of_origin",33.3],
- PARAMETER["central_meridian",-5.4],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",300000],
- UNIT["metre",1,
- AUTHORITY["EPSG","9001"]]]
-Origin = (273706.831999999994878,158065.021000000007916)
-Pixel Size = (25.000000000000000,-25.000000000000000)
-Metadata:
- AREA_OR_POINT=Area
+Files: satrgb_wgs84.tif
+Size is 4420, 3793
+Coordinate System is `'
+Origin = (105.783139439400003,15.439240779550000)
+Pixel Size = (0.000522620000000,-0.000522688900000)
Image Structure Metadata:
+ COMPRESSION=LZW
INTERLEAVE=BAND
Corner Coordinates:
-Upper Left ( 273706.832, 158065.021) ( 7d47'42.46"W, 31d59'46.61"N)
-Lower Left ( 273706.832, -103784.979) ( 7d43'59.43"W, 29d38'10.99"N)
-Upper Right ( 501906.832, 158065.021) ( 5d22'47.33"W, 32d 1'10.93"N)
-Lower Right ( 501906.832, -103784.979) ( 5d22'49.21"W, 29d39'33.01"N)
-Center ( 387806.832, 27140.021) ( 6d34'19.44"W, 30d50'0.08"N)
-Band 1 Block=9128x1 Type=Byte, ColorInterp=Palette
+Upper Left ( 105.7831394, 15.4392408)
+Lower Left ( 105.7831394, 13.4566818)
+Upper Right ( 108.0931198, 15.4392408)
+Lower Right ( 108.0931198, 13.4566818)
+Center ( 106.9381296, 14.4479613)
+Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
+ Overviews: 2210x1897, 1105x949, 553x475
Color Table (RGB with 256 entries)
- 0: 80,56,52,255
- 1: 60,88,104,255
- 2: 172,208,136,255
- 3: 248,104,100,255
- 4: 32,48,76,255
- 5: 152,196,228,255
- 6: 76,40,92,255
- 7: 16,84,76,255
- 8: 144,116,112,255
- 9: 72,80,92,255
- 10: 248,248,232,255
- 11: 120,72,88,255
- 12: 36,132,120,255
- 13: 184,188,220,255
- 14: 144,176,164,255
- 15: 164,168,156,255
- 16: 56,48,96,255
- 17: 128,132,128,255
- 18: 136,152,136,255
- 19: 48,12,28,255
- 20: 124,144,152,255
- 21: 152,124,136,255
- 22: 88,80,120,255
- 23: 104,24,24,255
- 24: 96,96,76,255
- 25: 4,0,20,255
- 26: 48,64,76,255
- 27: 104,128,140,255
- 28: 152,132,168,255
- 29: 12,32,20,255
- 30: 96,56,92,255
- 31: 136,144,136,255
- 32: 32,92,120,255
- 33: 40,124,196,255
- 34: 208,204,200,255
- 35: 140,116,48,255
- 36: 76,68,120,255
- 37: 248,200,228,255
- 38: 28,92,112,255
- 39: 200,132,52,255
- 40: 120,132,128,255
- 41: 56,40,20,255
- 42: 224,200,168,255
- 43: 104,32,68,255
- 44: 0,0,4,255
- 45: 80,80,76,255
- 46: 152,172,184,255
- 47: 140,68,136,255
- 48: 80,16,20,255
- 49: 72,100,112,255
- 50: 56,56,60,255
- 51: 232,212,232,255
- 52: 176,140,156,255
- 53: 216,232,200,255
- 54: 200,196,52,255
- 55: 96,112,136,255
- 56: 104,112,108,255
- 57: 60,72,88,255
- 58: 88,52,92,255
- 59: 60,80,96,255
- 60: 4,12,32,255
- 61: 104,136,136,255
- 62: 104,124,152,255
- 63: 128,116,136,255
- 64: 164,20,40,255
- 65: 56,48,24,255
- 66: 56,72,76,255
- 67: 104,76,104,255
- 68: 128,92,32,255
- 69: 76,88,92,255
- 70: 60,80,104,255
- 71: 84,120,136,255
- 72: 148,76,40,255
- 73: 188,200,204,255
- 74: 96,76,112,255
- 75: 80,64,60,255
- 76: 212,236,224,255
- 77: 140,156,152,255
- 78: 108,128,128,255
- 79: 48,24,76,255
- 80: 20,48,60,255
- 81: 124,180,160,255
- 82: 108,120,128,255
- 83: 184,184,156,255
- 84: 136,116,112,255
- 85: 108,144,192,255
- 86: 140,156,160,255
- 87: 164,176,164,255
- 88: 232,244,248,255
- 89: 112,68,92,255
- 90: 8,0,4,255
- 91: 184,208,232,255
- 92: 80,24,64,255
- 93: 104,80,76,255
- 94: 124,144,136,255
- 95: 76,88,104,255
- 96: 48,32,20,255
- 97: 136,128,116,255
- 98: 144,124,136,255
- 99: 20,12,8,255
- 100: 208,144,168,255
- 101: 20,36,88,255
- 102: 20,40,24,255
- 103: 24,12,44,255
- 104: 104,112,120,255
- 105: 152,160,168,255
- 106: 56,72,96,255
- 107: 104,136,48,255
- 108: 120,116,136,255
- 109: 164,148,136,255
- 110: 152,220,192,255
- 111: 24,92,104,255
- 112: 124,116,52,255
- 113: 24,92,96,255
- 114: 248,248,116,255
- 115: 184,188,172,255
- 116: 152,128,160,255
- 117: 212,188,184,255
- 118: 76,68,112,255
- 119: 96,128,136,255
- 120: 128,64,132,255
- 121: 76,100,120,255
- 122: 200,160,136,255
- 123: 20,56,76,255
- 124: 56,48,60,255
- 125: 88,80,112,255
- 126: 224,244,248,255
- 127: 80,72,76,255
- 128: 144,168,164,255
- 129: 120,124,152,255
- 130: 96,72,104,255
- 131: 20,72,24,255
- 132: 76,56,104,255
- 133: 80,84,24,255
- 134: 128,36,40,255
- 135: 12,24,76,255
- 136: 96,120,136,255
- 137: 48,196,200,255
- 138: 248,228,100,255
- 139: 24,88,88,255
- 140: 152,128,152,255
- 141: 188,236,232,255
- 142: 84,112,136,255
- 143: 136,164,52,255
- 144: 188,224,172,255
- 145: 104,68,92,255
- 146: 124,152,196,255
- 147: 104,64,24,255
- 148: 64,92,112,255
- 149: 16,12,44,255
- 150: 4,16,20,255
- 151: 80,80,92,255
- 152: 228,204,200,255
- 153: 104,92,32,255
- 154: 60,64,76,255
- 155: 200,132,116,255
- 156: 176,188,216,255
- 157: 20,40,128,255
- 158: 136,124,136,255
- 159: 196,116,48,255
- 160: 152,184,216,255
- 161: 44,132,56,255
- 162: 148,144,136,255
- 163: 84,136,120,255
- 164: 216,20,40,255
- 165: 12,32,56,255
- 166: 80,64,76,255
- 167: 212,140,156,255
- 168: 88,76,104,255
- 169: 80,48,20,255
- 170: 232,244,228,255
- 171: 36,140,136,255
- 172: 120,76,136,255
- 173: 92,124,192,255
- 174: 96,96,92,255
- 175: 112,128,140,255
- 176: 56,80,24,255
- 177: 124,144,196,255
- 178: 56,56,76,255
- 179: 76,72,92,255
- 180: 164,168,172,255
- 181: 160,156,160,255
- 182: 224,228,168,255
- 183: 208,148,136,255
- 184: 80,100,112,255
- 185: 20,40,60,255
- 186: 208,208,232,255
- 187: 56,44,88,255
- 188: 152,172,220,255
- 189: 128,132,140,255
- 190: 4,16,4,255
- 191: 48,12,8,255
- 192: 60,100,104,255
- 193: 232,232,232,255
- 194: 88,96,92,255
- 195: 220,188,172,255
- 196: 124,116,116,255
- 197: 112,76,144,255
- 198: 56,40,56,255
- 199: 136,172,116,255
- 200: 104,72,68,255
- 201: 80,88,60,255
- 202: 128,92,76,255
- 203: 40,84,76,255
- 204: 108,120,140,255
- 205: 104,140,108,255
- 206: 108,200,200,255
- 207: 120,132,140,255
- 208: 160,156,152,255
- 209: 76,100,104,255
- 210: 60,96,96,255
- 211: 188,228,204,255
- 212: 208,148,212,255
- 213: 136,180,136,255
- 214: 248,248,240,255
- 215: 108,112,136,255
- 216: 104,76,148,255
- 217: 152,216,164,255
- 218: 52,48,76,255
- 219: 80,56,72,255
- 220: 212,236,244,255
- 221: 4,12,52,255
- 222: 20,80,60,255
- 223: 56,52,128,255
- 224: 116,124,200,255
- 225: 220,184,156,255
- 226: 196,116,112,255
- 227: 76,100,92,255
- 228: 84,148,136,255
- 229: 108,96,76,255
- 230: 96,84,152,255
- 231: 48,32,56,255
- 232: 200,124,136,255
- 233: 60,92,88,255
- 234: 152,136,208,255
- 235: 236,232,200,255
- 236: 88,80,160,255
- 237: 104,144,120,255
- 238: 80,96,76,255
- 239: 48,12,52,255
- 240: 56,92,76,255
- 241: 200,196,116,255
- 242: 124,204,212,255
- 243: 216,188,220,255
- 244: 76,76,160,255
- 245: 104,164,136,255
- 246: 56,84,60,255
- 247: 200,76,40,255
- 248: 152,228,228,255
- 249: 32,92,160,255
- 250: 216,208,136,255
- 251: 196,68,132,255
- 252: 248,248,0,255
- 253: 248,240,228,255
- 254: 240,244,248,255
- 255: 248,248,248,255
+ 0: 88,76,72,255
+ 1: 72,56,28,255
+ 2: 96,124,120,255
+ 3: 176,164,124,255
+ 4: 116,120,44,255
+ 5: 144,160,136,255
+ 6: 112,128,92,255
+ 7: 88,84,28,255
+ 8: 184,164,132,255
+ 9: 132,160,116,255
+ 10: 96,136,84,255
+ 11: 204,164,68,255
+ 12: 52,64,80,255
+ 13: 104,104,76,255
+ 14: 76,64,72,255
+ 15: 48,96,72,255
+ 16: 112,136,100,255
+ 17: 216,184,164,255
+ 18: 88,128,100,255
+ 19: 144,112,120,255
+ 20: 88,104,100,255
+ 21: 132,108,128,255
+ 22: 72,88,64,255
+ 23: 128,132,112,255
+ 24: 96,80,72,255
+ 25: 44,104,32,255
+ 26: 212,168,160,255
+ 27: 144,148,112,255
+ 28: 88,136,100,255
+ 29: 136,144,136,255
+ 30: 168,160,148,255
+ 31: 112,160,144,255
+ 32: 104,104,88,255
+ 33: 88,104,72,255
+ 34: 96,128,112,255
+ 35: 112,116,112,255
+ 36: 112,112,88,255
+ 37: 128,120,100,255
+ 38: 56,96,80,255
+ 39: 116,144,100,255
+ 40: 176,164,168,255
+ 41: 160,176,168,255
+ 42: 128,144,116,255
+ 43: 120,136,120,255
+ 44: 136,128,44,255
+ 45: 152,152,136,255
+ 46: 220,184,132,255
+ 47: 148,192,48,255
+ 48: 132,144,100,255
+ 49: 120,88,44,255
+ 50: 168,184,164,255
+ 51: 152,168,144,255
+ 52: 40,64,72,255
+ 53: 60,112,80,255
+ 54: 112,128,112,255
+ 55: 136,144,128,255
+ 56: 144,160,144,255
+ 57: 76,64,64,255
+ 58: 116,136,44,255
+ 59: 112,204,124,255
+ 60: 104,84,76,255
+ 61: 112,136,112,255
+ 62: 112,120,96,255
+ 63: 128,132,120,255
+ 64: 168,168,168,255
+ 65: 128,148,136,255
+ 66: 96,128,40,255
+ 67: 220,224,184,255
+ 68: 116,128,44,255
+ 69: 160,204,64,255
+ 70: 152,120,120,255
+ 71: 96,176,36,255
+ 72: 96,120,36,255
+ 73: 104,112,96,255
+ 74: 160,168,160,255
+ 75: 168,160,168,255
+ 76: 196,136,136,255
+ 77: 96,104,80,255
+ 78: 104,128,96,255
+ 79: 88,96,80,255
+ 80: 112,128,104,255
+ 81: 160,128,120,255
+ 82: 176,176,168,255
+ 83: 176,184,164,255
+ 84: 72,96,64,255
+ 85: 96,112,96,255
+ 86: 96,120,88,255
+ 87: 136,128,100,255
+ 88: 112,168,124,255
+ 89: 132,96,112,255
+ 90: 104,160,124,255
+ 91: 52,104,80,255
+ 92: 104,80,96,255
+ 93: 168,176,168,255
+ 94: 96,120,96,255
+ 95: 104,84,32,255
+ 96: 96,84,32,255
+ 97: 56,112,72,255
+ 98: 104,84,120,255
+ 99: 136,152,136,255
+ 100: 96,104,88,255
+ 101: 132,136,128,255
+ 102: 152,112,160,255
+ 103: 184,216,132,255
+ 104: 132,100,120,255
+ 105: 148,144,60,255
+ 106: 56,120,104,255
+ 107: 52,104,72,255
+ 108: 168,164,124,255
+ 109: 80,96,80,255
+ 110: 184,212,164,255
+ 111: 116,168,160,255
+ 112: 176,184,196,255
+ 113: 76,96,28,255
+ 114: 172,176,132,255
+ 115: 144,152,136,255
+ 116: 128,128,48,255
+ 117: 96,116,112,255
+ 118: 152,160,120,255
+ 119: 220,188,212,255
+ 120: 112,88,96,255
+ 121: 36,56,64,255
+ 122: 96,80,80,255
+ 123: 128,152,116,255
+ 124: 100,144,120,255
+ 125: 28,48,28,255
+ 126: 120,96,100,255
+ 127: 112,120,104,255
+ 128: 176,164,148,255
+ 129: 88,68,92,255
+ 130: 120,136,112,255
+ 131: 88,120,100,255
+ 132: 132,188,44,255
+ 133: 120,212,176,255
+ 134: 100,136,100,255
+ 135: 200,148,60,255
+ 136: 88,120,88,255
+ 137: 88,96,72,255
+ 138: 104,112,88,255
+ 139: 144,136,120,255
+ 140: 36,96,32,255
+ 141: 120,136,100,255
+ 142: 128,148,128,255
+ 143: 76,88,72,255
+ 144: 80,104,80,255
+ 145: 176,168,160,255
+ 146: 116,124,120,255
+ 147: 216,176,132,255
+ 148: 152,160,144,255
+ 149: 168,168,160,255
+ 150: 152,160,152,255
+ 151: 96,128,100,255
+ 152: 104,120,96,255
+ 153: 72,96,72,255
+ 154: 168,160,160,255
+ 155: 96,76,96,255
+ 156: 104,84,112,255
+ 157: 88,104,88,255
+ 158: 120,148,120,255
+ 159: 220,216,176,255
+ 160: 112,84,40,255
+ 161: 144,116,164,255
+ 162: 128,132,100,255
+ 163: 96,128,88,255
+ 164: 120,128,92,255
+ 165: 152,148,120,255
+ 166: 152,168,124,255
+ 167: 116,120,84,255
+ 168: 160,168,152,255
+ 169: 152,152,168,255
+ 170: 88,104,80,255
+ 171: 88,84,64,255
+ 172: 172,220,164,255
+ 173: 120,128,112,255
+ 174: 80,96,64,255
+ 175: 60,112,116,255
+ 176: 160,168,144,255
+ 177: 136,132,120,255
+ 178: 160,160,152,255
+ 179: 176,168,196,255
+ 180: 132,160,132,255
+ 181: 96,112,88,255
+ 182: 116,188,44,255
+ 183: 96,108,72,255
+ 184: 96,120,80,255
+ 185: 88,112,88,255
+ 186: 104,104,100,255
+ 187: 168,168,148,255
+ 188: 148,196,100,255
+ 189: 136,152,128,255
+ 190: 80,104,72,255
+ 191: 172,216,132,255
+ 192: 80,88,64,255
+ 193: 168,176,160,255
+ 194: 80,96,72,255
+ 195: 176,220,200,255
+ 196: 96,144,112,255
+ 197: 184,128,48,255
+ 198: 96,120,104,255
+ 199: 104,128,104,255
+ 200: 112,112,100,255
+ 201: 104,92,172,255
+ 202: 136,132,112,255
+ 203: 144,148,124,255
+ 204: 152,168,168,255
+ 205: 104,112,76,255
+ 206: 160,160,144,255
+ 207: 144,152,160,255
+ 208: 136,148,116,255
+ 209: 132,196,100,255
+ 210: 96,104,100,255
+ 211: 72,88,28,255
+ 212: 156,160,136,255
+ 213: 120,128,104,255
+ 214: 88,112,80,255
+ 215: 120,116,112,255
+ 216: 124,160,180,255
+ 217: 160,168,180,255
+ 218: 64,104,124,255
+ 219: 96,176,84,255
+ 220: 168,168,196,255
+ 221: 220,220,164,255
+ 222: 220,164,132,255
+ 223: 104,120,88,255
+ 224: 88,96,96,255
+ 225: 120,120,100,255
+ 226: 96,112,80,255
+ 227: 104,112,104,255
+ 228: 184,128,100,255
+ 229: 132,108,164,255
+ 230: 204,128,120,255
+ 231: 60,96,128,255
+ 232: 88,112,72,255
+ 233: 116,148,112,255
+ 234: 156,160,180,255
+ 235: 48,156,32,255
+ 236: 212,168,196,255
+ 237: 104,120,104,255
+ 238: 96,112,104,255
+ 239: 116,188,100,255
+ 240: 152,212,124,255
+ 241: 52,60,124,255
+ 242: 132,148,164,255
+ 243: 220,220,132,255
+ 244: 88,112,100,255
+ 245: 104,144,156,255
+ 246: 96,184,100,255
+ 247: 160,216,176,255
+ 248: 180,84,52,255
+ 249: 192,132,180,255
+ 250: 0,0,0,255
+ 251: 0,0,16,255
+ 252: 20,0,12,255
+ 253: 208,212,64,255
+ 254: 52,172,120,255
+ 255: 220,224,220,255
More information about the Schmitzm-commits
mailing list