Index: modules/library/render/src/test/java/org/geotools/renderer/lite/ReprojectionTest.java
===================================================================
--- modules/library/render/src/test/java/org/geotools/renderer/lite/ReprojectionTest.java	(revisione 34254)
+++ modules/library/render/src/test/java/org/geotools/renderer/lite/ReprojectionTest.java	(copia locale)
@@ -19,6 +19,7 @@
 import java.awt.Graphics2D;
 import java.awt.Rectangle;
 import java.awt.image.BufferedImage;
+import java.util.Collections;
 
 import junit.framework.TestCase;
 
@@ -111,6 +112,7 @@
 
 		// setup the renderer and listen for errors
 		StreamingRenderer sr = new StreamingRenderer();
+		sr.setRendererHints(Collections.singletonMap(sr.OPTIMIZED_DATA_LOADING_KEY, Boolean.FALSE));
 		sr.setContext(mapContext);
 		sr.addRenderListener(new RenderListener() {
 			public void featureRenderer(SimpleFeature feature) {
Index: modules/library/render/src/test/java/org/geotools/renderer/lite/GeometryTransformationTest.java
===================================================================
--- modules/library/render/src/test/java/org/geotools/renderer/lite/GeometryTransformationTest.java	(revisione 0)
+++ modules/library/render/src/test/java/org/geotools/renderer/lite/GeometryTransformationTest.java	(revisione 0)
@@ -0,0 +1,61 @@
+package org.geotools.renderer.lite;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.geotools.data.FeatureSource;
+import org.geotools.data.property.PropertyDataStore;
+import org.geotools.geometry.jts.ReferencedEnvelope;
+import org.geotools.map.DefaultMapContext;
+import org.geotools.referencing.crs.DefaultGeographicCRS;
+import org.geotools.styling.Style;
+import org.geotools.test.TestData;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+
+public class GeometryTransformationTest extends TestCase {
+    private static final long TIME = 2000;
+
+    FeatureSource<SimpleFeatureType, SimpleFeature> fs;
+
+    FeatureSource<SimpleFeatureType, SimpleFeature> bfs;
+
+    ReferencedEnvelope bounds;
+
+    @Override
+    protected void setUp() throws Exception {
+        File property = new File(TestData.getResource(this, "line.properties").toURI());
+        PropertyDataStore ds = new PropertyDataStore(property.getParentFile());
+        fs = ds.getFeatureSource("line");
+        bounds = fs.getBounds();
+        bounds.expandBy(3, 3);
+
+        System.setProperty("org.geotools.test.interactive", "true");
+
+    }
+
+    public void testBufferLine() throws Exception {
+        Style style = RendererBaseTest.loadStyle(this, "lineBuffer.sld");
+
+        DefaultMapContext mc = new DefaultMapContext(DefaultGeographicCRS.WGS84);
+        mc.addLayer(fs, style);
+
+        StreamingRenderer renderer = new StreamingRenderer();
+        renderer.setContext(mc);
+
+        RendererBaseTest.showRender("SolidFill", renderer, TIME, bounds);
+    }
+    
+    public void testVertices() throws Exception {
+        Style style = RendererBaseTest.loadStyle(this, "lineVertices.sld");
+
+        DefaultMapContext mc = new DefaultMapContext(DefaultGeographicCRS.WGS84);
+        mc.addLayer(fs, style);
+
+        StreamingRenderer renderer = new StreamingRenderer();
+        renderer.setContext(mc);
+
+        RendererBaseTest.showRender("SolidFill", renderer, TIME, bounds);
+    }
+}
Index: modules/library/render/src/test/resources/org/geotools/renderer/lite/test-data/lineBuffer.sld
===================================================================
--- modules/library/render/src/test/resources/org/geotools/renderer/lite/test-data/lineBuffer.sld	(revisione 0)
+++ modules/library/render/src/test/resources/org/geotools/renderer/lite/test-data/lineBuffer.sld	(revisione 0)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld"
+  xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
+  <NamedLayer>
+
+    <Name>LineBuffering</Name>
+    <UserStyle>
+      <FeatureTypeStyle>
+        <Rule>
+          <PolygonSymbolizer>
+            <Geometry>
+            	<ogc:Function name="buffer">
+            		<ogc:PropertyName>geom</ogc:PropertyName>
+            		<ogc:Literal>0.5</ogc:Literal>
+            	</ogc:Function>
+            </Geometry>
+            <Fill/>
+            <Stroke/>
+          </PolygonSymbolizer>
+          
+          
+          <LineSymbolizer>
+          	<Stroke></Stroke>
+          </LineSymbolizer>
+
+        </Rule>
+      </FeatureTypeStyle>
+    </UserStyle>
+  </NamedLayer>
+</StyledLayerDescriptor>
\ No newline at end of file
Index: modules/library/render/src/test/resources/org/geotools/renderer/lite/test-data/lineVertices.sld
===================================================================
--- modules/library/render/src/test/resources/org/geotools/renderer/lite/test-data/lineVertices.sld	(revisione 0)
+++ modules/library/render/src/test/resources/org/geotools/renderer/lite/test-data/lineVertices.sld	(revisione 0)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld"
+  xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
+  <NamedLayer>
+
+    <Name>LineBuffering</Name>
+    <UserStyle>
+      <FeatureTypeStyle>
+        <Rule>
+          <PointSymbolizer>
+            <Geometry>
+            	<ogc:Function name="vertices">
+            		<ogc:PropertyName>geom</ogc:PropertyName>
+            	</ogc:Function>
+            </Geometry>
+            <Graphic>
+              <Mark>
+                <WellKnownName>square</WellKnownName>
+                <Fill>
+                  <CssParameter name="fill">0xFF0000</CssParameter>
+                </Fill>
+              </Mark>
+              <Size>16</Size>
+            </Graphic>
+          </PointSymbolizer>
+          
+          
+          <LineSymbolizer>
+          	<Stroke></Stroke>
+          </LineSymbolizer>
+
+        </Rule>
+      </FeatureTypeStyle>
+    </UserStyle>
+  </NamedLayer>
+</StyledLayerDescriptor>
\ No newline at end of file
Index: modules/library/render/src/main/java/org/geotools/renderer/style/SLDStyleFactory.java
===================================================================
--- modules/library/render/src/main/java/org/geotools/renderer/style/SLDStyleFactory.java	(revisione 34254)
+++ modules/library/render/src/main/java/org/geotools/renderer/style/SLDStyleFactory.java	(copia locale)
@@ -30,8 +30,6 @@
 import java.awt.Stroke;
 import java.awt.TexturePaint;
 import java.awt.geom.AffineTransform;
-import java.awt.geom.Line2D;
-import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
 import java.awt.image.AffineTransformOp;
 import java.awt.image.BufferedImage;
@@ -44,7 +42,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.imageio.ImageIO;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
 
@@ -66,7 +63,6 @@
 import org.geotools.styling.PolygonSymbolizer;
 import org.geotools.styling.StyleAttributeExtractorTruncated;
 import org.geotools.styling.StyleFactoryFinder;
-import org.geotools.styling.Symbol;
 import org.geotools.styling.Symbolizer;
 import org.geotools.styling.TextMark;
 import org.geotools.styling.TextSymbolizer;
@@ -541,12 +537,6 @@
             LOGGER.finer("creating text style");
         }
 
-        String geomName = symbolizer.getGeometryPropertyName();
-
-        if (LOGGER.isLoggable(Level.FINER)) {
-            LOGGER.finer("geomName = " + geomName);
-        }
-
         // extract label (from ows5 extensions, we could have the label element empty)
         String label = evalToString(symbolizer.getLabel(), feature, "");
 
Index: modules/library/render/src/main/java/org/geotools/renderer/lite/StreamingRenderer.java
===================================================================
--- modules/library/render/src/main/java/org/geotools/renderer/lite/StreamingRenderer.java	(revisione 34254)
+++ modules/library/render/src/main/java/org/geotools/renderer/lite/StreamingRenderer.java	(copia locale)
@@ -59,6 +59,7 @@
 import org.geotools.feature.FeatureTypes;
 import org.geotools.feature.IllegalAttributeException;
 import org.geotools.filter.IllegalFilterException;
+import org.geotools.filter.function.GeometryTransformationVisitor;
 import org.geotools.filter.visitor.SimplifyingFilterVisitor;
 import org.geotools.geometry.jts.Decimator;
 import org.geotools.geometry.jts.LiteCoordinateSequenceFactory;
@@ -78,9 +79,7 @@
 import org.geotools.renderer.style.SLDStyleFactory;
 import org.geotools.renderer.style.Style2D;
 import org.geotools.styling.FeatureTypeStyle;
-import org.geotools.styling.LineSymbolizer;
 import org.geotools.styling.PointSymbolizer;
-import org.geotools.styling.PolygonSymbolizer;
 import org.geotools.styling.RasterSymbolizer;
 import org.geotools.styling.Rule;
 import org.geotools.styling.StyleAttributeExtractor;
@@ -96,6 +95,7 @@
 import org.opengis.feature.type.GeometryDescriptor;
 import org.opengis.filter.Filter;
 import org.opengis.filter.FilterFactory;
+import org.opengis.filter.expression.Expression;
 import org.opengis.filter.expression.PropertyName;
 import org.opengis.filter.spatial.BBOX;
 import org.opengis.parameter.GeneralParameterValue;
@@ -232,10 +232,8 @@
 
 	private RenderingHints java2dHints;
 
-	private boolean optimizedDataLoadingEnabledDEFAULT = false;
+	private boolean optimizedDataLoadingEnabledDEFAULT = true;
 
-	private boolean memoryPreloadingEnabledDEFAULT = false;
-    
     private int renderingBufferDEFAULT = 0;
     
     private String scaleComputationMethodDEFAULT = SCALE_OGC;
@@ -289,7 +287,6 @@
 	public static final String LABEL_CACHE_KEY = "labelCache";
 	public static final String DPI_KEY = "dpi";
 	public static final String DECLARED_SCALE_DENOM_KEY = "declaredScaleDenominator";
-	public static final String MEMORY_PRE_LOADING_KEY = "memoryPreloadingEnabled";
 	public static final String OPTIMIZED_DATA_LOADING_KEY = "optimizedDataLoadingEnabled";
 	public static final String SCALE_COMPUTATION_METHOD_KEY = "scaleComputationMethod";
 	
@@ -864,14 +861,13 @@
 						&& !CRS.equalsIgnoreMetadata(featCrs, mapCRS)) {
 					envelope = envelope.transform(featCrs, true, 10);
 				}
+				
+				// take into account eventual geometric transformations that might expand/move the query area
+				envelope = expandEnvelopeByTransformations(styles, envelope);
 
-				if (!isMemoryPreloadingEnabled()) {
-                    if(LOGGER.isLoggable(Level.FINE))
-                        LOGGER.fine("Querying layer " + schema.getTypeName() +  " with bbox: " + envelope);
-					filter = createBBoxFilters(schema, attributes, envelope);
-				} else {
-					filter = Filter.INCLUDE;
-				}
+                if(LOGGER.isLoggable(Level.FINE))
+                    LOGGER.fine("Querying layer " + schema.getTypeName() +  " with bbox: " + envelope);
+				filter = createBBoxFilters(schema, attributes, envelope);
 
 				// now build the query using only the attributes and the
 				// bounding box needed
@@ -881,23 +877,26 @@
 				processRuleForQuery(styles, query);
 
 			} catch (Exception e) {
-				fireErrorEvent(new Exception("Error transforming bbox", e));
-				canTransform = false;
-				query = new DefaultQuery(schema.getTypeName());
-				query.setPropertyNames(attributes);
-				Envelope bounds = source.getBounds();
-				if (bounds != null && envelope.intersects(bounds)) {
-					LOGGER.log(Level.WARNING, "Got a tranform exception while trying to de-project the current " +
-											"envelope, bboxs intersect therefore using envelope)", e);
-					filter = null;					
-					filter = createBBoxFilters(schema, attributes, envelope);
-					query.setFilter(filter);
-				} else {
-					LOGGER.log(Level.WARNING, "Got a tranform exception while trying to de-project the current " +
-											"envelope, falling back on full data loading (no bbox query)", e);
-					query.setFilter(Filter.INCLUDE);
-				}
-				processRuleForQuery(styles, query);
+			    fireErrorEvent(new Exception("Error transforming bbox", e));
+                canTransform = false;
+                query = new DefaultQuery(schema.getTypeName());
+                query.setPropertyNames(attributes);
+                Envelope bounds = source.getBounds();
+                if (bounds != null && envelope.intersects(bounds)) {
+                    LOGGER.log(Level.WARNING, "Got a tranform exception while trying to de-project the current " +
+                                            "envelope, bboxs intersect therefore using envelope)", e);
+                    
+                    // take into account eventual geometric transformations that might expand/move the query area
+                    envelope = expandEnvelopeByTransformations(styles, envelope);
+                    
+                    filter = createBBoxFilters(schema, attributes, envelope);
+                    query.setFilter(filter);
+                } else {
+                    LOGGER.log(Level.WARNING, "Got a tranform exception while trying to de-project the current " +
+                                            "envelope, falling back on full data loading (no bbox query)", e);
+                    query.setFilter(Filter.INCLUDE);
+                }
+                processRuleForQuery(styles, query);
 
 			}
 		}
@@ -914,9 +913,6 @@
 			} else {
 				query = new DefaultQuery(DataUtilities.mixQueries(
 						definitionQuery, query, "liteRenderer"));
-				SimplifyingFilterVisitor simplifier = new SimplifyingFilterVisitor();
-				Filter simplified = (Filter)query.getFilter().accept(simplifier, null);
-				query.setFilter(simplified);
 			}
 		}
 		query.setCoordinateSystem(featCrs);
@@ -955,24 +951,35 @@
         Filter simplifiedFilter = (Filter) query.getFilter().accept(simplifier, null);
         query.setFilter(simplifiedFilter);
 		
-		if (isMemoryPreloadingEnabled()) {
-			// TODO: attache a feature listener, we must erase the memory cache
-			// if
-			// anything changes in the data store
-			if (indexedFeatureResults == null) {
-				indexedFeatureResults = new IndexedFeatureResults(source
-						.getFeatures(query));
-			}
-			indexedFeatureResults.setQueryBounds(envelope);
-			results = indexedFeatureResults;
-		} else { // insert a debug point here to check your query
-			results = source.getFeatures(query);
-		}
-		
-		
-		return results;
+		return source.getFeatures(query);
 	}
 
