Justin Deoliveira ha scritto:
> Can you be more specific about what exactly kind of api has to change? I 
> think any additions are fine sicne I can't really see those interfaces 
> being implemented by client code. But any other changes would seem 
> strange after 2.6.0 has already been released.

It boils down to three changes:
- an override of the getGeometryPropertyName() in the GeoTools
   Symbolizer interface that explains it is actually a shortcut
   for the more general getGeometry() method (so, the override
   is there just for javadoc sake)
- the setGeometryPropertyName() that was defined in all sub-interfaces
   of gt2 Symbolizer was pushed up to Symbolizer
- two new methods, getGeometry() and setGeometry() have been added
   to allow dealing with a generic Expression instead of a String:

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);
+
  }


Hope this helps

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to