+    
+	/**
+	 * Takes care of eventual geometric transformations
+	 * @param styles
+	 * @param envelope
+	 * @return
+	 */
+    ReferencedEnvelope expandEnvelopeByTransformations(LiteFeatureTypeStyle[] styles,
+            ReferencedEnvelope envelope) {
+        GeometryTransformationVisitor visitor = new GeometryTransformationVisitor();
+        ReferencedEnvelope result = new ReferencedEnvelope(envelope);
+        for (LiteFeatureTypeStyle lts : styles) {
+            List<Rule> rules = new ArrayList<Rule>();
+            rules.addAll(Arrays.asList(lts.ruleList));
+            rules.addAll(Arrays.asList(lts.elseRules));
+            for (Rule r : rules) {
+                for (Symbolizer s : r.symbolizers()) {
+                    if(s.getGeometry() != null)
+                    result.expandToInclude((ReferencedEnvelope) s.getGeometry().accept(visitor, envelope));
+                }
+            }
+         }
+        
+        return result;
+    }
+
     /**
      * Builds a full transform going from the source CRS to the denstionan CRS
      * and from there to the screen
@@ -1129,23 +1136,6 @@
 	}
 
 	/**
-	 * @deprecated this method shall be killed, its of no use
-	 */
-	private boolean isMemoryPreloadingEnabled() {
-		if (rendererHints == null)
-			return memoryPreloadingEnabledDEFAULT;
-		Object result = null;
-		try{
-			result =  rendererHints.get("memoryPreloadingEnabled");
-		}catch (ClassCastException e) {
-			
-		}
-		if (result == null)
-			return memoryPreloadingEnabledDEFAULT;
-		return ((Boolean)result).booleanValue();
-	}
-	
-	/**
      * Checks if optimized feature type style rendering is enabled, or not.
      * See {@link #OPTIMIZE_FTS_RENDERING_KEY} description for a full explanation.
      */
@@ -2102,17 +2092,17 @@
 	 */
 	private com.vividsolutions.jts.geom.Geometry findGeometry(Object drawMe,
 			Symbolizer s) {
-		PropertyName geomName = getGeometryPropertyName(s);
+		Expression geomExpr = s.getGeometry();
 
 		// get the geometry
 		Geometry geom;
-		if(geomName == null) {
+		if(geomExpr == null) {
 		    if(drawMe instanceof SimpleFeature)
 		        geom = (Geometry) ((SimpleFeature) drawMe).getDefaultGeometry();
 		    else
 		        geom = (Geometry) defaultGeometryPropertyName.evaluate(drawMe, Geometry.class);
 		} else {
-		    geom = (Geometry) geomName.evaluate(drawMe, Geometry.class);
+		    geom = (Geometry) geomExpr.evaluate(drawMe, Geometry.class);
 		}
 		    
 		return geom;    
@@ -2132,18 +2122,27 @@
 
         if( drawMe instanceof SimpleFeature ){
             SimpleFeature f = (SimpleFeature) drawMe;
+            SimpleFeatureType schema = f.getFeatureType();
         
-            PropertyName propertyName = getGeometryPropertyName(s);
-            String geomName = propertyName != null ? propertyName.getPropertyName() : null;        
-            if (geomName == null || "".equals(geomName)) {
-                SimpleFeatureType schema = f.getFeatureType();
-                GeometryDescriptor geom = schema.getGeometryDescriptor();
-                return geom.getType().getCoordinateReferenceSystem();
+            Expression geometry = s.getGeometry();
+            
+            String geomName = null;
+            if(geometry instanceof PropertyName) {
+                geomName = ((PropertyName) geometry).getPropertyName();
+                return getAttributeCRS(geomName, schema);
+            } else if(geometry == null) {
+                return getAttributeCRS(null, schema);
             } else {
-                SimpleFeatureType schema = f.getFeatureType();
-                GeometryDescriptor geom = (GeometryDescriptor) schema.getDescriptor( geomName );
-                return geom.getType().getCoordinateReferenceSystem();
+                StyleAttributeExtractor attExtractor = new StyleAttributeExtractor();
+                geometry.accept(attExtractor, null);
+                for(String name : attExtractor.getAttributeNameSet()) {
+                    if(schema.getDescriptor(name) instanceof GeometryDescriptor) {
+                        return getAttributeCRS(name, schema);
+                    }
+                }
             }
+            
+            
         } else if ( currLayer.getSource() != null ) {
         	return currLayer.getSource().getCRS();
         }
@@ -2151,27 +2150,22 @@
         return null;
 	}
 
-	private PropertyName getGeometryPropertyName(Symbolizer s) {
-		String geomName = null;
-
-		// TODO: fix the styles, the getGeometryPropertyName should probably be
-		// moved into an
-		// interface...
-		if (s instanceof PolygonSymbolizer) {
-			geomName = ((PolygonSymbolizer) s).getGeometryPropertyName();
-		} else if (s instanceof PointSymbolizer) {
-			geomName = ((PointSymbolizer) s).getGeometryPropertyName();
-		} else if (s instanceof LineSymbolizer) {
-			geomName = ((LineSymbolizer) s).getGeometryPropertyName();
-		} else if (s instanceof TextSymbolizer) {
-			geomName = ((TextSymbolizer) s).getGeometryPropertyName();
-		}
-                
-        if( geomName == null ){
-            return null;
+	/**
+	 * Finds the CRS of the specified attribute (or uses the default geometry instead)
+	 * @param geomName
+	 * @param schema
+	 * @return
+	 */
+    org.opengis.referencing.crs.CoordinateReferenceSystem getAttributeCRS(String geomName,
+            SimpleFeatureType schema) {
+        if (geomName == null || "".equals(geomName)) {
+            GeometryDescriptor geom = schema.getGeometryDescriptor();
+            return geom.getType().getCoordinateReferenceSystem();
+        } else {
+            GeometryDescriptor geom = (GeometryDescriptor) schema.getDescriptor( geomName );
+            return geom.getType().getCoordinateReferenceSystem();
         }
-		return filterFactory.property(geomName);
-	}
+    }
 
 	/**
 	 * Getter for property interactive.
Index: modules/library/jdbc/src/test/java/org/geotools/jdbc/JDBCTestSupport.java
===================================================================
--- modules/library/jdbc/src/test/java/org/geotools/jdbc/JDBCTestSupport.java	(revisione 34254)
+++ modules/library/jdbc/src/test/java/org/geotools/jdbc/JDBCTestSupport.java	(copia locale)
@@ -58,14 +58,14 @@
     static {
         // uncomment to turn up logging
                 
-//        java.util.logging.ConsoleHandler handler = new java.util.logging.ConsoleHandler();
-//        handler.setLevel(java.util.logging.Level.FINE);
-//        
-//        org.geotools.util.logging.Logging.getLogger("org.geotools.data.jdbc").setLevel(java.util.logging.Level.FINE);
-//        org.geotools.util.logging.Logging.getLogger("org.geotools.data.jdbc").addHandler(handler);
-//        
-//        org.geotools.util.logging.Logging.getLogger("org.geotools.jdbc").setLevel(java.util.logging.Level.FINE);
-//        org.geotools.util.logging.Logging.getLogger("org.geotools.jdbc").addHandler(handler);
+        java.util.logging.ConsoleHandler handler = new java.util.logging.ConsoleHandler();
+        handler.setLevel(java.util.logging.Level.FINE);
+        
+        org.geotools.util.logging.Logging.getLogger("org.geotools.data.jdbc").setLevel(java.util.logging.Level.FINE);
+        org.geotools.util.logging.Logging.getLogger("org.geotools.data.jdbc").addHandler(handler);
+        
+        org.geotools.util.logging.Logging.getLogger("org.geotools.jdbc").setLevel(java.util.logging.Level.FINE);
+        org.geotools.util.logging.Logging.getLogger("org.geotools.jdbc").addHandler(handler);
     }
 
     protected JDBCTestSetup setup;
Index: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java
===================================================================
--- modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java	(revisione 34254)
+++ modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java	(copia locale)
@@ -16,6 +16,7 @@
  */
 package org.geotools.jdbc;
 
+import java.beans.PropertyVetoException;
 import java.io.IOException;
 import java.util.Collections;
 import java.util.LinkedHashMap;
@@ -24,14 +25,19 @@
 import javax.sql.DataSource;
 
 import org.apache.commons.dbcp.BasicDataSource;
+import org.apache.tomcat.jdbc.pool.PoolConfiguration;
+import org.apache.tomcat.jdbc.pool.PoolProperties;
 import org.geotools.data.AbstractDataStoreFactory;
 import org.geotools.data.DataStore;
 import org.geotools.data.Parameter;
+import org.geotools.data.jdbc.datasource.C3P0DataSource;
 import org.geotools.data.jdbc.datasource.DBCPDataSource;
+import org.geotools.data.jdbc.datasource.TomcatDataSource;
 import org.geotools.factory.CommonFactoryFinder;
 import org.geotools.feature.type.FeatureTypeFactoryImpl;
 import org.geotools.util.SimpleInternationalString;
 
+import com.mchange.v2.c3p0.ComboPooledDataSource;
 import com.vividsolutions.jts.geom.GeometryFactory;
 
 
@@ -47,6 +53,9 @@
  */
 public abstract class JDBCDataStoreFactory extends AbstractDataStoreFactory {
     /** parameter for database type */
+    public static final Param POOLTYPE = new Param("pooltype", String.class, "PoolType", false, "DBCP");
+    
+    /** parameter for database type */
     public static final Param DBTYPE = new Param("dbtype", String.class, "Type", true);
 
     /** parameter for database host */
@@ -244,6 +253,7 @@
         parameters.put(MINCONN.key, MINCONN);
         parameters.put(FETCHSIZE.key, FETCHSIZE);
         parameters.put(MAXWAIT.key, MAXWAIT);
+        parameters.put(POOLTYPE.key, POOLTYPE);
         if(getValidationQuery() != null)
             parameters.put(VALIDATECONN.key, VALIDATECONN);
     }
@@ -317,12 +327,15 @@
      * </p>
      */
     protected DataSource createDataSource(Map params, SQLDialect dialect) throws IOException {
-        BasicDataSource dataSource = createDataSource(params);
-
-        // some default data source behaviour
-        dataSource.setPoolPreparedStatements(dialect instanceof PreparedStatementSQLDialect);
-
-        return new DBCPDataSource(dataSource);
+        String type = (String) POOLTYPE.lookUp(params);
+        
+        if("TOMCAT".equals(type)) {
+           return buildTomcatPool(params, dialect); 
+        } else if("C3P0".equals(type)) {
+           return buildC3P0Pool(params, dialect);
+        } else {
+            return buildDBCPPool(params, dialect);
+        }
     }
 
     /**
@@ -334,7 +347,11 @@
      * @return DataSource for SQL use
      * @throws IOException
      */
-    public BasicDataSource createDataSource(Map params) throws IOException {
+    public DataSource createDataSource(Map params) throws IOException {
+        return createDataSource(params, null);
+    }
+
+    private DataSource buildDBCPPool(Map params, SQLDialect dialect) throws IOException {
         //create a datasource
         BasicDataSource dataSource = new BasicDataSource();
 
@@ -379,9 +396,71 @@
         
         // some datastores might need this
         dataSource.setAccessToUnderlyingConnectionAllowed(true);
-        return dataSource;
+        
+        // some default data source behaviour
+        dataSource.setPoolPreparedStatements(dialect instanceof PreparedStatementSQLDialect);
+
+        return new DBCPDataSource(dataSource);
     }
+    
+    private DataSource buildTomcatPool(Map params, SQLDialect dialect) throws IOException {
+        //create a datasource
+        PoolConfiguration conf = new PoolProperties();
 
+        // driver
+        conf.setDriverClassName(getDriverClassName());
+
+        // url
+        conf.setUrl(getJDBCUrl(params));
+
+        // username
+        String user = (String) USER.lookUp(params);
+        conf.setUsername(user);
+
+        // password
+        String passwd = (String) PASSWD.lookUp(params);
+        if (passwd != null) {
+            conf.setPassword(passwd);
+        }
+        
+        // max wait
+        Integer maxWait = (Integer) MAXWAIT.lookUp(params);
+        if (maxWait != null && maxWait != -1) {
+            conf.setMaxWait(maxWait * 1000);
+        }
+        
+        // connection pooling options
+        Integer minConn = (Integer) MINCONN.lookUp(params);
+        if ( minConn != null ) {
+            conf.setMinIdle(minConn);  
+            conf.setMaxIdle(minConn);
+            conf.setInitialSize(minConn);
+        }
+        
+        Integer maxConn = (Integer) MAXCONN.lookUp(params);
+        if ( maxConn != null ) {
+            conf.setMaxActive(maxConn);
+        }
+        
+        Boolean validate = (Boolean) VALIDATECONN.lookUp(params);
+        if(validate != null && validate && getValidationQuery() != null) {
+            conf.setTestOnBorrow(true);
+            conf.setValidationQuery(getValidationQuery());
+        }
+        
+        // some datastores might need this
+        conf.setAccessToUnderlyingConnectionAllowed(true);
+        
+        conf.setLogAbandoned(true);
+        conf.setRemoveAbandoned(true);
+        
+        // CHECK WHAT IS GOING ON VS PREPARED STATEMENTS
+        // some default data source behaviour
+        // conf.setPoolPreparedStatements(dialect instanceof PreparedStatementSQLDialect);
+        
+        return new TomcatDataSource(new org.apache.tomcat.jdbc.pool.DataSource(conf));
+    }
+
     /**
      * Override this to return a good validation query (a very quick one, such as one that
      * asks the database what time is it) or return null if the factory does not support
@@ -413,4 +492,56 @@
         }
         return url;
     }
+    
+    protected DataSource buildC3P0Pool(Map params, SQLDialect dialect) throws IOException {
+        ComboPooledDataSource dataSource = new ComboPooledDataSource();
+        dataSource.setMaxStatements(dialect instanceof PreparedStatementSQLDialect ? 50 : 0);
+ 
+        // driver
+        try {
+            dataSource.setDriverClass(getDriverClassName());
+        } catch(PropertyVetoException e) {
+            throw new IOException("Could not set the driver class name");
+        }
+
+        // url
+        dataSource.setJdbcUrl(getJDBCUrl(params));
+
+        // username
+        String user = (String) USER.lookUp(params);
+        dataSource.setUser(user);
+
+        // password
+        String passwd = (String) PASSWD.lookUp(params);
+        if (passwd != null) {
+            dataSource.setPassword(passwd);
+        }
+        
+        // max wait
+        Integer maxWait = (Integer) MAXWAIT.lookUp(params);
+        if (maxWait != null && maxWait != -1) {
+            dataSource.setCheckoutTimeout(maxWait * 1000);
+        }
+        
+        // connection pooling options
+        Integer minConn = (Integer) MINCONN.lookUp(params);
+        if ( minConn != null ) {
+            dataSource.setMinPoolSize(minConn);    
+        }
+        
+        Integer maxConn = (Integer) MAXCONN.lookUp(params);
+        if ( maxConn != null ) {
+            dataSource.setMaxPoolSize(maxConn);
+        }
+        
+        Boolean validate = (Boolean) VALIDATECONN.lookUp(params);
+        if(validate != null && validate && getValidationQuery() != null) {
+            dataSource.setTestConnectionOnCheckout(true);
+            dataSource.setPreferredTestQuery(getValidationQuery());
+        }
+        
+        return new C3P0DataSource(dataSource);
+    }
+    
+        
 }
Index: modules/library/jdbc/src/main/java/org/geotools/data/jdbc/datasource/DataSourceFinder.java
===================================================================
--- modules/library/jdbc/src/main/java/org/geotools/data/jdbc/datasource/DataSourceFinder.java	(revisione 34254)
+++ modules/library/jdbc/src/main/java/org/geotools/data/jdbc/datasource/DataSourceFinder.java	(copia locale)
@@ -206,7 +206,7 @@
      *         available method returns true.
      */
     public static synchronized Iterator getUnWrappers() {
-        Set availableDS = new HashSet();
+        Set unwrappers = new HashSet();
         return getServiceRegistry().getServiceProviders(UnWrapper.class, null, null);
     }
 
Index: modules/library/jdbc/pom.xml
===================================================================
--- modules/library/jdbc/pom.xml	(revisione 34254)
+++ modules/library/jdbc/pom.xml	(copia locale)
@@ -97,7 +97,22 @@
       <groupId>commons-dbcp</groupId>
       <artifactId>commons-dbcp</artifactId>
     </dependency>
+     <dependency>
+      <groupId>org.tomcat</groupId>
+      <artifactId>jdbc-pool</artifactId>
+      <version>0.7.1</version>
+    </dependency>
+     <dependency>
+      <groupId>org.tomcat</groupId>
+      <artifactId>tomcat-juli</artifactId>
+      <version>7.0.0</version>
+    </dependency>
     <dependency>
+	  <groupId>c3p0</groupId>
+	  <artifactId>c3p0</artifactId>
+	  <version>0.9.1.2</version>
+    </dependency>
+    <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
     </dependency>
Index: modules/library/main/src/test/java/org/geotools/filter/GeometryFilterVisitorTest.java
===================================================================
--- modules/library/main/src/test/java/org/geotools/filter/GeometryFilterVisitorTest.java	(revisione 0)
+++ modules/library/main/src/test/java/org/geotools/filter/GeometryFilterVisitorTest.java	(revisione 0)
@@ -0,0 +1,55 @@
+package org.geotools.filter;
+
+import junit.framework.TestCase;
+
+import org.geotools.factory.CommonFactoryFinder;
+import org.geotools.filter.function.GeometryTransformationVisitor;
+import org.geotools.geometry.jts.ReferencedEnvelope;
+import org.opengis.filter.FilterFactory;
+import org.opengis.filter.expression.Function;
+
+public class GeometryFilterVisitorTest extends TestCase {
+    
+    FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
+
+    public void testSimpleBuffer() {
+        org.opengis.filter.expression.Expression geomTx = ff.function("buffer", ff.property("the_geom"), ff.literal(2));
+        
+        ReferencedEnvelope re = new ReferencedEnvelope(0, 2, 0, 2, null);
+        
+        GeometryTransformationVisitor visitor = new GeometryTransformationVisitor();
+        ReferencedEnvelope result = (ReferencedEnvelope) geomTx.accept(visitor, re);
+        
+        ReferencedEnvelope expected = new ReferencedEnvelope(-2, 4, -2, 4, null);
+        assertEquals(expected, result);
+    }
+    
+    public void testChainBuffer() {
+        // check buffer chaining
+        Function innerBuffer = ff.function("buffer", ff.property("the_geom"), ff.literal(3));
+        Function geomTx = ff.function("buffer", innerBuffer, ff.literal(2));
+        
+        ReferencedEnvelope re = new ReferencedEnvelope(0, 2, 0, 2, null);
+        
+        GeometryTransformationVisitor visitor = new GeometryTransformationVisitor();
+        ReferencedEnvelope result = (ReferencedEnvelope) geomTx.accept(visitor, re);
+        
+        ReferencedEnvelope expected = new ReferencedEnvelope(-5, 7, -5, 7, null);
+        assertEquals(expected, result);
+    }
+    
+    public void testChainIntersection() {
+        Function innerBuffer1 = ff.function("buffer", ff.property("the_geom"), ff.literal(3));
+        Function innerBuffer2 = ff.function("buffer", ff.property("other_geom"), ff.literal(2));
+        Function geomTx = ff.function("intersection", innerBuffer1, innerBuffer2);
+        
+        ReferencedEnvelope re = new ReferencedEnvelope(0, 2, 0, 2, null);
+        
+        GeometryTransformationVisitor visitor = new GeometryTransformationVisitor();
+        ReferencedEnvelope result = (ReferencedEnvelope) geomTx.accept(visitor, re);
+        
+        ReferencedEnvelope expected = new ReferencedEnvelope(-3, 5, -3, 5, null);
+        assertEquals(expected, result);
+        
+    }
+}
Index: modules/library/main/src/test/java/org/geotools/styling/visitor/DuplicatorStyleVisitorTest.java
===================================================================
--- modules/library/main/src/test/java/org/geotools/styling/visitor/DuplicatorStyleVisitorTest.java	(revisione 34254)
+++ modules/library/main/src/test/java/org/geotools/styling/visitor/DuplicatorStyleVisitorTest.java	(copia locale)
@@ -308,7 +308,17 @@
         notEq.setLabelPlacement(placement);
         assertEqualsContract(clone, notEq, textSymb);
     }
+    
+    public void testTextSymbolizerVendorOptions() {
+        TextSymbolizer textSymb = sf.createTextSymbolizer();
+        textSymb.getOptions().put("autoWrap", "100");
 
+        textSymb.accept(visitor);
+        TextSymbolizer clone = (TextSymbolizer) visitor.getCopy();
+        assertCopy(textSymb, clone);
+        assertEqualsContract(textSymb, clone);
+    }
+
     public void testTextSymbolizerWithUOM() {
         TextSymbolizer textSymb = sf.createTextSymbolizer();
         textSymb.setUnitOfMeasure(UomOgcMapping.METRE.getUnit());
Index: modules/library/main/src/test/java/org/geotools/styling/SLDStyleTest.java
===================================================================
--- modules/library/main/src/test/java/org/geotools/styling/SLDStyleTest.java	(revisione 34254)
+++ modules/library/main/src/test/java/org/geotools/styling/SLDStyleTest.java	(copia locale)
@@ -31,6 +31,8 @@
 import org.geotools.factory.CommonFactoryFinder;
 import org.geotools.factory.GeoTools;
 import org.geotools.filter.IsEqualsToImpl;
+import org.geotools.filter.function.FilterFunction_buffer;
+import org.geotools.filter.function.math.FilterFunction_abs;
 import org.geotools.test.TestData;
 import org.opengis.filter.BinaryLogicOperator;
 import org.opengis.filter.Filter;
@@ -597,4 +599,49 @@
          
          
     }
+    
+    public void testParseGeometryExpressions() throws Exception {
+        StyleFactory factory = CommonFactoryFinder.getStyleFactory(null);
+        java.net.URL surl = TestData.getResource(this, "geometryTransformation.sld");
+        SLDParser stylereader = new SLDParser(factory, surl);
+       
+        Style[] styles = stylereader.readXML();
+        assertEquals(1, styles.length);
+        assertEquals(1, styles[0].featureTypeStyles().size());
+        assertEquals(1, styles[0].featureTypeStyles().get(0).rules().size());
+        
+        Rule r = styles[0].featureTypeStyles().get(0).rules().get(0);
+        assertEquals(1, r.getSymbolizers().length);
+        
+        PolygonSymbolizer ps = (PolygonSymbolizer) r.getSymbolizers()[0];
+        Expression geom = ps.getGeometry();
+        assertNotNull(geom);
+        assertTrue(geom instanceof FilterFunction_buffer);
+        FilterFunction_buffer buf = (FilterFunction_buffer) geom;
+        assertTrue(buf.getParameters().get(0) instanceof PropertyName);
+        assertTrue(buf.getParameters().get(1) instanceof Literal);
+    }
+    
+    public void testParsePlainGeometryExpression() throws Exception {
+        StyleFactory factory = CommonFactoryFinder.getStyleFactory(null);
+        java.net.URL surl = TestData.getResource(this, "geometryPlain.sld");
+        SLDParser stylereader = new SLDParser(factory, surl);
+       
+        Style[] styles = stylereader.readXML();
+        assertEquals(1, styles.length);
+        assertEquals(1, styles[0].featureTypeStyles().size());
+        assertEquals(1, styles[0].featureTypeStyles().get(0).rules().size());
+        
+        Rule r = styles[0].featureTypeStyles().get(0).rules().get(0);
+        assertEquals(1, r.getSymbolizers().length);
+        
+        PolygonSymbolizer ps = (PolygonSymbolizer) r.getSymbolizers()[0];
+        Expression geom = ps.getGeometry();
+        assertNotNull(geom);
+        assertTrue(geom instanceof PropertyName);
+        PropertyName pn = (PropertyName) geom;
+        assertEquals("the_geom", pn.getPropertyName());
+        assertEquals("the_geom", ps.getGeometryPropertyName());
+
+    }
 }
Index: modules/library/main/src/test/java/org/geotools/styling/SLDTransformerTest.java
===================================================================
--- modules/library/main/src/test/java/org/geotools/styling/SLDTransformerTest.java	(revisione 34254)
+++ modules/library/main/src/test/java/org/geotools/styling/SLDTransformerTest.java	(copia locale)
@@ -29,6 +29,7 @@
 
 import org.geotools.factory.CommonFactoryFinder;
 import org.geotools.factory.GeoTools;
+import org.geotools.filter.function.FilterFunction_buffer;
 import org.opengis.filter.FilterFactory2;
 import org.opengis.filter.expression.Expression;
 import org.opengis.filter.expression.PropertyName;
@@ -708,4 +709,18 @@
 
         }
     }
+    
+    public void testEncodeGeometryFunctions() throws Exception {
+        StyleBuilder sb = new StyleBuilder();
+        PolygonSymbolizer ps = sb.createPolygonSymbolizer();
+        ps.setGeometry(ff.function("buffer", ff.property("the_geom"), ff.literal(10)));
+        Style s = sb.createStyle(ps);
+        SLDTransformer tx = new SLDTransformer();
+        String result = tx.transform(s);
+        SLDParser parser = new SLDParser(CommonFactoryFinder.getStyleFactory(null));
+        parser.setInput(new StringReader(result));
+        PolygonSymbolizer ps2 = (PolygonSymbolizer) parser.readXML()[0].featureTypeStyles().get(0)
+                .rules().get(0).symbolizers().get(0);
+        assertTrue(ps2.getGeometry() instanceof FilterFunction_buffer);
+    }
 }
Index: modules/library/main/src/test/resources/org/geotools/styling/test-data/geometryPlain.sld
===================================================================
--- modules/library/main/src/test/resources/org/geotools/styling/test-data/geometryPlain.sld	(revisione 0)
+++ modules/library/main/src/test/resources/org/geotools/styling/test-data/geometryPlain.sld	(revisione 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<StyledLayerDescriptor version="1.0.0"
+	xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
+	xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
+	xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+	<NamedLayer>
+		<Name>Raster Symbolizer Test SLD</Name>
+		<UserStyle>
+			<Name>Raster SLD</Name>
+			<FeatureTypeStyle>
+				<Rule>
+					<Name>Raster Symbolizer Test</Name>
+					<PolygonSymbolizer>
+						<Geometry>
+							<ogc:PropertyName>the_geom</ogc:PropertyName>
+						</Geometry>
+					</PolygonSymbolizer>
+				</Rule>
+			</FeatureTypeStyle>
+		</UserStyle>
+	</NamedLayer>
+</StyledLayerDescriptor>
Index: modules/library/main/src/test/resources/org/geotools/styling/test-data/geometryTransformation.sld
===================================================================
--- modules/library/main/src/test/resources/org/geotools/styling/test-data/geometryTransformation.sld	(revisione 0)
+++ modules/library/main/src/test/resources/org/geotools/styling/test-data/geometryTransformation.sld	(revisione 0)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<StyledLayerDescriptor version="1.0.0"
+	xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
+	xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
+	xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+	<NamedLayer>
+		<Name>Raster Symbolizer Test SLD</Name>
+		<UserStyle>
+			<Name>Raster SLD</Name>
+			<FeatureTypeStyle>
+				<Rule>
+					<Name>Raster Symbolizer Test</Name>
+					<PolygonSymbolizer>
+						<Geometry>
+							<ogc:Function name="buffer">
+								<ogc:PropertyName>the_geom</ogc:PropertyName>
+								<ogc:Literal>10</ogc:Literal>
+							</ogc:Function>
+						</Geometry>
+					</PolygonSymbolizer>
+				</Rule>
+			</FeatureTypeStyle>
+		</UserStyle>
+	</NamedLayer>
+</StyledLayerDescriptor>
Index: modules/library/main/src/main/java/org/geotools/filter/function/GeometryTransformationVisitor.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/filter/function/GeometryTransformationVisitor.java	(revisione 0)
+++ modules/library/main/src/main/java/org/geotools/filter/function/GeometryTransformationVisitor.java	(revisione 0)
@@ -0,0 +1,35 @@
+package org.geotools.filter.function;
+
+import org.geotools.filter.visitor.DefaultFilterVisitor;
+import org.geotools.geometry.jts.ReferencedEnvelope;
+import org.opengis.filter.expression.Expression;
+import org.opengis.filter.expression.Function;
+
+/**
+ * Given an original rendering envelope it visits an expression, finds all
+ * {@link GeometryTransformation}, collects and merges all the returned query envelopes
+ */
+public class GeometryTransformationVisitor extends DefaultFilterVisitor {
+
+    public GeometryTransformationVisitor() {
+    }
+
+    @Override
+    public Object visit(Function expression, Object data) {
+        // drill down and merge
+        ReferencedEnvelope merged = new ReferencedEnvelope((ReferencedEnvelope) data);
+        for(Expression param : expression.getParameters()) {
+            ReferencedEnvelope result = (ReferencedEnvelope) param.accept(this, data);
+            if(result != null)
+                merged.expandToInclude(result);
+        }
+
+        // apply the current function is possible
+        if (expression instanceof GeometryTransformation) {
+            merged = ((GeometryTransformation) expression).invert(merged);
+        }
+
+        return merged;
+    }
+
+}
Index: modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_startPoint.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_startPoint.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_startPoint.java	(copia locale)
@@ -22,6 +22,7 @@
 import org.geotools.filter.FunctionExpressionImpl;
 
 import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.LineString;
 
 public class FilterFunction_startPoint extends FunctionExpressionImpl implements
         FunctionExpression {
@@ -38,7 +39,7 @@
         Geometry arg0;
 
         try { // attempt to get value and perform conversion
-            arg0 = (Geometry) getExpression(0).evaluate(feature);
+            arg0 = (Geometry) getExpression(0).evaluate(feature, LineString.class);
         } catch (Exception e) // probably a type error
         {
             throw new IllegalArgumentException(
Index: modules/library/main/src/main/java/org/geotools/filter/function/GeometryTransformation.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/filter/function/GeometryTransformation.java	(revisione 0)
+++ modules/library/main/src/main/java/org/geotools/filter/function/GeometryTransformation.java	(revisione 0)
@@ -0,0 +1,21 @@
+package org.geotools.filter.function;
+
+import org.geotools.geometry.jts.ReferencedEnvelope;
+import org.geotools.styling.Symbolizer;
+import org.opengis.filter.expression.Function;
+
+/**
+ * This interface can be implemented by geometry transformation functions
+ * that whish to be used in the {@link Symbolizer} geometry property.
+ * <p>It gives the renderer a hint of what area should be queried given a certain rendering area
+ * @author aaime
+ *
+ */
+public interface GeometryTransformation extends Function {
+    /**
+     * Returns a query envelope given a certain 
+     * @param renderingEnvelope
+     * @return
+     */
+    ReferencedEnvelope invert(ReferencedEnvelope renderingEnvelope);
+}
Index: modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_endPoint.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_endPoint.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_endPoint.java	(copia locale)
@@ -22,6 +22,7 @@
 import org.geotools.filter.FunctionExpressionImpl;
 
 import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.LineString;
 
 public class FilterFunction_endPoint extends FunctionExpressionImpl implements
         FunctionExpression {
@@ -38,7 +39,7 @@
         Geometry arg0;
 
         try { // attempt to get value and perform conversion
-            arg0 = (Geometry) getExpression(0).evaluate(feature);
+            arg0 = (Geometry) getExpression(0).evaluate(feature, LineString.class);
         } catch (Exception e) // probably a type error
         {
             throw new IllegalArgumentException(
Index: modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_vertices.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_vertices.java	(revisione 0)
+++ modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_vertices.java	(revisione 0)
@@ -0,0 +1,49 @@
+package org.geotools.filter.function;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.geotools.filter.FunctionExpressionImpl;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateFilter;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.MultiPoint;
+
+public class FilterFunction_vertices extends FunctionExpressionImpl {
+
+    public FilterFunction_vertices() {
+        super("vertices");
+    }
+
+    @Override
+    public int getArgCount() {
+        return 1;
+    }
+
+    public Object evaluate(Object feature, Class context) {
+        Geometry g = getExpression(0).evaluate(feature, Geometry.class);
+        if(g == null)
+            return null;
+        
+        MultiPointExtractor filter = new MultiPointExtractor();
+        g.apply(filter);
+        return filter.getMultiPoint();
+    }
+    
+    static class MultiPointExtractor implements CoordinateFilter {
+        List<Coordinate> coordinates = new ArrayList();
+
+        public void filter(Coordinate c) {
+            coordinates.add(c);
+        }
+        
+        MultiPoint getMultiPoint() {
+            Coordinate[] coorArray = (Coordinate[]) coordinates.toArray(new Coordinate[coordinates.size()]);
+            return new GeometryFactory().createMultiPoint(coorArray);
+        }
+        
+    }
+
+}
Index: modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_buffer.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_buffer.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_buffer.java	(copia locale)
@@ -17,14 +17,18 @@
  *    Lesser General Public License for more details.
  */
 
-//this code is autogenerated - you shouldnt be modifying it!
+//this was autogenerated and then hand modified to implement better support for geometry
+// transformations in SLD
 import org.geotools.filter.FunctionExpression;
 import org.geotools.filter.FunctionExpressionImpl;
+import org.geotools.geometry.jts.JTS;
+import org.geotools.geometry.jts.ReferencedEnvelope;
 
+import com.vividsolutions.jts.geom.Envelope;
 import com.vividsolutions.jts.geom.Geometry;
 
 public class FilterFunction_buffer extends FunctionExpressionImpl implements
-        FunctionExpression {
+        FunctionExpression, GeometryTransformation {
 
     public FilterFunction_buffer() {
         super("buffer");
@@ -56,4 +60,20 @@
 
         return (StaticGeometry.buffer(arg0, arg1));
     }
+
+    /**
+     * Returns an expanded rendering envelope if the buffering size is not using feature attributes.
+     * If the buffering size is feature dependent the user will have to expand
+     * the rendering area via the renderer buffer parameter
+     */
+    public ReferencedEnvelope invert(ReferencedEnvelope renderingEnvelope) {
+        Double buffer = getExpression(1).evaluate(null, Double.class);
+        if(buffer == null || buffer <= 0.0)
+            return null;
+        
+        Envelope bufferedEnvelope = JTS.toGeometry((Envelope) renderingEnvelope).buffer(buffer).getEnvelopeInternal();
+        return new ReferencedEnvelope(bufferedEnvelope, renderingEnvelope.getCoordinateReferenceSystem());
+    }
+    
+    
 }
Index: modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_pointAt.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_pointAt.java	(revisione 0)
+++ modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_pointAt.java	(revisione 0)
@@ -0,0 +1,56 @@
+package org.geotools.filter.function;
+
+/*
+ *    GeoTools - The Open Source Java GIS Toolkit
+ *    http://geotools.org
+ * 
+ *    (C) 2005-2008, Open Source Geospatial Foundation (OSGeo)
+ *    
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License as published by the Free Software Foundation;
+ *    version 2.1 of the License.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ */
+
+import org.geotools.filter.FunctionExpressionImpl;
+
+import com.vividsolutions.jts.geom.CoordinateSequence;
+import com.vividsolutions.jts.geom.LineString;
+
+public class FilterFunction_pointAt extends FunctionExpressionImpl {
+
+    public FilterFunction_pointAt() {
+        super("endPoint");
+    }
+
+    public int getArgCount() {
+        return 1;
+    }
+
+    public Object evaluate(Object feature) {
+        LineString geom = getExpression(0).evaluate(feature, LineString.class);
+        if(geom == null)
+            return  null;
+            
+        double perc = getExpression(1).evaluate(feature, Double.class);
+        if(perc <= 0)
+            return geom.getStartPoint();
+        if(perc >= 1)
+            return geom.getEndPoint();
+
+        double position = geom.getLength() * perc;
+        CoordinateSequence cs = geom.getCoordinateSequence();
+        double x0 = cs.getOrdinate(0, 0);
+        double y0 = cs.getOrdinate(0, 1);
+        for (int i = 0; i < cs.size(); i++) {
+            double x1 = cs.getOrdinate(0, 0);
+            double y1 = cs.getOrdinate(0, 1);
+            
+        }
+    }
+}
Index: modules/library/main/src/main/java/org/geotools/styling/SLDParser.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/SLDParser.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/SLDParser.java	(copia locale)
@@ -38,6 +38,7 @@
 import org.opengis.filter.expression.Expression;
 import org.opengis.filter.expression.Function;
 import org.opengis.filter.expression.Literal;
+import org.opengis.filter.expression.PropertyName;
 import org.w3c.dom.CharacterData;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -64,7 +65,7 @@
     private static final String graphicSt = "Graphic"; // to make pmd to shut up
 
     private static final String geomString = "Geometry"; // to make pmd to shut up
-
+    
     private static final String fillSt = "Fill";
 
     private static final String opacityString = "Opacity";
@@ -888,7 +889,7 @@
                 childName = child.getNodeName();
             }
             if (childName.equalsIgnoreCase(geomString)) {
-                symbol.setGeometryPropertyName(parseGeometryName(child));
+                symbol.setGeometry(parseGeometry(child));
             } else if (childName.equalsIgnoreCase(strokeString)) {
                 symbol.setStroke(parseStroke(child));
             }
@@ -931,7 +932,7 @@
                 childName = child.getNodeName();
             }
             if (childName.equalsIgnoreCase(geomString)) {
-                symbol.setGeometryPropertyName(parseGeometryName(child));
+                symbol.setGeometry(parseGeometry(child));
             } else if (childName.equalsIgnoreCase(strokeString)) {
                 symbol.setStroke(parseStroke(child));
             } else if (childName.equalsIgnoreCase(fillSt)) {
@@ -976,7 +977,7 @@
                 childName = child.getNodeName();
             }
             if (childName.equalsIgnoreCase(geomString)) {
-                symbol.setGeometryPropertyName(parseGeometryName(child));
+                symbol.setGeometry(parseGeometry(child));
             } else if (childName.equalsIgnoreCase(fillSt)) {
                 symbol.setFill(parseFill(child));
             } else if (childName.equalsIgnoreCase("Label")) {
@@ -1092,7 +1093,7 @@
                 childName = child.getNodeName();
             }
             if (childName.equalsIgnoreCase(geomString)) {
-                symbol.setGeometryPropertyName(parseGeometryName(child));
+                symbol.setGeometry(parseGeometry(child));
             }
             if (childName.equalsIgnoreCase(opacityString)) {
                 try {
@@ -1422,7 +1423,7 @@
             }
 
             if (childName.equalsIgnoreCase(geomString)) {
-                symbol.setGeometryPropertyName(parseGeometryName(child));
+                symbol.setGeometry(parseGeometry(child));
             } else if (childName.equalsIgnoreCase(graphicSt)) {
                 symbol.setGraphic(parseGraphic(child));
             }
@@ -1476,24 +1477,21 @@
 
     /** Internal parse method - made protected for unit testing */
     protected String parseGeometryName(Node root) {
+        Expression result = parseGeometry(root);
+        if(result instanceof PropertyName) {
+            return ((PropertyName) result).getPropertyName();
+        }
+        return null;
+    }
+    
+    /** Internal parse method - made protected for unit testing */
+    protected Expression parseGeometry(Node root) {
         if (LOGGER.isLoggable(Level.FINEST)) {
             if (LOGGER.isLoggable(Level.FINEST))
-                LOGGER.finest("parsing GeometryName");
+                LOGGER.finest("parsing GeometryExpression");
         }
 
-        String ret = null;
-        NodeList children = root.getChildNodes();
-        final int length = children.getLength();
-        for (int i = 0; i < length; i++) {
-            Node child = children.item(i);
-
-            if ((child == null) || (child.getNodeType() != Node.ELEMENT_NODE)) {
-                continue;
-            }
-            ret = parseCssParameter(child).toString();
-        }
-
-        return ret;
+        return parseCssParameter(root);
     }
 
     /** Internal parse method - made protected for unit testing */
Index: modules/library/main/src/main/java/org/geotools/styling/SLDTransformer.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/SLDTransformer.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/SLDTransformer.java	(copia locale)
@@ -318,9 +318,7 @@
 
             start("TextSymbolizer", atts);
 
-            if (text.getGeometryPropertyName() != null) {
-                encodeGeometryProperty(text.getGeometryPropertyName());
-            }
+            encodeGeometryExpression(text.getGeometry());
 
             if (text.getLabel() != null) {
                 element("Label", text.getLabel());
@@ -377,9 +375,7 @@
 
 			start("RasterSymbolizer", atts);
 
-			if (raster.getGeometryPropertyName() != null) {
-				encodeGeometryProperty(raster.getGeometryPropertyName());
-			}
+			encodeGeometryExpression(raster.getGeometry());
 
 			if (raster.getOpacity() != null) {
 				element("Opacity", raster.getOpacity());
@@ -502,7 +498,7 @@
 				atts.addAttribute("", "uom", "uom", "", UomOgcMapping.get(uom).getSEString());
 
             start("PolygonSymbolizer", atts);
-            encodeGeometryProperty(poly.getGeometryPropertyName());
+            encodeGeometryExpression(poly.getGeometry());
 
             if (poly.getFill() != null) {
                 poly.getFill().accept(this);
@@ -542,7 +538,7 @@
 				atts.addAttribute("", "uom", "uom", "", UomOgcMapping.get(uom).getSEString());
 
         	start("LineSymbolizer", atts);
-            encodeGeometryProperty(line.getGeometryPropertyName());
+            encodeGeometryExpression(line.getGeometry());
 
             if( line.getStroke() != null ){
                 line.getStroke().accept(this);
@@ -641,7 +637,7 @@
 
             start("PointSymbolizer", atts);
 
-            encodeGeometryProperty(ps.getGeometryPropertyName());
+            encodeGeometryExpression(ps.getGeometry());
 
             ps.getGraphic().accept(this);
             end("PointSymbolizer");
@@ -971,6 +967,17 @@
             end("Geometry");
             
         }
+        
+        void encodeGeometryExpression(Expression geom) {
+            if ((geom == null)) {
+                return;
+            }
+            
+            start("Geometry");
+            filterTranslator.encode(geom);
+            end("Geometry");
+            
+        }
 
         void encodeCssParam(String name, Expression expression) {
             if (expression == null) {
Index: modules/library/main/src/main/java/org/geotools/styling/TextSymbolizerImpl.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/TextSymbolizerImpl.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/TextSymbolizerImpl.java	(copia locale)
@@ -24,10 +24,8 @@
 
 import org.geotools.factory.CommonFactoryFinder;
 import org.geotools.factory.GeoTools;
-import org.geotools.util.Utilities;
 import org.opengis.filter.FilterFactory;
 import org.opengis.filter.expression.Expression;
-import org.opengis.style.Description;
 import org.opengis.style.StyleVisitor;
 import org.opengis.util.Cloneable;
 
@@ -41,18 +39,14 @@
  * @source $URL$
  * @version $Id$
  */
-public class TextSymbolizerImpl implements TextSymbolizer2, Cloneable {
+public class TextSymbolizerImpl extends AbstractSymbolizer implements TextSymbolizer2, Cloneable {
     
-    private DescriptionImpl desc;
-    private String name;
-    private Unit<Length> uom;
     private Font font;
     
     private final FilterFactory filterFactory;
     private FillImpl fill;
     private HaloImpl halo;
     private LabelPlacement placement;
-    private String geometryPropertyName = null;
     private Expression label = null;
     private Graphic graphic = null;
     private Expression priority = null;
@@ -73,59 +67,16 @@
     }
     
     protected TextSymbolizerImpl( FilterFactory factory, Description desc, String name, Unit<Length> uom ) {
+        super(name, desc, (Expression) null, uom);
         this.filterFactory = factory;
-        this.desc = DescriptionImpl.cast(desc);
-        this.uom = uom;
-        this.name = name;
         fill = new FillImpl();
         fill.setColor(filterFactory.literal("#000000")); // default text fill is black
         halo = null;
         placement = new PointPlacementImpl();
     }
     
-    public String getName() {
-        return name;
-    }
-    
-    public void setName(String name) {
-        this.name = name;
-    }
 
-    public DescriptionImpl getDescription() {
-        return desc;
-    }
-    
-    public void setDescription(org.opengis.style.Description description) {
-        this.desc = DescriptionImpl.cast(description);
-    }
-    public Unit<Length> getUnitOfMeasure() {
-        return uom;
-    }
-
-    public void setUnitOfMeasure(Unit<Length> uom) {
-    	this.uom = uom;
-	}
-
     /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used. Geometry types other
-     * than inherently point types can be used. The geometryPropertyName is
-     * the name of a geometry property in the Feature being styled.
-     * Typically, features only have one geometry so, in general, the need to
-     * select one is not required. Note: this moves a little away from the SLD
-     * spec which provides an XPath reference to a Geometry object, but does
-     * follow it in spirit.
-     *
-     * @return String The name of the attribute in the feature being styled
-     *         that should be used.  If null then the default geometry should
-     *         be used.
-     */
-    public String geometryPropertyName() {
-        return geometryPropertyName;
-    }
-
-    /**
      * Returns the fill to be used to fill the text when rendered.
      *
      * @return The fill to be used.
@@ -288,24 +239,6 @@
     }
 
     /**
-     * Getter for property geometryPropertyName.
-     *
-     * @return Value of property geometryPropertyName.
-     */
-    public java.lang.String getGeometryPropertyName() {
-        return geometryPropertyName;
-    }
-
-    /**
-     * Setter for property geometryPropertyName.
-     *
-     * @param geometryPropertyName New value of property geometryPropertyName.
-     */
-    public void setGeometryPropertyName(java.lang.String geometryPropertyName) {
-        this.geometryPropertyName = geometryPropertyName;
-    }
-
-    /**
      * Accept a StyleVisitor to perform an operation on this symbolizer.
      *
      * @param visitor The StyleVisitor to accept.
@@ -334,77 +267,6 @@
         }
     }
 
-    public int hashCode() {
-        final int PRIME = 1000003;
-        int result = 0;
-
-        if (fill != null) {
-            result = (PRIME * result) + fill.hashCode();
-        }
-
-        if (font != null) {
-            result = (PRIME * result) + font.hashCode();
-        }
-        
-        if (uom != null) {
-            result = (PRIME * result) + uom.hashCode();
-        }
-        
-        if (desc != null) {
-            result = (PRIME * result) + desc.hashCode();
-        }
-        
-        if (name != null) {
-            result = (PRIME * result) + name.hashCode();
-        }
-
-        if (halo != null) {
-            result = (PRIME * result) + halo.hashCode();
-        }
-
-        if (placement != null) {
-            result = (PRIME * result) + placement.hashCode();
-        }
-
-        if (geometryPropertyName != null) {
-            result = (PRIME * result) + geometryPropertyName.hashCode();
-        }
-
-        if (label != null) {
-            result = (PRIME * result) + label.hashCode();
-        }
-
-        return result;
-    }
-
-    public boolean equals(Object oth) {
-        if (this == oth) {
-            return true;
-        }
-
-        if (oth == null) {
-            return false;
-        }
-
-        if (oth instanceof TextSymbolizerImpl) {
-            TextSymbolizerImpl other = (TextSymbolizerImpl) oth;
-
-            return Utilities.equals(this.geometryPropertyName,
-                other.geometryPropertyName)
-            && Utilities.equals(this.label, other.label)
-            && Utilities.equals(this.halo, other.halo)
-            && Utilities.equals(this.font, other.font)
-            && Utilities.equals(this.desc, other.desc)
-            && Utilities.equals(this.uom, other.uom)
-            && Utilities.equals(this.placement, other.placement)
-            && Utilities.equals(this.fill, other.fill);
-        }
-
-        return false;
-    }
-
-    
-    
     public void setPriority(Expression priority) {
         if (this.priority == priority) {
             return;
@@ -432,6 +294,9 @@
     }
 
     public Map<String,String> getOptions() {
+        if (optionsMap == null) {
+            optionsMap = new HashMap<String,String>();
+        }
         return optionsMap;
     }
 
@@ -449,7 +314,7 @@
     public String toString() {
         StringBuffer buf = new StringBuffer();
         buf.append("<TextSymbolizerImp property=");
-        buf.append( geometryPropertyName );
+        buf.append( getGeometryPropertyName() );
         buf.append( " label=");
         buf.append( label );
         buf.append(">");
@@ -505,4 +370,95 @@
         }
     }
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((abxtract == null) ? 0 : abxtract.hashCode());
+        result = prime * result + ((description == null) ? 0 : description.hashCode());
+        result = prime * result + ((fill == null) ? 0 : fill.hashCode());
+        result = prime * result + ((filterFactory == null) ? 0 : filterFactory.hashCode());
+        result = prime * result + ((font == null) ? 0 : font.hashCode());
+        result = prime * result + ((graphic == null) ? 0 : graphic.hashCode());
+        result = prime * result + ((halo == null) ? 0 : halo.hashCode());
+        result = prime * result + ((label == null) ? 0 : label.hashCode());
+        result = prime * result + ((optionsMap == null) ? 0 : optionsMap.hashCode());
+        result = prime * result + ((otherText == null) ? 0 : otherText.hashCode());
+        result = prime * result + ((placement == null) ? 0 : placement.hashCode());
+        result = prime * result + ((priority == null) ? 0 : priority.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        TextSymbolizerImpl other = (TextSymbolizerImpl) obj;
+        if (abxtract == null) {
+            if (other.abxtract != null)
+                return false;
+        } else if (!abxtract.equals(other.abxtract))
+            return false;
+        if (description == null) {
+            if (other.description != null)
+                return false;
+        } else if (!description.equals(other.description))
+            return false;
+        if (fill == null) {
+            if (other.fill != null)
+                return false;
+        } else if (!fill.equals(other.fill))
+            return false;
+        if (filterFactory == null) {
+            if (other.filterFactory != null)
+                return false;
+        } else if (!filterFactory.equals(other.filterFactory))
+            return false;
+        if (font == null) {
+            if (other.font != null)
+                return false;
+        } else if (!font.equals(other.font))
+            return false;
+        if (graphic == null) {
+            if (other.graphic != null)
+                return false;
+        } else if (!graphic.equals(other.graphic))
+            return false;
+        if (halo == null) {
+            if (other.halo != null)
+                return false;
+        } else if (!halo.equals(other.halo))
+            return false;
+        if (label == null) {
+            if (other.label != null)
+                return false;
+        } else if (!label.equals(other.label))
+            return false;
+        if (optionsMap == null) {
+            if (other.optionsMap != null)
+                return false;
+        } else if (!optionsMap.equals(other.optionsMap))
+            return false;
+        if (otherText == null) {
+            if (other.otherText != null)
+                return false;
+        } else if (!otherText.equals(other.otherText))
+            return false;
+        if (placement == null) {
+            if (other.placement != null)
+                return false;
+        } else if (!placement.equals(other.placement))
+            return false;
+        if (priority == null) {
+            if (other.priority != null)
+                return false;
+        } else if (!priority.equals(other.priority))
+            return false;
+        return true;
+    }
+
 }
Index: modules/library/main/src/main/java/org/geotools/styling/LineSymbolizerImpl.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/LineSymbolizerImpl.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/LineSymbolizerImpl.java	(copia locale)
@@ -20,8 +20,6 @@
 import javax.measure.quantity.Length;
 import javax.measure.unit.Unit;
 
-import org.geotools.util.Utilities;
-
 import org.opengis.filter.expression.Expression;
 import org.opengis.style.StyleVisitor;
 import org.opengis.util.Cloneable;
@@ -36,15 +34,11 @@
  * @source $URL$
  * @version $Id$
  */
-public class LineSymbolizerImpl implements LineSymbolizer, Cloneable {
+public class LineSymbolizerImpl extends AbstractSymbolizer implements LineSymbolizer, Cloneable {
     
-    private Description description;
-    private String name;
     private Expression offset;
     
-    private Unit<Length> uom = null;
     private StrokeImpl stroke = null;
-    private String geometryName = null;
 
     /**
      * Creates a new instance of DefaultLineSymbolizer
@@ -53,69 +47,10 @@
         this(null,null,null,null,null,null);
     }
     
-    protected LineSymbolizerImpl(Stroke stroke, Expression offset, Unit<Length> uom, String geom, String name, Description desc){
-        this.stroke = StrokeImpl.cast( stroke );
-        this.offset = offset;
-        this.uom = uom;
-        this.geometryName = geom;
-        this.name = name;
-        this.description = desc;
+    protected LineSymbolizerImpl(Stroke stroke, Expression offset, Unit<Length> uom, String geom, String name, Description desc) {
+        super(name, desc, geom, uom);
     }
 
-    public String getName() {
-        return name;
-    }
-    public void setName(String name) {
-        this.name = name;
-    }
-    public Description getDescription() {
-        return description;
-    }
-    
-    public void setDescription(org.opengis.style.Description description) {
-        this.description = DescriptionImpl.cast( description );
-    }
-    /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used.  Geometry types other
-     * than inherently linear types can be used.  If a point geometry is used,
-     * it should be interpreted as a line of zero length and two end caps.  If
-     * a polygon is used (or other "area" type) then its closed outline should
-     * be used as the line string (with no end caps). The geometryPropertyName
-     * is the name of a geometry property in the Feature being styled.
-     * Typically, features only have one geometry so, in general, the need to
-     * select one is not required. Note: this moves a little away from the SLD
-     * spec which provides an XPath reference to a Geometry object, but does
-     * follow it in spirit.
-     *
-     * @return The name of the attribute in the feature being styled  that
-     *         should be used.  If null then the default geometry should be
-     *         used.
-     */
-    public String getGeometryPropertyName() {
-        return geometryName;
-    }
-
-    /**
-     * Sets the GeometryPropertyName.
-     *
-     * @param name The name of the geometryProperty.
-     *
-     * @see #LineSymbolizerImpl.geometryPropertyName()
-     */
-    public void setGeometryPropertyName(String name) {
-        geometryName = name;
-    }
-
-    public Unit<Length> getUnitOfMeasure() {
-        return uom;
-    }
-
-    public void setUnitOfMeasure(Unit<Length> uom) {
-        this.uom = uom;
-    }
-
     public Expression getPerpendicularOffset() {
         return offset;
     }
@@ -184,109 +119,48 @@
         return clone;
     }
 
-    /**
-     * Generates a hashcode for the LineSymbolizerImpl.
-     *
-     * @return A hashcode.
-     */
-    public int hashCode() {
-        final int PRIME = 1000003;
-        int result = 0;
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        buf.append("<LineSymbolizerImp property=");
+        buf.append( getGeometryPropertyName() );
+        buf.append( " uom=");
+        buf.append( unitOfMeasure );
+        buf.append( " stroke=");
+        buf.append( stroke );
+        buf.append(">");
+        return buf.toString();
+    }
 
-        if (name != null) {
-            result = (PRIME * result) + name.hashCode();
-        }
-        
-        if (stroke != null) {
-            result = (PRIME * result) + stroke.hashCode();
-        }
-
-        if (geometryName != null) {
-            result = (PRIME * result) + geometryName.hashCode();
-        }
-
-        if(uom != null){
-            result = (PRIME * result) +  uom.hashCode();
-        }
-        
-        if(description != null){
-            result = (PRIME * result) +  description.hashCode();
-        }
-        
-        if(offset != null){
-            result = (PRIME * result) +  offset.hashCode();
-        }
-        
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((offset == null) ? 0 : offset.hashCode());
+        result = prime * result + ((stroke == null) ? 0 : stroke.hashCode());
         return result;
     }
 
-    /**
-     * Compares this LineSymbolizerImpl with another for  equality.
-     * 
-     * <p>
-     * Two LineSymbolizerImpls are equal if they have the same
-     * geometryPropertyName and the same stroke.
-     * </p>
-     *
-     * @param oth The other LineSymbolizerImpl
-     *
-     * @return True if this and oth are equal.
-     */
-    public boolean equals(Object oth) {
-        if (this == oth) {
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
             return true;
-        }
-
-        if (oth == null) {
+        if (!super.equals(obj))
             return false;
-        }
-
-        if (oth.getClass() != getClass()) {
+        if (getClass() != obj.getClass())
             return false;
-        }
-
-        LineSymbolizerImpl other = (LineSymbolizerImpl) oth;
-
-        if (this.geometryName == null) {
-            if (other.geometryName != null) {
+        LineSymbolizerImpl other = (LineSymbolizerImpl) obj;
+        if (offset == null) {
+            if (other.offset != null)
                 return false;
-            }
-        } else {
-            if (!this.geometryName.equals(other.geometryName)) {
+        } else if (!offset.equals(other.offset))
+            return false;
+        if (stroke == null) {
+            if (other.stroke != null)
                 return false;
-            }
-        }
-
-        if(!Utilities.equals( getStroke(), other.getStroke())){
+        } else if (!stroke.equals(other.stroke))
             return false;
-        }
-        
-        if(!Utilities.equals( uom, other.uom)){
-            return false;
-        }
-        
-        if(!Utilities.equals( description, other.description)){
-            return false;
-        }
-        
-        if(!Utilities.equals( offset, other.offset)){
-            return false;
-        }
-        
         return true;
     }
-    
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append("<LineSymbolizerImp property=");
-        buf.append( geometryName );
-        buf.append( " uom=");
-        buf.append( uom );
-        buf.append( " stroke=");
-        buf.append( stroke );
-        buf.append(">");
-        return buf.toString();
-    }
 
     static LineSymbolizerImpl cast(org.opengis.style.Symbolizer symbolizer) {
         if (symbolizer == null) {
Index: modules/library/main/src/main/java/org/geotools/styling/PolygonSymbolizerImpl.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/PolygonSymbolizerImpl.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/PolygonSymbolizerImpl.java	(copia locale)
@@ -20,8 +20,6 @@
 import javax.measure.quantity.Length;
 import javax.measure.unit.Unit;
 
-import org.geotools.util.Utilities;
-
 import org.opengis.filter.expression.Expression;
 import org.opengis.style.StyleVisitor;
 import org.opengis.util.Cloneable;
@@ -36,17 +34,13 @@
  * @source $URL$
  * @version $Id$
  */
-public class PolygonSymbolizerImpl implements PolygonSymbolizer, Cloneable {
+public class PolygonSymbolizerImpl extends AbstractSymbolizer implements PolygonSymbolizer, Cloneable {
     
-    private DescriptionImpl description;
-    private String name;
     private Expression offset;
-    private Unit<Length> uom;
     private DisplacementImpl disp;
     
     private Fill fill = new FillImpl();
     private StrokeImpl stroke = new StrokeImpl();
-    private String geometryName = null;
 
     /**
      * Creates a new instance of DefaultPolygonStyler
@@ -62,72 +56,14 @@
             Unit<Length> uom, 
             String geom, 
             String name, 
-            Description desc){
+            Description desc) {
+        super(name, desc, geom, uom);
         this.stroke = StrokeImpl.cast( stroke );
         this.fill = fill;
         this.disp = DisplacementImpl.cast( disp );
         this.offset = offset;
-        this.uom = uom;
-        this.geometryName = geom;
-        this.name = name;
-        this.description = DescriptionImpl.cast( desc );
     }
     
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-    
-    public Description getDescription() {
-        return description;
-    }
-    
-    public void setDescription(org.opengis.style.Description description) {
-        this.description = DescriptionImpl.cast( description );
-    }
-    
-    /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used. Geometry types other
-     * than inherently area types can be used. If a line is used then the line
-     * string is closed for filling (only) by connecting its end point to its
-     * start point. The geometryPropertyName is the name of a geometry
-     * property in the Feature being styled.  Typically, features only have
-     * one geometry so, in general, the need to select one is not required.
-     * Note: this moves a little away from the SLD spec which provides an
-     * XPath reference to a Geometry object, but does follow it in spirit.
-     *
-     * @return The name of the attribute in the feature being styled  that
-     *         should be used.  If null then the default geometry should be
-     *         used.
-     */
-    public String getGeometryPropertyName() {
-        return geometryName;
-    }
-
-    /**
-     * Sets the GeometryPropertyName.
-     *
-     * @param name The name of the GeometryProperty.
-     *
-     * @see #PolygonSymbolizerImpl.geometryPropertyName()
-     */
-    public void setGeometryPropertyName(String name) {
-        geometryName = name;
-    }
-
-    public Unit<Length> getUnitOfMeasure() {
-        return uom;
-    }
-
-    public void setUnitOfMeasure(Unit<Length> uom) {
-        this.uom = uom;
-    }
-
     public Expression getPerpendicularOffset() {
         return offset;
     }
@@ -230,77 +166,47 @@
         return clone;
     }
 
-    /**
-     * Generates a hashcode for the PolygonSymbolizerImpl.
-     *
-     * @return A hashcode.
-     */
+    @Override
     public int hashCode() {
-        final int PRIME = 1000003;
-        int result = 0;
-
-        if (fill != null) {
-            result = (PRIME * result) + fill.hashCode();
-        }
-
-        if (stroke != null) {
-            result = (PRIME * result) + stroke.hashCode();
-        }
-
-        if (geometryName != null) {
-            result = (PRIME * result) + geometryName.hashCode();
-        }
-        
-        if (description != null) {
-            result = (PRIME * result) + description.hashCode();
-        }
-        
-        if (uom != null) {
-            result = (PRIME * result) + uom.hashCode();
-        }
-        
-        if (offset != null) {
-            result = (PRIME * result) + offset.hashCode();
-        }
-
-        if (disp != null) {
-            result = (PRIME * result) + disp.hashCode();
-        }
-        
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((disp == null) ? 0 : disp.hashCode());
+        result = prime * result + ((fill == null) ? 0 : fill.hashCode());
+        result = prime * result + ((offset == null) ? 0 : offset.hashCode());
+        result = prime * result + ((stroke == null) ? 0 : stroke.hashCode());
         return result;
     }
 
-    /**
-     * Compares this PolygonSymbolizerImpl with another.
-     * 
-     * <p>
-     * Two PolygonSymbolizerImpls are equal if they have the same
-     * geometryProperty, fill and stroke.
-     * </p>
-     *
-     * @param oth the object to compare against.
-     *
-     * @return true if oth is equal to this object.
-     */
-    public boolean equals(Object oth) {
-        if (this == oth) {
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
             return true;
-        }
-
-        if (oth instanceof PolygonSymbolizerImpl) {
-            PolygonSymbolizerImpl other = (PolygonSymbolizerImpl) oth;
-
-            return Utilities.equals(this.geometryName,
-                other.geometryName)
-            && Utilities.equals(fill, other.fill)
-            && Utilities.equals(stroke, other.stroke)
-            && Utilities.equals(description, other.description)
-            && Utilities.equals(disp, other.disp)
-            && Utilities.equals(offset, other.offset)
-            && Utilities.equals(uom, other.uom);
-        }
-
-        return false;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        PolygonSymbolizerImpl other = (PolygonSymbolizerImpl) obj;
+        if (disp == null) {
+            if (other.disp != null)
+                return false;
+        } else if (!disp.equals(other.disp))
+            return false;
+        if (fill == null) {
+            if (other.fill != null)
+                return false;
+        } else if (!fill.equals(other.fill))
+            return false;
+        if (offset == null) {
+            if (other.offset != null)
+                return false;
+        } else if (!offset.equals(other.offset))
+            return false;
+        if (stroke == null) {
+            if (other.stroke != null)
+                return false;
+        } else if (!stroke.equals(other.stroke))
+            return false;
+        return true;
     }
 
     static PolygonSymbolizerImpl cast(org.opengis.style.Symbolizer symbolizer) {
Index: modules/library/main/src/main/java/org/geotools/styling/StyleFactoryImpl2.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/StyleFactoryImpl2.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/StyleFactoryImpl2.java	(copia locale)
@@ -313,7 +313,7 @@
             Expression offset) {
         LineSymbolizerImpl copy = new LineSymbolizerImpl();
         copy.setDescription( description );
-        copy.setGeometryPropertyName(((PropertyName)geometry).getPropertyName() );
+        copy.setGeometry(geometry);
         copy.setName( name );
         copy.setPerpendicularOffset( offset );
         copy.setStroke( stroke );
Index: modules/library/main/src/main/java/org/geotools/styling/VendorSymbolizerImpl.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/VendorSymbolizerImpl.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/VendorSymbolizerImpl.java	(copia locale)
@@ -20,10 +20,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.measure.quantity.Length;
-import javax.measure.unit.Unit;
-
-import org.geotools.util.Utilities;
 import org.opengis.filter.expression.Expression;
 import org.opengis.style.StyleVisitor;
 
@@ -39,12 +35,8 @@
  * @source $URL: http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/java/org/geotools/styling/PolygonSymbolizerImpl.java $
  * @version $Id: PolygonSymbolizerImpl.java 33833 2009-09-04 12:26:28Z jive $
  */
-public class VendorSymbolizerImpl implements ExtensionSymbolizer {
+public class VendorSymbolizerImpl extends AbstractSymbolizer implements ExtensionSymbolizer {
     
-    private DescriptionImpl description;
-    private String name;
-    private Unit<Length> uom;
-    private String geometryName = null;
     private String extensionName;
     private Map<String, Expression> parameters = new HashMap<String, Expression>();
 
@@ -54,115 +46,43 @@
     protected VendorSymbolizerImpl() {
     }
     
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
     
-    public Description getDescription() {
-        return description;
-    }
     
-    public void setDescription(org.opengis.style.Description description) {
-        this.description = DescriptionImpl.cast( description );
-    }
-    
-    /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used. Geometry types other
-     * than inherently area types can be used. If a line is used then the line
-     * string is closed for filling (only) by connecting its end point to its
-     * start point. The geometryPropertyName is the name of a geometry
-     * property in the Feature being styled.  Typically, features only have
-     * one geometry so, in general, the need to select one is not required.
-     * Note: this moves a little away from the SLD spec which provides an
-     * XPath reference to a Geometry object, but does follow it in spirit.
-     *
-     * @return The name of the attribute in the feature being styled  that
-     *         should be used.  If null then the default geometry should be
-     *         used.
-     */
-    public String getGeometryPropertyName() {
-        return geometryName;
-    }
-
-    /**
-     * Sets the GeometryPropertyName.
-     *
-     * @param name The name of the GeometryProperty.
-     *
-     * @see #PolygonSymbolizerImpl.geometryPropertyName()
-     */
-    public void setGeometryPropertyName(String name) {
-        geometryName = name;
-    }
-
-    public Unit<Length> getUnitOfMeasure() {
-        return uom;
-    }
-
-    public void setUnitOfMeasure(Unit<Length> uom) {
-        this.uom = uom;
-    }
-
-
-    /**
-     * Generates a hashcode for the PolygonSymbolizerImpl.
-     *
-     * @return A hashcode.
-     */
+    @Override
     public int hashCode() {
-        final int PRIME = 1000003;
-        int result = 0;
-
-        if (geometryName != null) {
-            result = (PRIME * result) + geometryName.hashCode();
-        }
-        
-        if (description != null) {
-            result = (PRIME * result) + description.hashCode();
-        }
-        
-        if (uom != null) {
-            result = (PRIME * result) + uom.hashCode();
-        }
-                
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((extensionName == null) ? 0 : extensionName.hashCode());
+        result = prime * result + ((parameters == null) ? 0 : parameters.hashCode());
         return result;
     }
 
-    /**
-     * Compares this PolygonSymbolizerImpl with another.
-     * 
-     * <p>
-     * Two PolygonSymbolizerImpls are equal if they have the same
-     * geometryProperty, fill and stroke.
-     * </p>
-     *
-     * @param oth the object to compare against.
-     *
-     * @return true if oth is equal to this object.
-     */
-    public boolean equals(Object oth) {
-        if (this == oth) {
-            return true;
-        }
 
-        if (oth instanceof VendorSymbolizerImpl) {
-            VendorSymbolizerImpl other = (VendorSymbolizerImpl) oth;
 
-            return Utilities.equals(this.geometryName,
-                other.geometryName)
-            && Utilities.equals(description, other.description)
-            && Utilities.equals(uom, other.uom);
-        }
-
-        return false;
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        VendorSymbolizerImpl other = (VendorSymbolizerImpl) obj;
+        if (extensionName == null) {
+            if (other.extensionName != null)
+                return false;
+        } else if (!extensionName.equals(other.extensionName))
+            return false;
+        if (parameters == null) {
+            if (other.parameters != null)
+                return false;
+        } else if (!parameters.equals(other.parameters))
+            return false;
+        return true;
     }
 
+
+
     static VendorSymbolizerImpl cast(org.opengis.style.Symbolizer symbolizer) {
         if( symbolizer == null ){
             return null;
Index: modules/library/main/src/main/java/org/geotools/styling/RasterSymbolizerImpl.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/RasterSymbolizerImpl.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/RasterSymbolizerImpl.java	(copia locale)
@@ -36,11 +36,8 @@
  * @author Johann Sorel (Geomatys)
  * @source $URL$
  */
-public class RasterSymbolizerImpl implements RasterSymbolizer {
+public class RasterSymbolizerImpl extends AbstractSymbolizer implements RasterSymbolizer {
     
-    private DescriptionImpl description;
-    private String name;
-    private Unit<Length> uom;
     private OverlapBehavior behavior;
     
     // TODO: make container ready
@@ -49,7 +46,6 @@
     private ColorMapImpl colorMap = new ColorMapImpl();
     private ContrastEnhancementImpl contrastEnhancement = new ContrastEnhancementImpl();
     private ShadedReliefImpl shadedRelief = new ShadedReliefImpl();
-    private String geometryName = "raster";
     private Symbolizer symbolizer;
     private Expression opacity;
     private Expression overlap;
@@ -63,104 +59,86 @@
     }
     
     public RasterSymbolizerImpl(FilterFactory factory, Description desc, String name, Unit<Length> uom, OverlapBehavior behavior) {
+        super(name, desc, "raster", uom);
         this.filterFactory = factory;
         this.opacity = filterFactory.literal(1.0);
         this.overlap = filterFactory.literal(OverlapBehavior.RANDOM);
-        this.description = DescriptionImpl.cast(desc);
-        this.name = name;
-        this.uom = uom;
         this.behavior = behavior;
     }
     
 
-    public String getName() {
-        return name;
-    }
-    
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public DescriptionImpl getDescription() {
-        return description;
-    }
-    
-    public void setDescription(org.opengis.style.Description description) {
-        this.description = DescriptionImpl.cast(description);
-    }
-    public Unit<Length> getUnitOfMeasure() {
-        return uom;
-    }
-    
-    public void setUnitOfMeasure(Unit<Length> uom) {
-    	this.uom = uom;
-	}
-
     @Override
     public int hashCode() {
-        final int PRIME = 1000003;
-        int result = 0;
-
-        if (geometryName != null){
-            result = (PRIME * result) +  geometryName.hashCode();
-        }
-
-        if (channelSelection != null) {
-            result = (PRIME * result) + channelSelection.hashCode();
-        }
-        
-        if (colorMap != null) {
-            result = (PRIME * result) + colorMap.hashCode();
-        }
-
-        if (contrastEnhancement != null) {
-            result = (PRIME * result) + contrastEnhancement.hashCode();
-        }
-
-        if(shadedRelief != null){
-            result = (PRIME * result) +  shadedRelief.hashCode();
-        }
-        
-        if(opacity != null){
-            result = (PRIME * result) +  opacity.hashCode();
-        }
-        
-        if(overlap != null){
-            result = (PRIME * result) +  overlap.hashCode();
-        }
-        
-        if(description != null){
-            result = (PRIME * result) +  description.hashCode();
-        }
-        
-        if(uom != null){
-            result = (PRIME * result) +  uom.hashCode();
-        }
-        
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((behavior == null) ? 0 : behavior.hashCode());
+        result = prime * result + ((channelSelection == null) ? 0 : channelSelection.hashCode());
+        result = prime * result + ((colorMap == null) ? 0 : colorMap.hashCode());
+        result = prime * result
+                + ((contrastEnhancement == null) ? 0 : contrastEnhancement.hashCode());
+        result = prime * result + ((filterFactory == null) ? 0 : filterFactory.hashCode());
+        result = prime * result + ((opacity == null) ? 0 : opacity.hashCode());
+        result = prime * result + ((overlap == null) ? 0 : overlap.hashCode());
+        result = prime * result + ((shadedRelief == null) ? 0 : shadedRelief.hashCode());
+        result = prime * result + ((symbolizer == null) ? 0 : symbolizer.hashCode());
         return result;
     }
-    
+
     @Override
     public boolean equals(Object obj) {
-    	if (this == obj) {
+        if (this == obj)
             return true;
-        }
-
-        if (obj instanceof RasterSymbolizerImpl) {
-        	RasterSymbolizerImpl other = (RasterSymbolizerImpl) obj;
-
-            return Utilities.equals(this.geometryName, other.geometryName)
-            && Utilities.equals(channelSelection, other.channelSelection)
-            && Utilities.equals(colorMap, other.colorMap)
-            && Utilities.equals(contrastEnhancement, other.contrastEnhancement)
-            && Utilities.equals(shadedRelief, other.shadedRelief)
-            && Utilities.equals(opacity, other.opacity)
-            && Utilities.equals(overlap, other.overlap)
-            && Utilities.equals(description, other.description)
-            && Utilities.equals(uom, other.uom);
-        }
-
-        return false;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        RasterSymbolizerImpl other = (RasterSymbolizerImpl) obj;
+        if (behavior == null) {
+            if (other.behavior != null)
+                return false;
+        } else if (!behavior.equals(other.behavior))
+            return false;
+        if (channelSelection == null) {
+            if (other.channelSelection != null)
+                return false;
+        } else if (!channelSelection.equals(other.channelSelection))
+            return false;
+        if (colorMap == null) {
+            if (other.colorMap != null)
+                return false;
+        } else if (!colorMap.equals(other.colorMap))
+            return false;
+        if (contrastEnhancement == null) {
+            if (other.contrastEnhancement != null)
+                return false;
+        } else if (!contrastEnhancement.equals(other.contrastEnhancement))
+            return false;
+        if (filterFactory == null) {
+            if (other.filterFactory != null)
+                return false;
+        } else if (!filterFactory.equals(other.filterFactory))
+            return false;
+        if (opacity == null) {
+            if (other.opacity != null)
+                return false;
+        } else if (!opacity.equals(other.opacity))
+            return false;
+        if (overlap == null) {
+            if (other.overlap != null)
+                return false;
+        } else if (!overlap.equals(other.overlap))
+            return false;
+        if (shadedRelief == null) {
+            if (other.shadedRelief != null)
+                return false;
+        } else if (!shadedRelief.equals(other.shadedRelief))
+            return false;
+        if (symbolizer == null) {
+            if (other.symbolizer != null)
+                return false;
+        } else if (!symbolizer.equals(other.symbolizer))
+            return false;
+        return true;
     }
 
     /**
@@ -222,18 +200,6 @@
         return contrastEnhancement;
     }
 
-    /**
-     * The interpretation of Geometry is system-dependent, as raster data may
-     * be organized differently from feature data, though omitting this
-     * element selects the default raster-data source.  Geometry-type
-     * transformations are also system-dependent and it is assumed that this
-     * capability will be little used.
-     *
-     * @return the name of the geometry
-     */
-    public String getGeometryPropertyName() {
-        return geometryName;
-    }
 
     /**
      * The ImageOutline element specifies that individual source rasters in a
@@ -387,22 +353,6 @@
     }
 
     /**
-     * The interpretation of Geometry is system-dependent, as raster data may
-     * be organized differently from feature data, though omitting this
-     * element selects the default raster-data source.  Geometry-type
-     * transformations are also system-dependent and it is assumed that this
-     * capability will be little used.
-     *
-     * @param geometryName the name of the Geometry
-     */
-    public void setGeometryPropertyName(String geometryName) {
-        if (this.geometryName == geometryName) {
-            return;
-        }
-        this.geometryName = geometryName;
-    }
-
-    /**
      * The ImageOutline element specifies that individual source rasters in a
      * multi-raster set (such as a set of satellite-image scenes) should be
      * outlined with either a LineStringSymbol or PolygonSymbol. It is defined
Index: modules/library/main/src/main/java/org/geotools/styling/visitor/DuplicatingStyleVisitor.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/visitor/DuplicatingStyleVisitor.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/visitor/DuplicatingStyleVisitor.java	(copia locale)
@@ -760,6 +760,7 @@
         copy.setLabel( copy( text.getLabel()));
         copy.setLabelPlacement( copy( text.getLabelPlacement()));
         copy.setPriority( copy( text.getPriority()));
+        copy.getOptions().putAll(text.getOptions());
         
         if( STRICT && !copy.equals( text )){
             throw new IllegalStateException("Was unable to duplicate provided TextSymbolizer:"+text );
Index: modules/library/main/src/main/java/org/geotools/styling/AbstractSymbolizer.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/AbstractSymbolizer.java	(revisione 0)
+++ modules/library/main/src/main/java/org/geotools/styling/AbstractSymbolizer.java	(revisione 0)
@@ -0,0 +1,132 @@
+package org.geotools.styling;
+
+import javax.measure.quantity.Length;
+import javax.measure.unit.Unit;
+
+import org.geotools.factory.CommonFactoryFinder;
+import org.opengis.filter.expression.Expression;
+import org.opengis.filter.expression.PropertyName;
+
+public abstract class AbstractSymbolizer implements Symbolizer {
+    protected String name;
+
+    protected Description description;
+
+    protected Expression geometry;
+
+    protected Unit<Length> unitOfMeasure;
+
+    protected AbstractSymbolizer() {
+    }
+
+    public AbstractSymbolizer(String name, Description description, Expression geometry,
+            Unit<Length> unitOfMeasure) {
+        this.name = name;
+        this.description = description;
+        this.geometry = geometry;
+        this.unitOfMeasure = unitOfMeasure;
+    }
+    
+    public AbstractSymbolizer(String name, Description description, String geometryPropertyName,
+            Unit<Length> unitOfMeasure) {
+        this.name = name;
+        this.description = description;
+        this.unitOfMeasure = unitOfMeasure;
+        setGeometryPropertyName(geometryPropertyName);
+    }
+
+    public Description getDescription() {
+        return description;
+    }
+
+    public void setDescription(org.opengis.style.Description description) {
+        this.description = DescriptionImpl.cast(description);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setUnitOfMeasure(Unit<Length> uom) {
+        this.unitOfMeasure = uom;
+    }
+
+    public Unit<Length> getUnitOfMeasure() {
+        return unitOfMeasure;
+    }
+
+    public Expression getGeometry() {
+        return geometry;
+    }
+
+    public void setGeometry(Expression geometry) {
+        this.geometry = geometry;
+    }
+
+    public String getGeometryPropertyName() {
+        if (geometry instanceof PropertyName) {
+            PropertyName pg = (PropertyName) geometry;
+            return pg.getPropertyName();
+        }
+        return null;
+    }
+
+    public void setGeometryPropertyName(String geometryPropertyName) {
+        if (geometryPropertyName == null) {
+            geometry = null;
+        } else {
+            org.opengis.filter.FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
+            geometry = ff.property(geometryPropertyName);
+        }
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((description == null) ? 0 : description.hashCode());
+        result = prime * result + ((geometry == null) ? 0 : geometry.hashCode());
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        result = prime * result + ((unitOfMeasure == null) ? 0 : unitOfMeasure.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        AbstractSymbolizer other = (AbstractSymbolizer) obj;
+        if (description == null) {
+            if (other.description != null)
+                return false;
+        } else if (!description.equals(other.description))
+            return false;
+        if (geometry == null) {
+            if (other.geometry != null)
+                return false;
+        } else if (!geometry.equals(other.geometry))
+            return false;
+        if (name == null) {
+            if (other.name != null)
+                return false;
+        } else if (!name.equals(other.name))
+            return false;
+        if (unitOfMeasure == null) {
+            if (other.unitOfMeasure != null)
+                return false;
+        } else if (!unitOfMeasure.equals(other.unitOfMeasure))
+            return false;
+        return true;
+    }
+    
+    
+
+}
Index: modules/library/main/src/main/java/org/geotools/styling/PointSymbolizerImpl.java
===================================================================
--- modules/library/main/src/main/java/org/geotools/styling/PointSymbolizerImpl.java	(revisione 34254)
+++ modules/library/main/src/main/java/org/geotools/styling/PointSymbolizerImpl.java	(copia locale)
@@ -21,8 +21,6 @@
 import javax.measure.unit.Unit;
 
 import org.geotools.util.SimpleInternationalString;
-import org.geotools.util.Utilities;
-
 import org.opengis.style.StyleVisitor;
 import org.opengis.util.Cloneable;
 
@@ -36,12 +34,8 @@
  * @source $URL$
  * @version $Id$
  */
-public class PointSymbolizerImpl implements PointSymbolizer, Cloneable {
+public class PointSymbolizerImpl extends AbstractSymbolizer implements PointSymbolizer, Cloneable {
     
-    private Description description;
-    private String name;
-    private Unit<Length> uom;
-    private String geometryPropertyName = null;
     private GraphicImpl graphic = new GraphicImpl();
 
     /**
@@ -58,64 +52,11 @@
     }
 
     protected PointSymbolizerImpl(Graphic graphic, Unit<Length> uom, String geom, String name, Description desc){
+        super(name, desc, geom, uom);
         this.graphic = GraphicImpl.cast(graphic);
-        this.uom = uom;
-        this.geometryPropertyName = geom;
-        this.name = name;
-        this.description = desc;
     }
-    
-    public String getName() {
-        return name;
-    }
 
-    public void setName(String name) {
-        this.name = name;
-    }
-    
-    public Description getDescription() {
-        return description;
-    }
-    
-    public void setDescription(org.opengis.style.Description description) {
-        this.description = DescriptionImpl.cast(description);
-    }
-    
     /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used.  Geometry types other
-     * than inherently linear types can be used.  If a point geometry is used,
-     * it should be interpreted as a line of zero length and two end caps.  If
-     * a polygon is used (or other "area" type) then its closed outline should
-     * be used as the line string (with no end caps). The geometryPropertyName
-     * is the name of a geometry property in the Feature being styled.
-     * Typically, features only have one geometry so, in general, the need to
-     * select one is not required. Note: this moves a little away from the SLD
-     * spec which provides an XPath reference to a Geometry object, but does
-     * follow it in spirit.
-     *
-     * @return The name of the attribute in the feature being styled  that
-     *         should be used.  If null then the default geometry should be
-     *         used.
-     */
-    public String getGeometryPropertyName() {
-        return geometryPropertyName;
-    }
-
-    public void setGeometryPropertyName(String name) {
-        geometryPropertyName = name;
-    }
-
-    public Unit<Length> getUnitOfMeasure() {
-        return uom;
-    }
-
-    public void setUnitOfMeasure(Unit<Length> uom) {
-    	this.uom = uom;
-	}
-
-    /**
      * Provides the graphical-symbolization parameter to use for the point
      * geometry.
      *
@@ -170,71 +111,29 @@
         return clone;
     }
 
-    /**
-     * Generates the hashcode for the PointSymbolizer
-     *
-     * @return the hashcode
-     */
+    @Override
     public int hashCode() {
-        final int PRIME = 1000003;
-        int result = 0;
-
-        if (geometryPropertyName != null) {
-            result = (PRIME * result) + geometryPropertyName.hashCode();
-        }
-
-        if (graphic != null) {
-            result = (PRIME * result) + graphic.hashCode();
-        }
-        
-        if(name != null){
-            result = (PRIME * result) + name.hashCode();
-        }
-        
-        if(uom != null){
-            result = (PRIME * result) + uom.hashCode();
-        }
-        
-        if(description != null){
-            result = (PRIME * result) + description.hashCode();
-        }
-
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((graphic == null) ? 0 : graphic.hashCode());
         return result;
     }
 
-    /**
-     * Checks this PointSymbolizerImpl with another for equality.
-     * 
-     * <p>
-     * Two PointSymbolizers are equal if the have the same geometry property
-     * name and their graphic object is equal.
-     * </p>
-     * 
-     * <p>
-     * Note: this method only works for other instances of PointSymbolizerImpl,
-     * not other implementors of PointSymbolizer
-     * </p>
-     *
-     * @param oth The object to compare with this PointSymbolizerImpl for
-     *        equality.
-     *
-     * @return True of oth is a PointSymbolizerImpl that is equal.
-     */
-    public boolean equals(Object oth) {
-        if (this == oth) {
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
             return true;
-        }
-
-        if (oth instanceof PointSymbolizerImpl) {
-            PointSymbolizerImpl other = (PointSymbolizerImpl) oth;
-
-            return Utilities.equals(geometryPropertyName,other.geometryPropertyName)
-            && Utilities.equals(graphic, other.graphic)
-            && Utilities.equals(uom, other.uom)
-            && Utilities.equals(description, other.description);
-        }
-
-        return false;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        PointSymbolizerImpl other = (PointSymbolizerImpl) obj;
+        if (graphic == null) {
+            if (other.graphic != null)
+                return false;
+        } else if (!graphic.equals(other.graphic))
+            return false;
+        return true;
     }
 
     static PointSymbolizerImpl cast(org.opengis.style.Symbolizer symbolizer) {
Index: modules/library/main/src/main/resources/META-INF/services/org.opengis.filter.expression.Function
===================================================================
--- modules/library/main/src/main/resources/META-INF/services/org.opengis.filter.expression.Function	(revisione 34254)
+++ modules/library/main/src/main/resources/META-INF/services/org.opengis.filter.expression.Function	(copia locale)
@@ -107,6 +107,7 @@
 org.geotools.filter.function.FilterFunction_dateFormat
 org.geotools.filter.function.FilterFunction_numberFormat
 org.geotools.filter.function.FilterFunction_Convert
+org.geotools.filter.function.FilterFunction_vertices
 org.geotools.filter.function.IDFunction
 org.geotools.filter.function.math.FilterFunction_IEEEremainder
 org.geotools.filter.function.math.FilterFunction_abs
Index: modules/library/api/src/main/java/org/geotools/styling/PointSymbolizer.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/PointSymbolizer.java	(revisione 34254)
+++ modules/library/api/src/main/java/org/geotools/styling/PointSymbolizer.java	(copia locale)
@@ -94,29 +94,5 @@
      */
     void setGraphic(org.opengis.style.Graphic graphic);
 
-    /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used.  Geometry types other
-     * than inherently point types can be used.  The geometryPropertyName is
-     * the name of a geometry property in the Feature being styled.
-     * Typically, features only have one geometry so, in general, the need to
-     * select one is not required. Note: this moves a little away from the SLD
-     * spec which provides an XPath reference to a Geometry object, but does
-     * follow it in spirit.
-     */
-    String getGeometryPropertyName();
-
-    /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used.  Geometry types other
-     * than inherently point types can be used.  The geometryPropertyName is
-     * the name of a geometry property in the Feature being styled.
-     * Typically, features only have one geometry so, in general, the need to
-     * select one is not required. Note: this moves a little away from the SLD
-     * spec which provides an XPath reference to a Geometry object, but does
-     * follow it in spirit.
-     */
-    void setGeometryPropertyName(String geometryPropertyName);
+    
 }
\ No newline at end of file
Index: modules/library/api/src/main/java/org/geotools/styling/ExtensionSymbolizer.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/ExtensionSymbolizer.java	(revisione 34254)
+++ modules/library/api/src/main/java/org/geotools/styling/ExtensionSymbolizer.java	(copia locale)
@@ -3,7 +3,6 @@
 import java.util.Map;
 
 import org.opengis.filter.expression.Expression;
-import org.opengis.style.StyleVisitor;
 
 /**
  * Custom symbolizer support.
Index: modules/library/api/src/main/java/org/geotools/styling/Symbolizer.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/Symbolizer.java	(revisione 34254)
+++ modules/library/api/src/main/java/org/geotools/styling/Symbolizer.java	(copia locale)
@@ -20,8 +20,11 @@
 import javax.measure.quantity.Length;
 import javax.measure.unit.Unit;
 
+import org.opengis.filter.expression.Expression;
+import org.opengis.filter.expression.PropertyName;
 
 
+
 /**
  * This is the parent interface of all Symbolizers.
  *
@@ -103,4 +106,42 @@
      */
     void setName( String name );    
     
+    /**
+     * A shortcut to get the geometry property name in the case the geometry
+     * expression is a PropertyName. In case the geometry expression is null,
+     * and in the case the geometry expression is not a PropertyName, this
+     * method will return null.
+     */
+    String getGeometryPropertyName();
+
+    /**
+     * A shortcut to define the geometry expression as a {@link PropertyName}
+     * Typically, features only have one geometry so, in general, the need to
+     * select one is not required. Note: this moves a little away from the SLD
+     * spec which provides an XPath reference to a Geometry object, but does
+     * follow it in spirit.
+     */
+    void setGeometryPropertyName(String geometryPropertyName);
+    
+    /**
+     * This defines the geometry to be used for styling.<br>
+     * The property is optional and if it is absent (null) then the "default"
+     * geometry property of the feature should be used.<br>
+     * Typically, features only have one geometry so, in general, the need to
+     * select one is not required.<br>
+     * The expression can also build a new geometry out of existing attributes 
+     * or transform an existing geometry. For geometry transformations that
+     * do change the geometry locations or that make up geometries out of
+     * non geometric attributes it is advised that the Expression implements
+     * the SpatialTransformationFunction interface
+     */
+    Expression getGeometry();
+    
+    /**
+     * Sets the expression used for styling. See {@link #getGeometry()} for further
+     * details.
+     * @param geometry
+     */
+    void setGeometry(Expression geometry);
+    
 }
Index: modules/library/api/src/main/java/org/geotools/styling/TextSymbolizer.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/TextSymbolizer.java	(revisione 34254)
+++ modules/library/api/src/main/java/org/geotools/styling/TextSymbolizer.java	(copia locale)
@@ -182,23 +182,6 @@
     void setFill(org.opengis.style.Fill fill);
 
     /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used.  Geometry types other
-     * than inherently point types can be used.  The geometryPropertyName is
-     * the name of a geometry property in the Feature being styled.
-     * Typically, features only have one geometry so, in general, the need to
-     * select one is not required. Note: this moves a little away from the SLD
-     * spec which provides an XPath reference to a Geometry object, but does
-     * follow it in spirit.
-     *
-     * @param name The name of the attribute in the feature being styled  that
-     *        should be used.  If null then the default geometry should be
-     *        used.
-     */
-    void setGeometryPropertyName(String name);
-
-    /**
      * Priority -- null = use the default labeling priority Expression =
      * an expression that evaluates to a number (ie. Integer, Long, Double...)
      * Larger = more likely to be rendered
Index: modules/library/api/src/main/java/org/geotools/styling/LineSymbolizer.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/LineSymbolizer.java	(revisione 34254)
+++ modules/library/api/src/main/java/org/geotools/styling/LineSymbolizer.java	(copia locale)
@@ -98,11 +98,6 @@
     void setStroke(org.opengis.style.Stroke stroke);
 
     /**
-     * @param geometry property name
-     */
-    void setGeometryPropertyName(String geometryPropertyName);
-
-    /**
      * Define an offset to draw lines in parallel to the original geometry.
      * 
      * @param offset
Index: modules/library/api/src/main/java/org/geotools/styling/PolygonSymbolizer.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/PolygonSymbolizer.java	(revisione 34254)
+++ modules/library/api/src/main/java/org/geotools/styling/PolygonSymbolizer.java	(copia locale)
@@ -115,24 +115,6 @@
      * @param stroke The Stroke style to use when rendering lines.
      */
     void setStroke(org.opengis.style.Stroke stroke);
-
-    /**
-     * This property defines the geometry to be used for styling.<br>
-     * The property is optional and if it is absent (null) then the "default"
-     * geometry property of the feature should be used.  Geometry types other
-     * than inherently area types can be used.   If a line is used then the
-     * line string is closed for filling (only) by connecting its end point to
-     * its start point. The geometryPropertyName is the name of a geometry
-     * property in the Feature being styled.  Typically, features only have
-     * one geometry so, in general, the need to select one is not required.
-     * Note: this moves a little away from the SLD spec which provides an
-     * XPath reference to a Geometry object, but does follow it  in spirit.
-     *
-     * @param geometryPropertyName The name of the attribute in the feature
-     *        being styled  that should be used.  If null then the default
-     *        geometry should be used.
-     */
-    void setGeometryPropertyName(String geometryPropertyName);
     
     /**
      * PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons
Index: modules/library/api/src/main/java/org/geotools/styling/RasterSymbolizer.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/RasterSymbolizer.java	(revisione 34254)
+++ modules/library/api/src/main/java/org/geotools/styling/RasterSymbolizer.java	(copia locale)
@@ -121,17 +121,6 @@
  */
 public interface RasterSymbolizer extends org.opengis.style.RasterSymbolizer,Symbolizer {
     /**
-     * The interpretation of Geometry is system-dependent, as raster data may
-     * be organized differently from feature data, though omitting this
-     * element selects the default raster-data source.  Geometry-type
-     * transformations are also system-dependent and it is assumed that this
-     * capability will be little used.
-     *
-     * @param geometryPropertyName the name of the Geometry
-     */
-    void setGeometryPropertyName(String geometryPropertyName);
-
-    /**
      * sets the opacity for the coverage, it has the usual meaning.
      *
      * @param opacity An expression which evaluates to the the opacity (0-1)
Index: modules/library/api/src/main/java/org/geotools/styling/SpatialTransformationFunction.java
===================================================================
--- modules/library/api/src/main/java/org/geotools/styling/SpatialTransformationFunction.java	(revisione 0)
+++ modules/library/api/src/main/java/org/geotools/styling/SpatialTransformationFunction.java	(revisione 0)
@@ -0,0 +1,38 @@
+/*
+ *    GeoTools - The Open Source Java GIS Toolkit
+ *    http://geotools.org
+ * 
+ *    (C) 2002-2008, Open Source Geospatial Foundation (OSGeo)
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License as published by the Free Software Foundation;
+ *    version 2.1 of the License.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ */
+
+package org.geotools.styling;
+
+import org.geotools.geometry.jts.ReferencedEnvelope;
+import org.opengis.filter.expression.Function;
+
+/**
+ * A transformation function that can be used in SLD and can provide
+ * an inverse transformed envelope to the renderer
+ */
+public interface SpatialTransformationFunction extends Function {
+
+    /**
+     * Back transforms the rendering envelope into a envelope that
+     * can be used for data querying. For example, if the function
+     * is offsetting geometries, the inverse operation will inverse-offset
+     * the rendering envelope into one that can be used for data querying
+     * @param original
+     * @return the 
+     */
+    ReferencedEnvelope inverse(ReferencedEnvelope original);
+}
Index: modules/plugin/jdbc/jdbc-oracle/src/test/resources/org/geotools/data/oracle/db.properties
===================================================================
--- modules/plugin/jdbc/jdbc-oracle/src/test/resources/org/geotools/data/oracle/db.properties	(revisione 34254)
+++ modules/plugin/jdbc/jdbc-oracle/src/test/resources/org/geotools/data/oracle/db.properties	(copia locale)
@@ -1,4 +1,4 @@
 driver=oracle.jdbc.driver.OracleDriver
-url=jdbc:oracle:thin:@192.168.1.200:1521:xe
-username=spatial
+url=jdbc:oracle:thin:@localhost:1521:xe
+username=geoserver
 password=postgis
Index: modules/plugin/jdbc/jdbc-oracle/src/test/resources/org/geotools/data/oracle/ds.properties
===================================================================
--- modules/plugin/jdbc/jdbc-oracle/src/test/resources/org/geotools/data/oracle/ds.properties	(revisione 34254)
+++ modules/plugin/jdbc/jdbc-oracle/src/test/resources/org/geotools/data/oracle/ds.properties	(copia locale)
@@ -1,5 +1,5 @@
 type=javax.sql.DataSource
 driver=oracle.jdbc.driver.OracleDriver
 url=jdbc:oracle:thin:@localhost:1521:xe
-user=spatial
+user=geoserver
 password=postgis
Index: modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/db.properties
===================================================================
--- modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/db.properties	(revisione 34254)
+++ modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/db.properties	(copia locale)
@@ -1,6 +1,6 @@
 # DO NOT COMMIT CHANGES TO THIS FILE, THE REFERENCE HOST MUST BE LOCALHOST 
 # TO ENSURE A FAST TEST FAIL IN MACHINES THAT DO NOT HAVE POSTGIS SETUP
 driver=org.postgresql.Driver
-url=jdbc:postgresql://localhost/mydbname
-username=myuser
-password=mypassword
\ No newline at end of file
+url=jdbc:postgresql://localhost/gttest
+username=cite
+password=cite
\ No newline at end of file
Index: modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/ds.properties
===================================================================
--- modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/ds.properties	(revisione 34254)
+++ modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/ds.properties	(copia locale)
@@ -1,5 +1,5 @@
 type=javax.sql.DataSource
 driver=org.postgresql.Driver
-url=jdbc:postgresql://localhost/mydbname
-user=myuser
-password=mypassword
+url=jdbc:postgresql://localhost/gttest
+user=cite
+password=cite
Index: modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/factory.properties
===================================================================
--- modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/factory.properties	(revisione 34254)
+++ modules/plugin/jdbc/jdbc-postgis/src/test/resources/org/geotools/data/postgis/factory.properties	(copia locale)
@@ -2,7 +2,7 @@
 # TO ENSURE A FAST TEST FAIL IN MACHINES THAT DO NOT HAVE POSTGIS SETUP
 driver=org.postgresql.Driver
 host=localhost
-database=database
+database=gttest
 port=5432
-user=username
-passwd=password
\ No newline at end of file
+user=cite
+passwd=cite
\ No newline at end of file
Index: spike/geometry/src/main/java/org/osgeo/geometry/primitive/Ring.java
===================================================================
--- spike/geometry/src/main/java/org/osgeo/geometry/primitive/Ring.java	(revisione 34254)
+++ spike/geometry/src/main/java/org/osgeo/geometry/primitive/Ring.java	(copia locale)
@@ -26,9 +26,9 @@
  * </p>
  *
  * @author <a href="mailto:schneider@lat-lon.de">Markus Schneider </a>
- * @author last edited by: $Author:$
+ * @author last edited by: $Author$
  *
- * @version $Revision:$, $Date:$
+ * @version $Revision$, $Date$
  */
 public interface Ring extends Curve {
 
Index: spike/geometry/src/main/java/org/osgeo/geometry/primitive/GeometricPrimitive.java
===================================================================
--- spike/geometry/src/main/java/org/osgeo/geometry/primitive/GeometricPrimitive.java	(revisione 34254)
+++ spike/geometry/src/main/java/org/osgeo/geometry/primitive/GeometricPrimitive.java	(copia locale)
@@ -32,9 +32,9 @@
  * </p>
  *
  * @author <a href="mailto:schneider@lat-lon.de">Markus Schneider </a>
- * @author last edited by: $Author:$
+ * @author last edited by: $Author$
  *
- * @version $Revision:$, $Date:$
+ * @version $Revision$, $Date$
  */
 public interface GeometricPrimitive extends Geometry {
 
Index: spike/geometry/src/main/java/org/osgeo/geometry/primitive/LineString.java
===================================================================
--- spike/geometry/src/main/java/org/osgeo/geometry/primitive/LineString.java	(revisione 34254)
+++ spike/geometry/src/main/java/org/osgeo/geometry/primitive/LineString.java	(copia locale)
@@ -22,9 +22,9 @@
  * control points.
  *
  * @author <a href="mailto:schneider@lat-lon.de">Markus Schneider </a>
- * @author last edited by: $Author:$
+ * @author last edited by: $Author$
  *
- * @version $Revision:$, $Date:$
+ * @version $Revision$, $Date$
  */
 public interface LineString extends Curve {
 
Index: spike/geometry/src/main/java/org/osgeo/geometry/primitive/OrientableCurve.java
===================================================================
--- spike/geometry/src/main/java/org/osgeo/geometry/primitive/OrientableCurve.java	(revisione 34254)
+++ spike/geometry/src/main/java/org/osgeo/geometry/primitive/OrientableCurve.java	(copia locale)
@@ -25,9 +25,9 @@
  * that reverses the sense of the curve traversal.
  *
  * @author <a href="mailto:schneider@lat-lon.de">Markus Schneider </a>
- * @author last edited by: $Author:$
+ * @author last edited by: $Author$
  *
- * @version $Revision:$, $Date:$
+ * @version $Revision$, $Date$
  */
 public interface OrientableCurve extends Curve {
 
Index: spike/geometry/src/main/java/org/osgeo/geometry/primitive/LinearRing.java
===================================================================
--- spike/geometry/src/main/java/org/osgeo/geometry/primitive/LinearRing.java	(revisione 34254)
+++ spike/geometry/src/main/java/org/osgeo/geometry/primitive/LinearRing.java	(copia locale)
@@ -21,9 +21,9 @@
  * TODO add documentation here
  *
  * @author <a href="mailto:schneider@lat-lon.de">Markus Schneider </a>
- * @author last edited by: $Author:$
+ * @author last edited by: $Author$
  *
- * @version $Revision:$, $Date:$
+ * @version $Revision$, $Date$
  */
 public interface LinearRing extends Ring {
 
