svn - r34216 - in branches/geometry/spike/geometry: . src/main/java/org src/main/java/org/deegree src/main/java/org/deegree/commons src/main/java/org/deegree/commons/uom src/main/java/org/deegree/commons/utils src/main/java/org/deegree/geometry src/main/java/org/deegree/geometry/standard src/main/java/org/deegree/geometry/standard/composite src/main/java/org/deegree/geometry/standard/curvesegments src/main/java/org/deegree/geometry/standard/multi src/main/java/org/deegree/geometry/standard/points src/main/java/org/deegree/geometry/standard/primitive src/main/java/org/deegree/geometry/standard/surfacepatches src/main/java/org/osgeo/geometry src/main/java/org/osgeo/geometry/primitive

1 message Options
Embed this post
Permalink
svn_geotools

svn - r34216 - in branches/geometry/spike/geometry: . src/main/java/org src/main/java/org/deegree src/main/java/org/deegree/commons src/main/java/org/deegree/commons/uom src/main/java/org/deegree/commons/utils src/main/java/org/deegree/geometry src/main/java/org/deegree/geometry/standard src/main/java/org/deegree/geometry/standard/composite src/main/java/org/deegree/geometry/standard/curvesegments src/main/java/org/deegree/geometry/standard/multi src/main/java/org/deegree/geometry/standard/points src/main/java/org/deegree/geometry/standard/primitive src/main/java/org/deegree/geometry/standard/surfacepatches src/main/java/org/osgeo/geometry src/main/java/org/osgeo/geometry/primitive

Reply Threaded More More options
Print post
Permalink
Author: aaime
Date: 2009-10-24 22:31:25 -0400 (Sat, 24 Oct 2009)
New Revision: 34216

Added:
   branches/geometry/spike/geometry/src/main/java/org/deegree/
   branches/geometry/spike/geometry/src/main/java/org/deegree/commons/
   branches/geometry/spike/geometry/src/main/java/org/deegree/commons/uom/
   branches/geometry/spike/geometry/src/main/java/org/deegree/commons/uom/DefaultMeasure.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/commons/utils/
   branches/geometry/spike/geometry/src/main/java/org/deegree/commons/utils/Pair.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/AbstractDefaultGeometry.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/DefaultEnvelope.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/JTSGeometryPair.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeCurve.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeGeometry.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSolid.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSurface.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArc.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByBulge.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByCenterPoint.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcString.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcStringByBulge.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBSpline.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBezier.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircle.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircleByCenterPoint.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultClothoid.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCubicSpline.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesic.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesicString.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultLineStringSegment.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultOffsetCurve.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiCurve.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiGeometry.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiLineString.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPoint.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPolygon.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSolid.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSurface.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/JTSPoints.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PackedPoints.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsArray.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsList.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsPoints.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultCurve.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLineString.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLinearRing.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableCurve.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableSurface.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPoint.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolygon.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolyhedralSurface.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultRing.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSolid.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSurface.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTin.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTriangulatedSurface.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCone.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCylinder.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultGriddedSurfacePatch.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultPolygonPatch.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultRectangle.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultSphere.java
   branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultTriangle.java
Modified:
   branches/geometry/spike/geometry/pom.xml
   branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/Geometry.java
   branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/SimpleGeometryBuilder.java
   branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Curve.java
   branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Surface.java
Log:
Rough verison of a compiling implementation grabbed from Deegree

Modified: branches/geometry/spike/geometry/pom.xml
===================================================================
--- branches/geometry/spike/geometry/pom.xml 2009-10-25 02:29:14 UTC (rev 34215)
+++ branches/geometry/spike/geometry/pom.xml 2009-10-25 02:31:25 UTC (rev 34216)
@@ -16,6 +16,16 @@
 
   <dependencies>
     <dependency>
+      <groupId>com.vividsolutions</groupId>
+      <artifactId>jts</artifactId>
+      <version>1.10</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <version>1.5.8</version>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>3.8.1</version>

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/commons/uom/DefaultMeasure.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/commons/uom/DefaultMeasure.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/commons/uom/DefaultMeasure.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,106 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/deegree3/commons/trunk/src/org/deegree/model/feature/Feature.java $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.commons.uom;
+
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+
+/**
+ * Number with a scale.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMeasure implements Measure {
+
+    private double value;
+
+    private String uomURI;
+
+    //angular degree --> urn:ogc:def:uom:EPSG:6.3:9102
+    //radian --> urn:ogc:def:uom:EPSG::9101
+    //meter --> urn:ogc:def:uom:EPSG:6.3:9001
+    //unity --> urn:ogc:def:uom:EPSG:6.3:8805
+    // from URN definitions
+    public DefaultMeasure( double value, String uomURI ) {
+        this.value = value;
+        this.uomURI = uomURI;
+    }
+    
+    public DefaultMeasure( double value, Unit units ) {
+        this.value = value;
+        this.uomURI = uomURI;
+    }
+
+    public DefaultMeasure( String text, String distanceUnits ) {
+        this.value = Double.parseDouble( text );
+        this.uomURI = distanceUnits;
+    }
+
+    public double getValue() {
+        return value;
+    }
+
+    public double getValueAsDouble() {
+        return value;
+    }    
+    
+    public String getUomUri() {
+        return uomURI;
+    }
+
+    public boolean equals( Object obj ) {
+        if ( !( obj instanceof DefaultMeasure ) ) {
+            return false;
+        }
+        DefaultMeasure m = (DefaultMeasure) obj;
+        if ( value == m.value ) {
+            if ( uomURI != null ) {
+                return uomURI.equals( m.uomURI );
+            } else {
+                return m.uomURI == null;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return value + ( uomURI == null ? "" : " " + uomURI );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/commons/utils/Pair.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/commons/utils/Pair.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/commons/utils/Pair.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,100 @@
+//$HeadURL: http://svn.wald.intevation.org/svn/deegree/deegree3/core/trunk/src/org/deegree/commons/utils/Pair.java $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+
+package org.deegree.commons.utils;
+
+/**
+ * <code>Pair</code> is a convenience class, which pairs two objects. For a pair of <code>String</code>s see
+ * {@link StringPair}.
+ *
+ * @author <a href="mailto:[hidden email]">Rutger Bezema</a>
+ * @author last edited by: $Author: mschneider $
+ *
+ * @version $Revision: 18171 $, $Date: 2009-06-18 00:00:07 +1000 (gio, 18 giu 2009) $
+ *
+ * @param <T>
+ *            the first Object of the pair
+ * @param <U>
+ *            the second Object of the pair
+ *
+ */
+public class Pair<T, U> {
+    /**
+     * first value of the pair.
+     */
+    public T first;
+
+    /**
+     * second value of the pair.
+     */
+    public U second;
+
+    /**
+     * @param first
+     *            value of the pair.
+     * @param second
+     *            value of the pair.
+     */
+    public Pair( T first, U second ) {
+        this.first = first;
+        this.second = second;
+    }
+
+    /**
+     * Create a pair with null objects.
+     */
+    public Pair() {
+        // nothing to do here
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public boolean equals( Object other ) {
+        if ( other != null && other instanceof Pair ) {
+            // what ever, unchecked.
+            final Pair that = (Pair) other;
+            return ( first == null ? that.first == null : first.equals( that.first ) )
+                   && ( second == null ? that.second == null : second.equals( that.second ) );
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return "<" + first + ", " + second + ">";
+    }
+
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/AbstractDefaultGeometry.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/AbstractDefaultGeometry.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/AbstractDefaultGeometry.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,386 @@
+//$HeadURL: http://svn.wald.intevation.org/svn/deegree/deegree3/core/trunk/src/org/deegree/geometry/standard/AbstractDefaultGeometry.java $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.multi.DefaultMultiGeometry;
+import org.deegree.geometry.standard.multi.DefaultMultiLineString;
+import org.deegree.geometry.standard.multi.DefaultMultiPoint;
+import org.deegree.geometry.standard.multi.DefaultMultiPolygon;
+import org.deegree.geometry.standard.points.JTSPoints;
+import org.deegree.geometry.standard.primitive.DefaultLineString;
+import org.deegree.geometry.standard.primitive.DefaultLinearRing;
+import org.deegree.geometry.standard.primitive.DefaultPoint;
+import org.deegree.geometry.standard.primitive.DefaultPolygon;
+import org.osgeo.commons.ObjectProperties;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.Envelope;
+import org.osgeo.geometry.Geometry;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Curve;
+import org.osgeo.geometry.primitive.LineString;
+import org.osgeo.geometry.primitive.LinearRing;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.Polygon;
+import org.osgeo.geometry.primitive.Ring;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vividsolutions.jts.geom.CoordinateSequence;
+
+/**
+ * Abstract base class for the default {@link Geometry} implementation.
+ * <p>
+ * This implementation is built around <a href="http://tsusiatsoftware.net/jts/main.html">JTS (Java Topology Suite)</a>
+ * geometries which are used to evaluate topological predicates (e.g. intersects) and perform spatial analysis
+ * operations (e.g union). Simple geometries (e.g. {@link LineString}s are mapped to a corresponding JTS object, for
+ * complex ones (e.g. {@link Curve}s with non-linear segments), the JTS geometry only approximates the original
+ * geometry. See <a href="https://wiki.deegree.org/deegreeWiki/deegree3/MappingComplexGeometries">this page</a> for a
+ * discussion.
+ * </p>
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author: mschneider $
+ *
+ * @version $Revision: 20355 $, $Date: 2009-10-24 03:02:11 +1100 (sab, 24 ott 2009) $
+ */
+public abstract class AbstractDefaultGeometry implements Geometry {
+
+    private static final Logger LOG = LoggerFactory.getLogger( AbstractDefaultGeometry.class );
+
+    /**
+     * Used to built JTS geometries.
+     */
+    protected final static com.vividsolutions.jts.geom.GeometryFactory jtsFactory = new com.vividsolutions.jts.geom.GeometryFactory();
+
+    /** Geometry identifier. */
+    protected String id;
+
+    /** Reference to a coordinate system. */
+    protected CRS crs;
+
+    protected PrecisionModel pm;
+
+    // contains an equivalent (or best-fit) JTS geometry object
+    protected com.vividsolutions.jts.geom.Geometry jtsGeometry;
+    
+    /**
+     * @param id
+     * @param crs
+     * @param pm
+     */
+    public AbstractDefaultGeometry( String id, CRS crs, PrecisionModel pm ) {
+        this.id = id;
+        this.crs = crs;
+        this.pm = pm;
+    }
+
+    
+    public String getId() {
+        return id;
+    }
+
+    
+    public void setId( String id ) {
+        this.id = id;
+    }
+
+    
+    public CRS getCoordinateSystem() {
+        return crs;
+    }
+
+    
+    public void setCoordinateSystem( CRS crs ) {
+        this.crs = crs;
+    }
+
+    
+    public PrecisionModel getPrecision() {
+        return pm;
+    }
+
+    
+    public void setPrecision( PrecisionModel pm ) {
+        this.pm = pm;
+    }
+
+    
+    public boolean intersects( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.intersects( jtsGeoms.second );
+    }
+
+    
+    public boolean isDisjoint( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.disjoint( jtsGeoms.second );
+    }
+
+    
+    public boolean overlaps( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.overlaps( jtsGeoms.second );
+    }
+
+    
+    public boolean touches( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.touches( jtsGeoms.second );
+    }
+
+    
+    public boolean isWithin( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.within( jtsGeoms.second );
+    }
+
+    
+    public boolean isWithinDistance( Geometry geometry, Measure distance ) {
+        LOG.warn( "TODO: Respect UOM in evaluation of topological predicate." );
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.isWithinDistance( jtsGeoms.second, distance.getValueAsDouble() );
+    }
+
+    
+    public boolean isBeyond( Geometry geometry, Measure distance ) {
+        return !isWithinDistance( geometry, distance );
+    }
+
+    
+    public boolean contains( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.contains( jtsGeoms.second );
+    }
+
+    
+    public boolean crosses( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.crosses( jtsGeoms.second );
+    }
+
+    
+    public boolean equals( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        return jtsGeoms.first.equals( jtsGeoms.second );
+    }
+
+    
+    public Point getCentroid() {
+        return (Point) createFromJTS( getJTSGeometry().getCentroid() );
+    }
+
+    
+    public Measure getDistance( Geometry geometry, Unit requestedUnit ) {
+        // TODO respect unit
+        double dist = getJTSGeometry().distance( getAsDefaultGeometry( geometry ).getJTSGeometry() );
+        return new DefaultMeasure( Double.toString( dist ), null );
+    }
+
+    
+    public Geometry getIntersection( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        com.vividsolutions.jts.geom.Geometry jtsGeom = jtsGeoms.first.intersection( jtsGeoms.second );
+        return createFromJTS( jtsGeom );
+    }
+
+    
+    public Geometry getUnion( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        com.vividsolutions.jts.geom.Geometry jtsGeom = jtsGeoms.first.union( jtsGeoms.second );
+        return createFromJTS( jtsGeom );
+    }
+
+    
+    public Geometry getDifference( Geometry geometry ) {
+        JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
+        com.vividsolutions.jts.geom.Geometry jtsGeom = jtsGeoms.first.difference( jtsGeoms.second );
+        return createFromJTS( jtsGeom );
+    }
+
+    
+    public Geometry getBuffer( Measure distance ) {
+        // TODO get double in CRS units
+        double crsDistance = distance.getValueAsDouble();
+        com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry().buffer( crsDistance );
+        return createFromJTS( jtsGeom );
+    }
+
+    
+    public Geometry getConvexHull() {
+        com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry().convexHull();
+        return createFromJTS( jtsGeom );
+    }
+
+    
+    public Envelope getEnvelope() {
+        // TODO consider 3D geometries
+        com.vividsolutions.jts.geom.Envelope jtsEnvelope = getJTSGeometry().getEnvelopeInternal();
+        Point min = new DefaultPoint( null, crs, pm, new double[] { jtsEnvelope.getMinX(), jtsEnvelope.getMinY() } );
+        Point max = new DefaultPoint( null, crs, pm, new double[] { jtsEnvelope.getMaxX(), jtsEnvelope.getMaxY() } );
+        return new DefaultEnvelope( null, crs, pm, min, max );
+    }
+
+    /**
+     * Returns an equivalent (or best-fit) JTS geometry object.
+     *
+     * @return an equivalent (or best-fit) JTS geometry
+     */
+    public com.vividsolutions.jts.geom.Geometry getJTSGeometry() {
+        if ( jtsGeometry == null ) {
+            jtsGeometry = buildJTSGeometry();
+        }
+        return jtsGeometry;
+    }
+
+    protected com.vividsolutions.jts.geom.Geometry buildJTSGeometry() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public ObjectProperties getAttachedProperties() {
+        return null;
+    }
+
+    
+    public void setAttachedProperties( ObjectProperties standardProps ) {
+        // empty on purpose
+    }
+
+    /**
+     * Helper methods for creating {@link AbstractDefaultGeometry} from JTS geometries that have been derived from this
+     * geometry by JTS spatial analysis methods.
+     *
+     * @param jtsGeom
+     * @return geometry with precision model and CRS information that are identical to the ones of this geometry, or
+     *         null if the given geometry is an empty collection
+     */
+    @SuppressWarnings("unchecked")
+    protected AbstractDefaultGeometry createFromJTS( com.vividsolutions.jts.geom.Geometry jtsGeom ) {
+
+        AbstractDefaultGeometry geom = null;
+        if ( jtsGeom instanceof com.vividsolutions.jts.geom.Point ) {
+            com.vividsolutions.jts.geom.Point jtsPoint = (com.vividsolutions.jts.geom.Point) jtsGeom;
+            geom = new DefaultPoint( null, crs, pm, new double[] { jtsPoint.getX(), jtsPoint.getY() } );
+        } else if ( jtsGeom instanceof com.vividsolutions.jts.geom.LinearRing ) {
+            com.vividsolutions.jts.geom.LinearRing jtsLinearRing = (com.vividsolutions.jts.geom.LinearRing) jtsGeom;
+            geom = new DefaultLinearRing( null, crs, pm, getAsPoints( jtsLinearRing.getCoordinateSequence() ) );
+        } else if ( jtsGeom instanceof com.vividsolutions.jts.geom.LineString ) {
+            com.vividsolutions.jts.geom.LineString jtsLineString = (com.vividsolutions.jts.geom.LineString) jtsGeom;
+            geom = new DefaultLineString( null, crs, pm, getAsPoints( jtsLineString.getCoordinateSequence() ) );
+        } else if ( jtsGeom instanceof com.vividsolutions.jts.geom.Polygon ) {
+            com.vividsolutions.jts.geom.Polygon jtsPolygon = (com.vividsolutions.jts.geom.Polygon) jtsGeom;
+            Points exteriorPoints = getAsPoints( jtsPolygon.getExteriorRing().getCoordinateSequence() );
+            LinearRing exteriorRing = new DefaultLinearRing( null, crs, pm, exteriorPoints );
+            List<Ring> interiorRings = new ArrayList<Ring>( jtsPolygon.getNumInteriorRing() );
+            for ( int i = 0; i < interiorRings.size(); i++ ) {
+                Points interiorPoints = getAsPoints( jtsPolygon.getInteriorRingN( i ).getCoordinateSequence() );
+                interiorRings.add( new DefaultLinearRing( null, crs, pm, interiorPoints ) );
+            }
+            geom = new DefaultPolygon( null, crs, pm, exteriorRing, interiorRings );
+        } else if ( jtsGeom instanceof com.vividsolutions.jts.geom.MultiPoint ) {
+            com.vividsolutions.jts.geom.MultiPoint jtsMultiPoint = (com.vividsolutions.jts.geom.MultiPoint) jtsGeom;
+            if ( jtsMultiPoint.getNumGeometries() > 0 ) {
+                List<Point> members = new ArrayList<Point>( jtsMultiPoint.getNumGeometries() );
+                for ( int i = 0; i < jtsMultiPoint.getNumGeometries(); i++ ) {
+                    members.add( (Point) createFromJTS( jtsMultiPoint.getGeometryN( i ) ) );
+                }
+                geom = new DefaultMultiPoint( id, crs, pm, members );
+            }
+        } else if ( jtsGeom instanceof com.vividsolutions.jts.geom.MultiLineString ) {
+            com.vividsolutions.jts.geom.MultiLineString jtsMultiLineString = (com.vividsolutions.jts.geom.MultiLineString) jtsGeom;
+            if ( jtsMultiLineString.getNumGeometries() > 0 ) {
+                List<LineString> members = new ArrayList<LineString>( jtsMultiLineString.getNumGeometries() );
+                for ( int i = 0; i < jtsMultiLineString.getNumGeometries(); i++ ) {
+                    members.add( (LineString) createFromJTS( jtsMultiLineString.getGeometryN( i ) ) );
+                }
+                geom = new DefaultMultiLineString( id, crs, pm, members );
+            }
+        } else if ( jtsGeom instanceof com.vividsolutions.jts.geom.MultiPolygon ) {
+            com.vividsolutions.jts.geom.MultiPolygon jtsMultiPolygon = (com.vividsolutions.jts.geom.MultiPolygon) jtsGeom;
+            if ( jtsMultiPolygon.getNumGeometries() > 0 ) {
+                List<Polygon> members = new ArrayList<Polygon>( jtsMultiPolygon.getNumGeometries() );
+                for ( int i = 0; i < jtsMultiPolygon.getNumGeometries(); i++ ) {
+                    members.add( (Polygon) createFromJTS( jtsMultiPolygon.getGeometryN( i ) ) );
+                }
+                geom = new DefaultMultiPolygon( id, crs, pm, members );
+            }
+        } else if ( jtsGeom instanceof com.vividsolutions.jts.geom.GeometryCollection ) {
+            com.vividsolutions.jts.geom.GeometryCollection jtsGeometryCollection = (com.vividsolutions.jts.geom.GeometryCollection) jtsGeom;
+            if ( jtsGeometryCollection.getNumGeometries() > 0 ) {
+                List<Geometry> members = new ArrayList<Geometry>( jtsGeometryCollection.getNumGeometries() );
+                for ( int i = 0; i < jtsGeometryCollection.getNumGeometries(); i++ ) {
+                    members.add( createFromJTS( jtsGeometryCollection.getGeometryN( i ) ) );
+                }
+                geom = new DefaultMultiGeometry( id, crs, pm, members );
+            }
+        } else {
+            throw new RuntimeException( "Internal error. Encountered unhandled JTS geometry type '"
+                                        + jtsGeom.getClass().getName() + "'." );
+        }
+        return geom;
+    }
+
+    protected static AbstractDefaultGeometry getAsDefaultGeometry( Geometry geometry ) {
+        if ( geometry instanceof AbstractDefaultGeometry ) {
+            return (AbstractDefaultGeometry) geometry;
+        }
+//        if ( geometry instanceof GeometryReference<?> ) {
+//            Geometry refGeometry = ( (GeometryReference<?>) geometry ).getReferencedGeometry();
+//            if ( refGeometry instanceof AbstractDefaultGeometry ) {
+//                return (AbstractDefaultGeometry) refGeometry;
+//            }
+//        }
+        throw new RuntimeException( "Cannot convert Geometry to AbstractDefaultGeometry." );
+    }
+
+    private Points getAsPoints( CoordinateSequence seq ) {
+        return new JTSPoints( seq );
+    }
+    
+    protected CoordinateSequence toCoordinateSequence(Points points) {
+        if(points instanceof CoordinateSequence)
+            return (CoordinateSequence) points;
+        
+        throw new UnsupportedOperationException("Sorry, atm we cannot convert a Points into a CoordinateSequence");
+    }
+}
\ No newline at end of file

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/DefaultEnvelope.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/DefaultEnvelope.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/DefaultEnvelope.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,178 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/deegree3/commons/trunk/src/org/deegree/rendering/Java2DRenderer.java $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard;
+
+import org.deegree.geometry.standard.points.PackedPoints;
+import org.deegree.geometry.standard.primitive.DefaultPoint;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.Envelope;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.LinearRing;
+import org.osgeo.geometry.primitive.Point;
+
+
+/**
+ * Default implementation of {@link Envelope}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultEnvelope extends AbstractDefaultGeometry implements Envelope {
+
+    private Point max;
+
+    private Point min;
+
+    private Point centroid;
+
+    /**
+     * Creates a new <code>DefaultEnvelope</code> instance with no id, crs and precisionmodel.
+     *
+     * @param min
+     * @param max
+     */
+    public DefaultEnvelope( Point min, Point max ) {
+        this( null, null, null, min, max );
+    }
+
+    /**
+     * Creates a new <code>DefaultEnvelope</code> instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param min
+     * @param max
+     */
+    public DefaultEnvelope( String id, CRS crs, PrecisionModel pm, Point min, Point max ) {
+        super( id, crs, pm );
+        this.min = min;
+        this.max = max;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return min.getCoordinateDimension();
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.ENVELOPE;
+    }
+
+    
+    public Point getMax() {
+        return max;
+    }
+
+    
+    public Point getMin() {
+        return min;
+    }
+
+    
+    public double getSpan0() {
+        return max.get0() - min.get0();
+    }
+
+    
+    public double getSpan1() {
+        return max.get1() - min.get1();
+    }
+
+    
+    public double getSpan( int dim ) {
+        return max.get( dim ) - min.get( dim );
+    }
+
+    
+    public Envelope merge( Envelope other ) {
+        int coordinateDimension = getCoordinateDimension();
+        double[] min = new double[coordinateDimension];
+        double[] max = new double[coordinateDimension];
+        for ( int i = 0; i < coordinateDimension; i++ ) {
+            if ( this.min.getAsArray()[i] < other.getMin().getAsArray()[i] ) {
+                min[i] = this.min.getAsArray()[i];
+            } else {
+                min[i] = other.getMin().getAsArray()[i];
+            }
+            if ( this.max.getAsArray()[i] > other.getMax().getAsArray()[i] ) {
+                max[i] = this.max.getAsArray()[i];
+            } else {
+                max[i] = other.getMax().getAsArray()[i];
+            }
+        }
+        Point newMin = new DefaultPoint( null, getCoordinateSystem(), pm, min );
+        Point newMax = new DefaultPoint( null, getCoordinateSystem(), pm, max );
+        return new DefaultEnvelope( null, getCoordinateSystem(), pm, newMin, newMax );
+    }
+
+    
+    public Envelope getEnvelope() {
+        return this;
+    }
+
+    
+    public Point getCentroid() {
+        if ( centroid == null ) {
+            double[] coordinates = new double[max.getAsArray().length];
+            for ( int i = 0; i < coordinates.length; i++ ) {
+                coordinates[i] = min.getAsArray()[i] + ( max.getAsArray()[i] - min.getAsArray()[i] ) / 2d;
+            }
+            centroid = new DefaultPoint( null, getCoordinateSystem(), getPrecision(), coordinates );
+        }
+        return centroid;
+    }
+
+    
+    protected com.vividsolutions.jts.geom.Polygon buildJTSGeometry() {
+        Points points = new PackedPoints( new double[] { min.get0(), min.get1(), max.get0(), min.get1(), max.get0(),
+                                                        max.get1(), min.get0(), max.get1(), min.get0(), min.get1() }, 2 );
+        com.vividsolutions.jts.geom.LinearRing shell = jtsFactory.createLinearRing(toCoordinateSequence( points ) );
+        return jtsFactory.createPolygon( shell, null );
+    }
+
+    
+    public String toString() {
+        return "min: " + min + ", max: " + max + ", crs: " + crs;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/JTSGeometryPair.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/JTSGeometryPair.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/JTSGeometryPair.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,72 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/deegree3/commons/trunk/src/org/deegree/rendering/Java2DRenderer.java $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard;
+
+import org.deegree.commons.utils.Pair;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+
+/**
+ * Stores a pair of JTS geometries.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author: schneider $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class JTSGeometryPair extends Pair<Geometry, Geometry> {
+
+    private JTSGeometryPair( Geometry first, Geometry second ) {
+        super( first, second );
+    }
+
+    /**
+     * Creates a "compatible" pair of JTS geometries from an {@link AbstractDefaultGeometry} and a second
+     * {@link Geometry} instance.
+     *
+     * @param geom1
+     * @param geom2
+     * @return
+     */
+    public static JTSGeometryPair createCompatiblePair( AbstractDefaultGeometry geom1,
+                                                        org.osgeo.geometry.Geometry geom2 ) {
+        return new JTSGeometryPair( geom1.getJTSGeometry(),
+                                    AbstractDefaultGeometry.getAsDefaultGeometry( geom2 ).getJTSGeometry() );
+    }
+
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeCurve.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeCurve.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeCurve.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,265 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.composite;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.deegree.commons.utils.Pair;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.deegree.geometry.standard.points.PointsPoints;
+import org.deegree.geometry.standard.primitive.DefaultLineString;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.composite.CompositeCurve;
+import org.osgeo.geometry.multi.MultiLineString;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Curve;
+import org.osgeo.geometry.primitive.LineString;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.CurveSegment;
+
+/**
+ * Default implementation of {@link CompositeCurve}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCompositeCurve extends AbstractDefaultGeometry implements CompositeCurve {
+
+    private List<Curve> memberCurves;
+
+    /**
+     * Creates a new {@link DefaultCompositeCurve} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param memberCurves
+     *            curves that constitute the composited curve, each curve must end at the start point of the subsequent
+     *            curve in the list
+     */
+    public DefaultCompositeCurve( String id, CRS crs, PrecisionModel pm, List<Curve> memberCurves ) {
+        super( id, crs, pm );
+        this.memberCurves = memberCurves;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Curve;
+    }
+
+    
+    public CurveType getCurveType() {
+        return CurveType.CompositeCurve;
+    }
+
+    
+    public Pair<Point, Point> getBoundary() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<CurveSegment> getCurveSegments() {
+        List<CurveSegment> allSegments = new LinkedList<CurveSegment>();
+        for ( Curve member : memberCurves ) {
+            allSegments.addAll( member.getCurveSegments() );
+        }
+        return allSegments;
+    }
+
+    
+    public Point getStartPoint() {
+        return memberCurves.get( 0 ).getStartPoint();
+    }
+
+    
+    public Point getEndPoint() {
+        return memberCurves.get( memberCurves.size() - 1 ).getEndPoint();
+    }
+
+    
+    public Measure getLength( Unit requestedUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public boolean isClosed() {
+        return getStartPoint().equals( getEndPoint() );
+    }
+
+    
+    public int getCoordinateDimension() {
+        return memberCurves.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    protected com.vividsolutions.jts.geom.MultiLineString buildJTSGeometry() {
+        com.vividsolutions.jts.geom.LineString [] jtsMembers = new com.vividsolutions.jts.geom.LineString[size()];
+        int i = 0;
+        for ( Curve geometry : memberCurves ) {
+            jtsMembers[i++] = (com.vividsolutions.jts.geom.LineString) getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createMultiLineString( jtsMembers );
+    }    
+    
+    // -----------------------------------------------------------------------
+    // delegate methods for List<Curve>
+    // -----------------------------------------------------------------------
+
+    public boolean add( Curve e ) {
+        return memberCurves.add( e );
+    }
+
+    public void add( int index, Curve element ) {
+        memberCurves.add( index, element );
+    }
+
+    public boolean addAll( Collection<? extends Curve> c ) {
+        return memberCurves.addAll( c );
+    }
+
+    public boolean addAll( int index, Collection<? extends Curve> c ) {
+        return memberCurves.addAll( index, c );
+    }
+
+    public void clear() {
+        memberCurves.clear();
+    }
+
+    public boolean contains( Object o ) {
+        return memberCurves.contains( o );
+    }
+
+    public boolean containsAll( Collection<?> c ) {
+        return memberCurves.containsAll( c );
+    }
+
+    public Curve get( int index ) {
+        return memberCurves.get( index );
+    }
+
+    public int indexOf( Object o ) {
+        return memberCurves.indexOf( o );
+    }
+
+    public boolean isEmpty() {
+        return memberCurves.isEmpty();
+    }
+
+    public Iterator<Curve> iterator() {
+        return memberCurves.iterator();
+    }
+
+    public int lastIndexOf( Object o ) {
+        return memberCurves.lastIndexOf( o );
+    }
+
+    public ListIterator<Curve> listIterator() {
+        return memberCurves.listIterator();
+    }
+
+    public ListIterator<Curve> listIterator( int index ) {
+        return memberCurves.listIterator( index );
+    }
+
+    public Curve remove( int index ) {
+        return memberCurves.remove( index );
+    }
+
+    public boolean remove( Object o ) {
+        return memberCurves.remove( o );
+    }
+
+    public boolean removeAll( Collection<?> c ) {
+        return memberCurves.removeAll( c );
+    }
+
+    public boolean retainAll( Collection<?> c ) {
+        return memberCurves.retainAll( c );
+    }
+
+    public Curve set( int index, Curve element ) {
+        return memberCurves.set( index, element );
+    }
+
+    public int size() {
+        return memberCurves.size();
+    }
+
+    public List<Curve> subList( int fromIndex, int toIndex ) {
+        return memberCurves.subList( fromIndex, toIndex );
+    }
+
+    public Object[] toArray() {
+        return memberCurves.toArray();
+    }
+
+    public <T> T[] toArray( T[] a ) {
+        return memberCurves.toArray( a );
+    }
+
+    
+    public LineString getAsLineString() {
+        return new DefaultLineString( id, crs, pm, getControlPoints() );
+    }
+
+    
+    public Points getControlPoints() {
+        List<Points> pointsList = new ArrayList<Points>( memberCurves.size() );
+        for ( Curve curve : memberCurves ) {
+            pointsList.add( curve.getControlPoints() );
+        }
+        return new PointsPoints( pointsList );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeGeometry.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeGeometry.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeGeometry.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,191 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.composite;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.Geometry;
+import org.osgeo.geometry.composite.CompositeGeometry;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.GeometricPrimitive;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+
+import com.vividsolutions.jts.geom.GeometryCollection;
+
+/**
+ * Default implementation of {@link CompositeGeometry}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCompositeGeometry extends AbstractDefaultGeometry implements CompositeGeometry<GeometricPrimitive> {
+
+    private List<GeometricPrimitive> memberPrimitives;
+
+    /**
+     * Creates a new {@link DefaultCompositeGeometry} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param memberPrimitives
+     */
+    public DefaultCompositeGeometry( String id, CRS crs, PrecisionModel pm, List<GeometricPrimitive> memberPrimitives ) {
+        super( id, crs, pm );
+        this.memberPrimitives = memberPrimitives;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return memberPrimitives.get( 0 ).getCoordinateDimension();
+    }  
+
+    public boolean add( GeometricPrimitive e ) {
+        return memberPrimitives.add( e );
+    }
+
+    public void add( int index, GeometricPrimitive element ) {
+        memberPrimitives.add( index, element );
+    }
+
+    public boolean addAll( Collection<? extends GeometricPrimitive> c ) {
+        return memberPrimitives.addAll( c );
+    }
+
+    public boolean addAll( int index, Collection<? extends GeometricPrimitive> c ) {
+        return memberPrimitives.addAll( index, c );
+    }
+
+    public void clear() {
+        memberPrimitives.clear();
+    }
+
+    public boolean contains( Object o ) {
+        return memberPrimitives.contains( o );
+    }
+
+    public boolean containsAll( Collection<?> c ) {
+        return memberPrimitives.containsAll( c );
+    }
+
+    public GeometricPrimitive get( int index ) {
+        return memberPrimitives.get( index );
+    }
+
+    public int indexOf( Object o ) {
+        return memberPrimitives.indexOf( o );
+    }
+
+    public boolean isEmpty() {
+        return memberPrimitives.isEmpty();
+    }
+
+    public Iterator<GeometricPrimitive> iterator() {
+        return memberPrimitives.iterator();
+    }
+
+    public int lastIndexOf( Object o ) {
+        return memberPrimitives.lastIndexOf( o );
+    }
+
+    public ListIterator<GeometricPrimitive> listIterator() {
+        return memberPrimitives.listIterator();
+    }
+
+    public ListIterator<GeometricPrimitive> listIterator( int index ) {
+        return memberPrimitives.listIterator( index );
+    }
+
+    public GeometricPrimitive remove( int index ) {
+        return memberPrimitives.remove( index );
+    }
+
+    public boolean remove( Object o ) {
+        return memberPrimitives.remove( o );
+    }
+
+    public boolean removeAll( Collection<?> c ) {
+        return memberPrimitives.removeAll( c );
+    }
+
+    public boolean retainAll( Collection<?> c ) {
+        return memberPrimitives.retainAll( c );
+    }
+
+    public GeometricPrimitive set( int index, GeometricPrimitive element ) {
+        return memberPrimitives.set( index, element );
+    }
+
+    public int size() {
+        return memberPrimitives.size();
+    }
+
+    public List<GeometricPrimitive> subList( int fromIndex, int toIndex ) {
+        return memberPrimitives.subList( fromIndex, toIndex );
+    }
+
+    public Object[] toArray() {
+        return memberPrimitives.toArray();
+    }
+
+    public <T> T[] toArray( T[] a ) {
+        return memberPrimitives.toArray( a );
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.COMPOSITE_GEOMETRY;
+    }
+    
+    
+    protected GeometryCollection buildJTSGeometry() {
+        com.vividsolutions.jts.geom.Geometry [] jtsMembers = new com.vividsolutions.jts.geom.Geometry[size()];
+        int i = 0;
+        for ( Geometry geometry : memberPrimitives ) {
+            jtsMembers[i++] = getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createGeometryCollection( jtsMembers );
+    }    
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSolid.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSolid.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSolid.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,218 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.composite;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.composite.CompositeSolid;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Solid;
+import org.osgeo.geometry.primitive.Surface;
+
+/**
+ * Default implementation of {@link CompositeSolid}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCompositeSolid extends AbstractDefaultGeometry implements CompositeSolid {
+
+    private List<Solid> memberSolids;
+
+    /**
+     * Creates a new {@link DefaultCompositeSolid} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param memberSolids
+     *
+     */
+    public DefaultCompositeSolid( String id, CRS crs, PrecisionModel pm, List<Solid> memberSolids ) {
+        super( id, crs, pm );
+        this.memberSolids = memberSolids;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return memberSolids.get( 0 ).getCoordinateDimension();
+    }  
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Solid;
+    }
+
+    
+    public SolidType getSolidType() {
+        return SolidType.CompositeSolid;
+    }
+
+    
+    public Surface getExteriorSurface() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    
+    public List<Surface> getInteriorSurfaces() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public DefaultMeasure getVolume( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    // -----------------------------------------------------------------------
+    // delegate methods for List<Solid>
+    // -----------------------------------------------------------------------
+
+    public void add( int index, Solid element ) {
+        memberSolids.add( index, element );
+    }
+
+    public boolean add( Solid e ) {
+        return memberSolids.add( e );
+    }
+
+    public boolean addAll( Collection<? extends Solid> c ) {
+        return memberSolids.addAll( c );
+    }
+
+    public boolean addAll( int index, Collection<? extends Solid> c ) {
+        return memberSolids.addAll( index, c );
+    }
+
+    public void clear() {
+        memberSolids.clear();
+    }
+
+    public boolean contains( Object o ) {
+        return memberSolids.contains( o );
+    }
+
+    public boolean containsAll( Collection<?> c ) {
+        return memberSolids.containsAll( c );
+    }
+
+    public Solid get( int index ) {
+        return memberSolids.get( index );
+    }
+
+    public int indexOf( Object o ) {
+        return memberSolids.indexOf( o );
+    }
+
+    public boolean isEmpty() {
+        return memberSolids.isEmpty();
+    }
+
+    public Iterator<Solid> iterator() {
+        return memberSolids.iterator();
+    }
+
+    public int lastIndexOf( Object o ) {
+        return memberSolids.lastIndexOf( o );
+    }
+
+    public ListIterator<Solid> listIterator() {
+        return memberSolids.listIterator();
+    }
+
+    public ListIterator<Solid> listIterator( int index ) {
+        return memberSolids.listIterator( index );
+    }
+
+    public Solid remove( int index ) {
+        return memberSolids.remove( index );
+    }
+
+    public boolean remove( Object o ) {
+        return memberSolids.remove( o );
+    }
+
+    public boolean removeAll( Collection<?> c ) {
+        return memberSolids.removeAll( c );
+    }
+
+    public boolean retainAll( Collection<?> c ) {
+        return memberSolids.retainAll( c );
+    }
+
+    public Solid set( int index, Solid element ) {
+        return memberSolids.set( index, element );
+    }
+
+    public int size() {
+        return memberSolids.size();
+    }
+
+    public List<Solid> subList( int fromIndex, int toIndex ) {
+        return memberSolids.subList( fromIndex, toIndex );
+    }
+
+    public Object[] toArray() {
+        return memberSolids.toArray();
+    }
+
+    public <T> T[] toArray( T[] a ) {
+        return memberSolids.toArray( a );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSurface.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSurface.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/composite/DefaultCompositeSurface.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,246 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.composite;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.composite.CompositeSurface;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.Surface;
+import org.osgeo.geometry.primitive.patches.SurfacePatch;
+
+/**
+ * Default implementation of {@link CompositeSurface}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCompositeSurface extends AbstractDefaultGeometry implements CompositeSurface {
+
+    private List<Surface> memberSurfaces;
+
+    /**
+     * Creates a new {@link DefaultCompositeSurface} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param memberSurfaces
+     *            surfaces that constitute the composited surface, the surfaces must join in pairs on common boundary
+     *            curves and must, when considered as
+     */
+    public DefaultCompositeSurface( String id, CRS crs, PrecisionModel pm, List<Surface> memberSurfaces ) {
+        super( id, crs, pm );
+        this.memberSurfaces = memberSurfaces;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return memberSurfaces.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Surface;
+    }
+
+    
+    public SurfaceType getSurfaceType() {
+        return SurfaceType.CompositeSurface;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public DefaultMeasure getPerimeter( Unit requestedUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getCentroid() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    
+    public List<SurfacePatch> getPatches() {
+        List<SurfacePatch> allPatches = new LinkedList<SurfacePatch>();
+        for ( Surface member : memberSurfaces ) {
+            allPatches.addAll( member.getPatches() );
+        }
+        return allPatches;
+    }
+
+    
+    
+    protected com.vividsolutions.jts.geom.MultiPolygon buildJTSGeometry() {
+        com.vividsolutions.jts.geom.Polygon [] jtsMembers = new com.vividsolutions.jts.geom.Polygon[size()];
+        int i = 0;
+        for ( Surface geometry : memberSurfaces ) {
+            jtsMembers[i++] = (com.vividsolutions.jts.geom.Polygon) getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createMultiPolygon( jtsMembers );
+    }    
+
+    // -----------------------------------------------------------------------
+    // delegate methods for List<Surface>
+    // -----------------------------------------------------------------------
+
+    public void add( int index, Surface element ) {
+        memberSurfaces.add( index, element );
+    }
+
+    public boolean add( Surface e ) {
+        return memberSurfaces.add( e );
+    }
+
+    public boolean addAll( Collection<? extends Surface> c ) {
+        return memberSurfaces.addAll( c );
+    }
+
+    public boolean addAll( int index, Collection<? extends Surface> c ) {
+        return memberSurfaces.addAll( index, c );
+    }
+
+    public void clear() {
+        memberSurfaces.clear();
+    }
+
+    public boolean contains( Object o ) {
+        return memberSurfaces.contains( o );
+    }
+
+    public boolean containsAll( Collection<?> c ) {
+        return memberSurfaces.containsAll( c );
+    }
+
+    public Surface get( int index ) {
+        return memberSurfaces.get( index );
+    }
+
+    public int indexOf( Object o ) {
+        return memberSurfaces.indexOf( o );
+    }
+
+    public boolean isEmpty() {
+        return memberSurfaces.isEmpty();
+    }
+
+    public Iterator<Surface> iterator() {
+        return memberSurfaces.iterator();
+    }
+
+    public int lastIndexOf( Object o ) {
+        return memberSurfaces.lastIndexOf( o );
+    }
+
+    public ListIterator<Surface> listIterator() {
+        return memberSurfaces.listIterator();
+    }
+
+    public ListIterator<Surface> listIterator( int index ) {
+        return memberSurfaces.listIterator( index );
+    }
+
+    public Surface remove( int index ) {
+        return memberSurfaces.remove( index );
+    }
+
+    public boolean remove( Object o ) {
+        return memberSurfaces.remove( o );
+    }
+
+    public boolean removeAll( Collection<?> c ) {
+        return memberSurfaces.removeAll( c );
+    }
+
+    public boolean retainAll( Collection<?> c ) {
+        return memberSurfaces.retainAll( c );
+    }
+
+    public Surface set( int index, Surface element ) {
+        return memberSurfaces.set( index, element );
+    }
+
+    public int size() {
+        return memberSurfaces.size();
+    }
+
+    public List<Surface> subList( int fromIndex, int toIndex ) {
+        return memberSurfaces.subList( fromIndex, toIndex );
+    }
+
+    public Object[] toArray() {
+        return memberSurfaces.toArray();
+    }
+
+    public <T> T[] toArray( T[] a ) {
+        return memberSurfaces.toArray( a );
+    }
+
+    
+    public Points getExteriorRingCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Points> getInteriorRingsCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArc.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArc.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArc.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,113 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.deegree.geometry.standard.points.PointsArray;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.Arc;
+
+/**
+ * Default implementation of {@link Arc} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultArc implements Arc {
+
+    protected final Points points;
+
+    /**
+     * Creates a new <code>DefaultArc</code> instance from the given parameters.
+     *
+     * @param p1
+     *            first control point
+     * @param p2
+     *            second control point
+     * @param p3
+     *            third control point
+     */
+    public DefaultArc( Point p1, Point p2, Point p3 ) {
+        points = new PointsArray( p1, p2, p3 );
+    }
+
+    
+    public Point getPoint1() {
+        return points.get( 0 );
+    }
+
+    
+    public Point getPoint2() {
+        return points.get( 1 );
+    }
+
+    
+    public Point getPoint3() {
+        return points.get( 2 );
+    }
+
+    
+    public int getCoordinateDimension() {
+        return points.getDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return points;
+    }
+
+    
+    public int getNumArcs() {
+        return 1;
+    }
+
+    
+    public Point getStartPoint() {
+        return points.getStartPoint();
+    }
+
+    
+    public Point getEndPoint() {
+        return points.getEndPoint();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.ARC;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByBulge.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByBulge.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByBulge.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,138 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import java.util.Collections;
+
+import org.deegree.geometry.standard.points.PointsArray;
+import org.deegree.geometry.standard.points.PointsList;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.ArcByBulge;
+
+/**
+ * Default implementation of {@link ArcByBulge} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultArcByBulge implements ArcByBulge {
+
+    private final Points controlPoints;
+
+    private final double bulge;
+
+    private final Point normal;
+
+    /**
+     * Creates a new <code>DefaultArcByBulge</code> instance from the given parameters.
+     *
+     * @param p1
+     *            first control point
+     * @param p2
+     *            second control point
+     * @param bulge
+     * @param normal
+     */
+    public DefaultArcByBulge( Point p1, Point p2, double bulge, Point normal ) {
+        controlPoints = new PointsArray( p1, p2 );
+        this.bulge = bulge;
+        this.normal = normal;
+    }
+
+    
+    public Point getPoint1() {
+        return controlPoints.get( 0 );
+    }
+
+    
+    public Point getPoint2() {
+        return controlPoints.get( 1 );
+    }
+
+    
+    public double getBulge() {
+        return bulge;
+    }
+
+    
+    public Point getNormal() {
+        return normal;
+    }
+
+    
+    public double[] getBulges() {
+        return new double[] { bulge };
+    }
+
+    @SuppressWarnings("unchecked")
+    
+    public Points getNormals() {
+        return new PointsList( Collections.singletonList( normal ) );
+    }
+
+    
+    public int getNumArcs() {
+        return 1;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public Point getStartPoint() {
+        return controlPoints.get( 0 );
+    }
+
+    
+    public Point getEndPoint() {
+        return controlPoints.get( 1 );
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.ARC_BY_BULGE;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByCenterPoint.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByCenterPoint.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcByCenterPoint.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,117 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Angle;
+import org.osgeo.commons.uom.Length;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.ArcByCenterPoint;
+
+/**
+ * Default implementation of {@link ArcByCenterPoint} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultArcByCenterPoint implements ArcByCenterPoint {
+
+    private Point midPoint;
+
+    private Length radius;
+
+    private Angle startAngle;
+
+    private Angle endAngle;
+
+    /**
+     * Creates a new <code>DefaultArcByCenterPoint</code> instance from the given parameters.
+     *
+     * @param midPoint
+     * @param radius
+     * @param startAngle
+     * @param endAngle
+     */
+    public DefaultArcByCenterPoint( Point midPoint, Length radius, Angle startAngle, Angle endAngle ) {
+        this.midPoint = midPoint;
+        this.radius = radius;
+        this.startAngle = startAngle;
+        this.endAngle = endAngle;
+    }
+
+    
+    public Angle getEndAngle() {
+        return endAngle;
+    }
+
+    
+    public Point getMidPoint() {
+        return midPoint;
+    }
+
+    
+    public Length getRadius(Unit requestedUnits) {
+        return radius;
+    }
+
+    
+    public Angle getStartAngle() {
+        return startAngle;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return midPoint.getCoordinateDimension();
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.ARC_BY_CENTER_POINT;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcString.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcString.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcString.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,99 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.ArcString;
+
+/**
+ * Default implementation of {@link ArcString} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultArcString implements ArcString {
+
+    protected int numArcs;
+
+    protected Points controlPoints;
+
+    /**
+     * Creates a new <code>DefaultArcString</code> instance from the given parameters.
+     *
+     * @param controlPoints
+     *            interpolation points
+     */
+    public DefaultArcString( Points controlPoints ) {
+        if ( controlPoints.size() < 3 || controlPoints.size() % 2 != 1 ) {
+            throw new IllegalArgumentException( "Invalid number of points." );
+        }
+        numArcs = controlPoints.size() / 2;
+        this.controlPoints = controlPoints;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.getDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public int getNumArcs() {
+        return numArcs;
+    }
+
+    
+    public Point getStartPoint() {
+        return controlPoints.get( 0 );
+    }
+
+    
+    public Point getEndPoint() {
+        return controlPoints.get( controlPoints.size() - 1 );
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.ARC_STRING;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcStringByBulge.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcStringByBulge.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultArcStringByBulge.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,123 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.ArcStringByBulge;
+
+/**
+ * Default implementation of {@link ArcStringByBulge} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultArcStringByBulge implements ArcStringByBulge {
+
+    private Points controlPoints;
+
+    private double[] bulges;
+
+    private Points normals;
+
+    /**
+     *
+     * @param controlPoints
+     *            list of {@link Point}s that describe the <code>ArcStringByBulge</code>
+     * @param bulges
+     *
+     * @param normals
+     */
+    public DefaultArcStringByBulge( Points controlPoints, double[] bulges, Points normals ) {
+        if ( controlPoints.size() < 2 ) {
+            String msg = "An ArcStringByBulge must contain at least 2 control points.";
+            throw new IllegalArgumentException( msg );
+        }
+        if ( bulges.length != controlPoints.size() - 1 ) {
+            String msg = "The number of provided bulge values for an ArcStringByBulge must be equal to the number of control points minus one.";
+            throw new IllegalArgumentException( msg );
+        }
+        if ( bulges.length != controlPoints.size() - 1 ) {
+            String msg = "The number of normal vectors for an ArcStringByBulge must be equal to the number of control points minus one.";
+            throw new IllegalArgumentException( msg );
+        }
+        this.controlPoints = controlPoints;
+        this.bulges = bulges;
+        this.normals = normals;
+    }
+
+    
+    public double[] getBulges() {
+        return bulges;
+    }
+
+    
+    public Points getNormals() {
+        return normals;
+    }
+
+    
+    public int getNumArcs() {
+        return controlPoints.size() -1;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public Point getStartPoint() {
+        return controlPoints.get( 0 );
+    }
+
+    
+    public Point getEndPoint() {
+        return controlPoints.get( controlPoints.size() - 1 );
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.ARC_STRING_BY_BULGE;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBSpline.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBSpline.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBSpline.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,117 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import java.util.List;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.BSpline;
+import org.osgeo.geometry.primitive.segments.Knot;
+
+/**
+ * Default implementation of {@link BSpline} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultBSpline implements BSpline {
+
+    private Points controlPoints;
+
+    private int polynomialDegree;
+
+    private boolean isPolynomial;
+
+    private List<Knot> knots;
+
+    /**
+     * Creates a new <code>DefaultBSpline</code> instance from the given parameters.
+     *
+     * @param controlPoints
+     * @param polynomialDegree
+     * @param knots
+     * @param isPolynomial
+     */
+    public DefaultBSpline( Points controlPoints, int polynomialDegree, List<Knot> knots, boolean isPolynomial ) {
+        this.controlPoints = controlPoints;
+        this.polynomialDegree = polynomialDegree;
+        this.knots = knots;
+        this.isPolynomial = isPolynomial;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public int getPolynomialDegree() {
+        return polynomialDegree;
+    }
+
+    
+    public List<Knot> getKnots() {
+        return knots;
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.BSPLINE;
+    }
+
+    
+    public boolean isPolynomial() {
+        return isPolynomial;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBezier.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBezier.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultBezier.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,127 @@
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.Bezier;
+import org.osgeo.geometry.primitive.segments.Knot;
+
+/**
+ * Default implementation of {@link Bezier} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultBezier implements Bezier {
+
+    private Points controlPoints;
+
+    private int polynomialDegree;
+
+    private List<Knot> knots;
+
+    /**
+     * Creates a new <code>DefaultBezier</code> instance from the given parameters.
+     *
+     * @param controlPoints
+     *            interpolation points
+     * @param polynomialDegree
+     * @param knot1
+     * @param knot2
+     */
+    public DefaultBezier( Points controlPoints, int polynomialDegree, Knot knot1, Knot knot2 ) {
+        this.controlPoints = controlPoints;
+        this.polynomialDegree = polynomialDegree;
+        knots = new ArrayList<Knot>( 2 );
+        knots.add( knot1 );
+        knots.add( knot2 );
+    }
+
+    
+    public Knot getKnot1() {
+        return knots.get( 0 );
+    }
+
+    
+    public Knot getKnot2() {
+        return knots.get( 1 );
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public int getPolynomialDegree() {
+        return polynomialDegree;
+    }
+
+    
+    public List<Knot> getKnots() {
+        return knots;
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.BEZIER;
+    }
+
+    
+    public boolean isPolynomial() {
+        return true;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircle.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircle.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircle.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,83 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.Circle;
+
+/**
+ * Default implementation of {@link Circle} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCircle extends DefaultArc implements Circle {
+
+    /**
+     * Creates a new <code>DefaultCircle</code> instance from the given parameters.
+     *
+     * @param p1
+     * @param p2
+     * @param p3
+     */
+    public DefaultCircle( Point p1, Point p2, Point p3 ) {
+        super( p1, p2, p3 );
+    }
+
+    
+    public Point getMidPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public DefaultMeasure getRadius(Unit requestedUnits) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        return points.get( 0 );
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.CIRCLE;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircleByCenterPoint.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircleByCenterPoint.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCircleByCenterPoint.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,68 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.osgeo.commons.uom.Angle;
+import org.osgeo.commons.uom.Length;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.CircleByCenterPoint;
+
+/**
+ * Default implementation of {@link CircleByCenterPoint} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCircleByCenterPoint extends DefaultArcByCenterPoint implements CircleByCenterPoint {
+
+    /**
+     * Creates a new <code>DefaultCircleByCenterPoint</code> instance from the given parameters.
+     *
+     * @param midPoint
+     * @param radius
+     * @param startAngle
+     */
+    public DefaultCircleByCenterPoint( Point midPoint, Length radius, Angle startAngle ) {
+        super( midPoint, radius, startAngle, startAngle );
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.CIRCLE_BY_CENTER_POINT;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultClothoid.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultClothoid.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultClothoid.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,119 @@
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.AffinePlacement;
+import org.osgeo.geometry.primitive.segments.Clothoid;
+
+/**
+ * Default implementation of {@link Clothoid} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultClothoid implements Clothoid {
+
+    private AffinePlacement referenceLocation;
+
+    private double scaleFactor;
+
+    private double startParameter;
+
+    private double endParameter;
+
+    /**
+     * Creates a new <code>DefaultClothoid</code> instance from the given parameters.
+     *
+     * @param referenceLocation
+     *            the affine mapping that places the curve defined by the Fresnel Integrals into the coordinate
+     *            reference system of this object
+     * @param scaleFactor
+     *            the value for the constant in the Fresnel's integrals
+     * @param startParameter
+     *            the arc length distance from the inflection point that will be the start point for this curve segment
+     * @param endParameter
+     *            the arc length distance from the inflection point that will be the end point for this curve segment
+     */
+    public DefaultClothoid( AffinePlacement referenceLocation, double scaleFactor, double startParameter,
+                            double endParameter ) {
+        this.referenceLocation = referenceLocation;
+        this.scaleFactor = scaleFactor;
+        this.startParameter = startParameter;
+        this.endParameter = endParameter;
+    }
+
+    
+    public AffinePlacement getReferenceLocation() {
+        return referenceLocation;
+    }
+
+    
+    public double getScaleFactor() {
+        return scaleFactor;
+    }
+
+    
+    public double getStartParameter() {
+        return startParameter;
+    }
+
+    
+    public double getEndParameter() {
+        return endParameter;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return referenceLocation.getOutDimension();
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.CLOTHOID;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCubicSpline.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCubicSpline.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultCubicSpline.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,108 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.CubicSpline;
+
+/**
+ * Default implementation of {@link CubicSpline} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCubicSpline implements CubicSpline {
+
+    private Points controlPoints;
+
+    private Point vectorAtStart;
+
+    private Point vectorAtEnd;
+
+    /**
+     * Creates a new <code>DefaultCubicSpline</code> instance from the given parameters.
+     *
+     * @param points
+     *            control points, must have at least two entries
+     * @param vectorAtStart
+     *            the unit tangent vector at the start point of the spline
+     * @param vectorAtEnd
+     *            the unit tangent vector at the end point of the spline
+     */
+    public DefaultCubicSpline( Points points, Point vectorAtStart, Point vectorAtEnd ) {
+        this.controlPoints = points;
+        this.vectorAtStart = vectorAtStart;
+        this.vectorAtEnd = vectorAtEnd;
+    }
+
+    
+    public Point getVectorAtStart() {
+        return vectorAtStart;
+    }
+
+    
+    public Point getVectorAtEnd() {
+        return vectorAtEnd;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.get(0).getCoordinateDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.CUBIC_SPLINE;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesic.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesic.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesic.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,99 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.deegree.geometry.standard.points.PointsArray;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.Geodesic;
+
+/**
+ * Default implementation of {@link Geodesic} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultGeodesic implements Geodesic {
+
+    private final Points controlPoints;
+
+    /**
+     * Creates a new <code>DefaultGeodesic</code> instance from the given parameters.
+     *
+     * @param p1
+     * @param p2
+     */
+    public DefaultGeodesic( Point p1, Point p2 ) {
+        controlPoints = new PointsArray( p1, p2 );
+    }
+
+    
+    public Point getPoint1() {
+        return controlPoints.get( 0 );
+    }
+
+    
+    public Point getPoint2() {
+        return controlPoints.get( 1 );
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.GEODESIC;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesicString.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesicString.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultGeodesicString.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,88 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.GeodesicString;
+
+/**
+ * Default implementation of {@link GeodesicString} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultGeodesicString implements GeodesicString {
+
+    private Points points;
+
+    /**
+     * Creates a new <code>DefaultGeodesicString</code> instance from the given parameters.
+     *
+     * @param points
+     *            interpolation points
+     */
+    public DefaultGeodesicString( Points points ) {
+        this.points = points;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return points.get(0).getCoordinateDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return points;
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.GEODESIC_STRING;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultLineStringSegment.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultLineStringSegment.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultLineStringSegment.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,88 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.LineStringSegment;
+
+/**
+ * Default implementation of {@link LineStringSegment} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultLineStringSegment implements LineStringSegment {
+
+    private Points points;
+
+    /**
+     * Creates a new <code>DefaultLineStringSegment</code> instance from the given parameters.
+     *
+     * @param points
+     *            interpolation points
+     */
+    public DefaultLineStringSegment( Points points ) {
+        this.points = points;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return points.getDimension();
+    }
+
+    
+    public Points getControlPoints() {
+        return points;
+    }
+
+    
+    public Point getStartPoint() {
+        return points.get( 0 );
+    }
+
+    
+    public Point getEndPoint() {
+        return points.get( points.size() - 1 );
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.LINE_STRING_SEGMENT;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultOffsetCurve.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultOffsetCurve.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/curvesegments/DefaultOffsetCurve.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,110 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.curvesegments;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.primitive.Curve;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.OffsetCurve;
+
+/**
+ * Default implementation of {@link OffsetCurve} segments.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultOffsetCurve implements OffsetCurve {
+
+    private Curve baseCurve;
+
+    private Point direction;
+
+    private DefaultMeasure distance;
+
+    /**
+     * Creates a new <code>DefaultOffsetCurve</code> instance from the given parameters.
+     *
+     * @param baseCurve
+     *            the base geometry
+     * @param direction
+     *            the direction of the offset
+     * @param distance
+     *            the distance from the base curve
+     */
+    public DefaultOffsetCurve( Curve baseCurve, Point direction, DefaultMeasure distance ) {
+        this.baseCurve = baseCurve;
+        this.direction = direction;
+        this.distance = distance;
+    }
+
+    
+    public Curve getBaseCurve() {
+        return baseCurve;
+    }
+
+    
+    public Point getDirection() {
+        return direction;
+    }
+
+    
+    public DefaultMeasure getDistance( Unit requestedUnits ) {
+        return distance;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return baseCurve.getCoordinateDimension();
+    }
+
+    
+    public Point getStartPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getEndPoint() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public CurveSegmentType getSegmentType() {
+        return CurveSegmentType.OFFSET_CURVE;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiCurve.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiCurve.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiCurve.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,92 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.multi;
+
+import java.util.List;
+
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.multi.MultiCurve;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Curve;
+
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.MultiLineString;
+
+/**
+ * Default implementation of {@link MultiCurve}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMultiCurve extends DefaultMultiGeometry<Curve> implements MultiCurve {
+
+    /**
+     * Creates a new {@link DefaultMultiCurve} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param members
+     */
+    public DefaultMultiCurve( String id, CRS crs, PrecisionModel pm, List<Curve> members ) {
+        super( id, crs, pm, members );
+    }
+
+    
+    public double getLength() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public MultiGeometryType getMultiGeometryType() {
+        return MultiGeometryType.MULTI_CURVE;
+    }
+
+    
+    protected MultiLineString buildJTSGeometry() {
+        LineString [] jtsMembers = new LineString[size()];
+        int i = 0;
+        for ( Curve geometry : members ) {
+            jtsMembers[i++] = (LineString) getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createMultiLineString( jtsMembers );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiGeometry.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiGeometry.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiGeometry.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,214 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.multi;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.Envelope;
+import org.osgeo.geometry.Geometry;
+import org.osgeo.geometry.multi.MultiGeometry;
+import org.osgeo.geometry.precision.PrecisionModel;
+
+import com.vividsolutions.jts.geom.GeometryCollection;
+
+/**
+ * Default implementation of {@link MultiGeometry}.
+ *
+ * @param <T>
+ *            type of contained geometry objects
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMultiGeometry<T extends Geometry> extends AbstractDefaultGeometry implements MultiGeometry<T> {
+
+    protected List<T> members;
+
+    /**
+     * Creates a new {@link DefaultMultiGeometry} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param members
+     */
+    public DefaultMultiGeometry( String id, CRS crs, PrecisionModel pm, List<T> members ) {
+        super( id, crs, pm );
+        this.members = members;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return members.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.MULTI_GEOMETRY;
+    }
+
+    
+    protected GeometryCollection buildJTSGeometry() {
+        com.vividsolutions.jts.geom.Geometry[] jtsMembers = new com.vividsolutions.jts.geom.Geometry[size()];
+        int i = 0;
+        for ( Geometry geometry : members ) {
+            jtsMembers[i++] = getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createGeometryCollection( jtsMembers );
+    }
+
+    // -----------------------------------------------------------------------
+    // delegate methods for List<T>
+    // -----------------------------------------------------------------------
+
+    public void add( int index, T element ) {
+        members.add( index, element );
+    }
+
+    public boolean add( T e ) {
+        return members.add( e );
+    }
+
+    public boolean addAll( Collection<? extends T> c ) {
+        return members.addAll( c );
+    }
+
+    public boolean addAll( int index, Collection<? extends T> c ) {
+        return members.addAll( index, c );
+    }
+
+    public void clear() {
+        members.clear();
+    }
+
+    public boolean contains( Object o ) {
+        return members.contains( o );
+    }
+
+    public boolean containsAll( Collection<?> c ) {
+        return members.containsAll( c );
+    }
+
+    public T get( int index ) {
+        return members.get( index );
+    }
+
+    public int indexOf( Object o ) {
+        return members.indexOf( o );
+    }
+
+    public boolean isEmpty() {
+        return members.isEmpty();
+    }
+
+    public Iterator<T> iterator() {
+        return members.iterator();
+    }
+
+    public int lastIndexOf( Object o ) {
+        return members.lastIndexOf( o );
+    }
+
+    public ListIterator<T> listIterator() {
+        return members.listIterator();
+    }
+
+    public ListIterator<T> listIterator( int index ) {
+        return members.listIterator( index );
+    }
+
+    public T remove( int index ) {
+        return members.remove( index );
+    }
+
+    public boolean remove( Object o ) {
+        return members.remove( o );
+    }
+
+    public boolean removeAll( Collection<?> c ) {
+        return members.removeAll( c );
+    }
+
+    public boolean retainAll( Collection<?> c ) {
+        return members.retainAll( c );
+    }
+
+    public T set( int index, T element ) {
+        return members.set( index, element );
+    }
+
+    public int size() {
+        return members.size();
+    }
+
+    public List<T> subList( int fromIndex, int toIndex ) {
+        return members.subList( fromIndex, toIndex );
+    }
+
+    public Object[] toArray() {
+        return members.toArray();
+    }
+
+    @SuppressWarnings("hiding")
+    public <T> T[] toArray( T[] a ) {
+        return members.toArray( a );
+    }
+
+    
+    public Envelope getEnvelope() {
+        // TODO NullEnvelope for emtpy aggregates? or throw an exception?
+        Envelope result = get( 0 ).getEnvelope();
+        for ( Geometry geom : this ) {
+            result = result.merge( geom.getEnvelope() );
+        }
+        return result;
+    }
+
+    
+    public MultiGeometryType getMultiGeometryType() {
+        return MultiGeometryType.MULTI_GEOMETRY;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiLineString.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiLineString.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiLineString.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,90 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.multi;
+
+import java.util.List;
+
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.multi.MultiLineString;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Curve;
+import org.osgeo.geometry.primitive.LineString;
+
+/**
+ * Default implementation of {@link MultiLineString}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMultiLineString extends DefaultMultiGeometry<LineString> implements MultiLineString {
+
+    /**
+     * Creates a new {@link DefaultMultiLineString} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param members
+     */
+    public DefaultMultiLineString( String id, CRS crs, PrecisionModel pm, List<LineString> members ) {
+        super( id, crs, pm, members );
+    }
+
+    
+    public double getLength() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public MultiGeometryType getMultiGeometryType() {
+        return MultiGeometryType.MULTI_LINE_STRING;
+    }
+
+    
+    protected com.vividsolutions.jts.geom.MultiLineString buildJTSGeometry() {
+        com.vividsolutions.jts.geom.LineString[] jtsMembers = new com.vividsolutions.jts.geom.LineString[size()];
+        int i = 0;
+        for ( Curve geometry : members ) {
+            jtsMembers[i++] = (com.vividsolutions.jts.geom.LineString) getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createMultiLineString( jtsMembers );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPoint.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPoint.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPoint.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,86 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.multi;
+
+import java.util.List;
+
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.multi.MultiPoint;
+import org.osgeo.geometry.multi.MultiGeometry.MultiGeometryType;
+import org.osgeo.geometry.primitive.Point;
+
+import org.osgeo.geometry.precision.PrecisionModel;
+
+/**
+ * Default implementation of {@link MultiPoint}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMultiPoint extends DefaultMultiGeometry<Point> implements MultiPoint {
+
+    /**
+     * Creates a new {@link DefaultMultiPoint} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be nul
+     * @param members
+     */
+    public DefaultMultiPoint( String id, CRS crs, PrecisionModel pm, List<Point> members ) {
+        super( id, crs, pm, members );
+    }
+
+    
+    public MultiGeometryType getMultiGeometryType() {
+        return MultiGeometryType.MULTI_POINT;
+    }
+
+    
+    protected com.vividsolutions.jts.geom.MultiPoint buildJTSGeometry() {
+        com.vividsolutions.jts.geom.Point [] jtsMembers = new com.vividsolutions.jts.geom.Point[size()];
+        int i = 0;
+        for ( Point geometry : members ) {
+            jtsMembers[i++] = (com.vividsolutions.jts.geom.Point) getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createMultiPoint( jtsMembers );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPolygon.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPolygon.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiPolygon.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,92 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.multi;
+
+import java.util.List;
+
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.multi.MultiPolygon;
+import org.osgeo.geometry.multi.MultiGeometry.MultiGeometryType;
+import org.osgeo.geometry.primitive.Polygon;
+import org.osgeo.geometry.primitive.Surface;
+
+import org.osgeo.geometry.precision.PrecisionModel;
+
+/**
+ * Default implementation of {@link MultiPolygon}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMultiPolygon extends DefaultMultiGeometry<Polygon> implements MultiPolygon {
+
+    /**
+     * Creates a new {@link DefaultMultiPolygon} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param members
+     */
+    public DefaultMultiPolygon( String id, CRS crs, PrecisionModel pm, List<Polygon> members ) {
+        super( id, crs, pm, members );
+    }
+
+    
+    public double getArea() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public MultiGeometryType getMultiGeometryType() {
+        return MultiGeometryType.MULTI_POLYGON;
+    }
+    
+    
+    protected com.vividsolutions.jts.geom.MultiPolygon buildJTSGeometry() {
+        com.vividsolutions.jts.geom.Polygon [] jtsMembers = new com.vividsolutions.jts.geom.Polygon[size()];
+        int i = 0;
+        for ( Surface geometry : members ) {
+            jtsMembers[i++] = (com.vividsolutions.jts.geom.Polygon) getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createMultiPolygon( jtsMembers );
+    }      
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSolid.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSolid.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSolid.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,79 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.multi;
+
+import java.util.List;
+
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.multi.MultiSolid;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Solid;
+
+/**
+ * Default implementation of {@link MultiSolid}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMultiSolid extends DefaultMultiGeometry<Solid> implements MultiSolid {
+
+    /**
+     * Creates a new {@link DefaultMultiSolid} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param members
+     */
+    public DefaultMultiSolid( String id, CRS crs, PrecisionModel pm, List<Solid> members ) {
+        super( id, crs, pm, members );
+    }
+
+    
+    public double getVolume() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public MultiGeometryType getMultiGeometryType() {
+        return MultiGeometryType.MULTI_SOLID;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSurface.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSurface.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/multi/DefaultMultiSurface.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,89 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.multi;
+
+import java.util.List;
+
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.multi.MultiSurface;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Surface;
+
+/**
+ * Default implementation of {@link MultiSurface}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultMultiSurface extends DefaultMultiGeometry<Surface> implements MultiSurface {
+
+    /**
+     * Creates a new {@link DefaultMultiSurface} from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param members
+     */
+    public DefaultMultiSurface( String id, CRS crs, PrecisionModel pm, List<Surface> members ) {
+        super( id, crs, pm, members );
+    }
+
+    
+    public double getArea() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public MultiGeometryType getMultiGeometryType() {
+        return MultiGeometryType.MULTI_SURFACE;
+    }
+    
+    
+    protected com.vividsolutions.jts.geom.MultiPolygon buildJTSGeometry() {
+        com.vividsolutions.jts.geom.Polygon [] jtsMembers = new com.vividsolutions.jts.geom.Polygon[size()];
+        int i = 0;
+        for ( Surface geometry : members ) {
+            jtsMembers[i++] = (com.vividsolutions.jts.geom.Polygon) getAsDefaultGeometry( geometry ).getJTSGeometry();
+        }
+        return jtsFactory.createMultiPolygon( jtsMembers );
+    }    
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/JTSPoints.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/JTSPoints.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/JTSPoints.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,202 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.points;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+import org.deegree.geometry.standard.primitive.DefaultPoint;
+import org.osgeo.geometry.Geometry;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateSequence;
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * {@link Points} implementation based on a JTS coordinate sequence.
+ * <p>
+ * This implementation is useful when JTS geometries have to converted into {@link Geometry} objects.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author: schneider $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class JTSPoints implements Points, CoordinateSequence {
+
+    private final CoordinateSequence seq;
+
+    public JTSPoints( CoordinateSequence seq ) {
+        this.seq = seq;
+    }
+
+    
+    public int getDimension() {
+        // TODO why does seq#getDimension() not work?
+        return 2;
+    }
+
+    
+    public int size() {
+        return seq.size();
+    }
+
+    /**
+     * Provides acccess to an arbitrary {@link Point} in the sequence (expensive!).
+     */
+    
+    public Point get( int i ) {
+        double[] pointCoordinates = new double[getDimension()];
+        int idx = i * getDimension();
+        for ( int d = 0; d < getDimension(); d++ ) {
+            pointCoordinates[d] = getOrdinate( idx, d );
+        }
+        return new DefaultPoint( null, null, null, pointCoordinates );
+    }
+
+    
+    public Iterator<Point> iterator() {
+
+        return new Iterator<Point>() {
+
+            private int idx = 0;
+
+            private double[] pointCoordinates = new double[getDimension()];
+
+            private DefaultPoint point = new DefaultPoint( null, null, null, pointCoordinates );
+
+            
+            public boolean hasNext() {
+                return idx < size();
+            }
+
+            
+            public Point next() {
+                if ( !hasNext() ) {
+                    throw new NoSuchElementException();
+                }
+                for ( int i = 0; i < getDimension(); i++ ) {
+                    pointCoordinates[i] = getOrdinate( idx, i );
+                }
+                idx++;
+                return point;
+            }
+
+            
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
+        };
+    }
+
+    
+    public double[] getAsArray() {
+        double[] coords = new double[getDimension() * size()];
+        int i = 0;
+        for ( Point p : this ) {
+            for ( double coord : p.getAsArray() ) {
+                coords[i++] = coord;
+            }
+        }
+        return coords;
+    }
+
+    
+    public Point getEndPoint() {
+        return get( size() - 1 );
+    }
+
+    
+    public Point getStartPoint() {
+        return get( 0 );
+    }
+
+    // -----------------------------------------------------------------------
+    // Implementation of JTS methods
+    // -----------------------------------------------------------------------
+
+    
+    public Envelope expandEnvelope( Envelope env ) {
+        return seq.expandEnvelope( env );
+    }
+
+    
+    public Coordinate getCoordinate( int index ) {
+        return seq.getCoordinate( index );
+    }
+
+    
+    public void getCoordinate( int index, Coordinate coord ) {
+        seq.getCoordinate( index, coord );
+    }
+
+    
+    public Coordinate getCoordinateCopy( int index ) {
+        return seq.getCoordinateCopy( index );
+    }
+
+    
+    public double getOrdinate( int index, int ordinateIndex ) {
+        return seq.getOrdinate( index, ordinateIndex );
+    }
+
+    
+    public double getX( int index ) {
+        return seq.getX( index );
+    }
+
+    
+    public double getY( int index ) {
+        return seq.getY( index );
+    }
+
+    
+    public void setOrdinate( int index, int ordinateIndex, double value ) {
+        seq.setOrdinate( index, ordinateIndex, value );
+    }
+
+    
+    public Coordinate[] toCoordinateArray() {
+        return seq.toCoordinateArray();
+    }
+
+    
+    public Object clone() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PackedPoints.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PackedPoints.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PackedPoints.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,208 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.points;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+import org.deegree.geometry.standard.primitive.DefaultPoint;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateSequence;
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * {@link Points} implementation based on a coordinate array.
+ * <p>
+ * This implementation is quite memory efficient, but only allows to hold anonymous {@link Point} objects.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author: schneider $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class PackedPoints implements Points, CoordinateSequence {
+
+    private int dimension;
+
+    private double[] coordinates;
+
+    public PackedPoints( double[] coordinates, int coordinatesDimension ) {
+        this.coordinates = coordinates;
+        this.dimension = coordinatesDimension;
+    }
+
+    
+    public int getDimension() {
+        return dimension;
+    }
+
+    
+    public int size() {
+        return coordinates.length / dimension;
+    }
+
+    /**
+     * Provides acccess to an arbitrary {@link Point} in the sequence (expensive!).
+     */
+    
+    public Point get( int i ) {
+        double[] pointCoordinates = new double[dimension];
+        int idx = i * dimension;
+        for ( int d = 0; d < dimension; d++ ) {
+            pointCoordinates[d] = coordinates[idx + d];
+        }
+        return new DefaultPoint( null, null, null, pointCoordinates );
+    }
+
+    
+    public Iterator<Point> iterator() {
+
+        return new Iterator<Point>() {
+
+            private int idx = 0;
+
+            private double[] pointCoordinates = new double[dimension];
+
+            private DefaultPoint point = new DefaultPoint( null, null, null, pointCoordinates );
+
+            
+            public boolean hasNext() {
+                return idx < coordinates.length;
+            }
+
+            
+            public Point next() {
+                if ( !hasNext() ) {
+                    throw new NoSuchElementException();
+                }
+                for ( int i = 0; i < dimension; i++ ) {
+                    pointCoordinates[i] = coordinates[idx + i];
+                }
+                idx += dimension;
+                return point;
+            }
+
+            
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
+        };
+    }
+
+    
+    public double[] getAsArray() {
+        return coordinates;
+    }
+
+    
+    public Point getEndPoint() {
+        return get( size() - 1 );
+    }
+
+    
+    public Point getStartPoint() {
+        return get( 0 );
+    }
+
+    // -----------------------------------------------------------------------
+    // Implementation of JTS methods
+    // -----------------------------------------------------------------------
+
+    
+    public Envelope expandEnvelope( Envelope env ) {
+        for ( int i = 0; i < coordinates.length; i += 2 ) {
+            env.expandToInclude( coordinates[i], coordinates[i + 1] );
+        }
+        return env;
+    }
+
+    
+    public Coordinate getCoordinate( int index ) {
+        Point point = get( index );
+        return new Coordinate( point.get0(), point.get1(), point.get2() );
+    }
+
+    
+    public void getCoordinate( int index, Coordinate coord ) {
+        Point point = get( index );
+        coord.x = point.get0();
+        coord.y = point.get1();
+        coord.z = point.get2();
+    }
+
+    
+    public Coordinate getCoordinateCopy( int index ) {
+        Point point = get( index );
+        return new Coordinate( point.get0(), point.get1(), point.get2() );
+    }
+
+    
+    public double getOrdinate( int index, int ordinateIndex ) {
+        return get( index ).get( ordinateIndex );
+    }
+
+    
+    public double getX( int index ) {
+        return get( index ).get0();
+    }
+
+    
+    public double getY( int index ) {
+        return get( index ).get1();
+    }
+
+    
+    public void setOrdinate( int index, int ordinateIndex, double value ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Coordinate[] toCoordinateArray() {
+        Coordinate[] coords = new Coordinate[coordinates.length / dimension];
+        for ( int i = 0; i < coords.length; i++ ) {
+            coords[i] = new Coordinate( coordinates[i * 2], coordinates[i * 2 + 1] );
+        }
+        return coords;
+    }
+
+    
+    public Object clone() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsArray.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsArray.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsArray.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,205 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.points;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateSequence;
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * <code>Array</code>-based {@link Points} implementation that allows to hold identifiable {@link Point} objects (with
+ * id or even references to local or remote {@link Point} instances}.
+ * <p>
+ * This implementation is rather expensive, as every contained point is represented as an individual {@link Point}
+ * object. Whenever possible, {@link PackedPoints} or {@link PointsPoints} should be used instead.
+ * </p>
+ *
+ * @see PackedPoints
+ * @see PointsPoints
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author: schneider $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class PointsArray implements Points, CoordinateSequence {
+
+    private Point[] points;
+
+    /**
+     * Creates a new {@link PointsArray} instance based on the given array.
+     *
+     * @param points
+     */
+    public PointsArray( Point... points ) {
+        this.points = points;
+    }
+
+    
+    public int getDimension() {
+        return points[0].getCoordinateDimension();
+    }
+
+    
+    public int size() {
+        return points.length;
+    }
+
+    
+    public Iterator<Point> iterator() {
+        return new Iterator<Point>() {
+
+            int i = 0;
+
+            
+            public boolean hasNext() {
+                return i < points.length;
+            }
+
+            
+            public Point next() {
+                if ( !hasNext() ) {
+                    throw new NoSuchElementException();
+                }
+                return points[i++];
+            }
+
+            
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
+        };
+    }
+
+    
+    public Point get( int i ) {
+        return points[i];
+    }
+
+    
+    public double[] getAsArray() {
+        double[] coords = new double[getDimension() * size()];
+        int i = 0;
+        for ( Point p : this ) {
+            for ( double coord : p.getAsArray() ) {
+                coords[i++] = coord;
+            }
+        }
+        return coords;
+    }
+
+    
+    public Point getEndPoint() {
+        return get( size() - 1 );
+    }
+
+    
+    public Point getStartPoint() {
+        return get( 0 );
+    }
+
+    // -----------------------------------------------------------------------
+    // Implementation of JTS methods
+    // -----------------------------------------------------------------------
+
+    
+    public Envelope expandEnvelope( Envelope env ) {
+        for ( Point p : points ) {
+            env.expandToInclude( p.get0(), p.get1() );
+        }
+        return env;
+    }
+
+    
+    public Coordinate getCoordinate( int index ) {
+        Point point = get( index );
+        return new Coordinate( point.get0(), point.get1(), point.get2() );
+    }
+
+    
+    public void getCoordinate( int index, Coordinate coord ) {
+        Point point = get( index );
+        coord.x = point.get0();
+        coord.y = point.get1();
+        coord.z = point.get2();
+    }
+
+    
+    public Coordinate getCoordinateCopy( int index ) {
+        Point point = get( index );
+        return new Coordinate( point.get0(), point.get1(), point.get2() );
+    }
+
+    
+    public double getOrdinate( int index, int ordinateIndex ) {
+        return get( index ).get( ordinateIndex );
+    }
+
+    
+    public double getX( int index ) {
+        return get( index ).get0();
+    }
+
+    
+    public double getY( int index ) {
+        return get( index ).get1();
+    }
+
+    
+    public void setOrdinate( int index, int ordinateIndex, double value ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Coordinate[] toCoordinateArray() {
+        Coordinate[] coords = new Coordinate[size()];
+        int i = 0;
+        for ( Point p : this ) {
+            coords[i++] = new Coordinate( p.get0(), p.get1() );
+        }
+        return coords;
+    }
+
+    
+    public Object clone() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsList.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsList.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsList.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,184 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.points;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateSequence;
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * <code>List</code>-based {@link Points} implementation that allows to hold identifiable {@link Point} objects (with id
+ * or even references to local or remote {@link Point} instances}.
+ * <p>
+ * This implementation is rather expensive, as every contained point is represented as an individual {@link Point}
+ * object. Whenever possible, {@link PackedPoints} or {@link PointsPoints} should be used instead.
+ * </p>
+ *
+ * @see PackedPoints
+ * @see PointsPoints
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author: schneider $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class PointsList implements Points, CoordinateSequence {
+
+    protected List<Point> points;
+
+    /**
+     * Creates a new {@link PointsList} instance based on the given list.
+     *
+     * @param points
+     */
+    public PointsList( List<Point> points ) {
+        this.points = points;
+    }
+
+    
+    public int getDimension() {
+        return points.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public int size() {
+        return points.size();
+    }
+
+    
+    public Iterator<Point> iterator() {
+        return points.iterator();
+    }
+
+    
+    public Point get( int i ) {
+        return points.get( i );
+    }
+
+    
+    public double[] getAsArray() {
+        double[] coords = new double[getDimension() * size()];
+        int i = 0;
+        for ( Point p : this ) {
+            for ( double coord : p.getAsArray() ) {
+                coords[i++] = coord;
+            }
+        }
+        return coords;
+    }
+    
+    
+    public Point getEndPoint() {
+        return get( size() - 1 );
+    }
+
+    
+    public Point getStartPoint() {
+        return get( 0 );
+    }
+
+    // -----------------------------------------------------------------------
+    // Implementation of JTS methods
+    // -----------------------------------------------------------------------    
+    
+    
+    public Envelope expandEnvelope( Envelope env ) {
+        for ( Point p : points ) {
+            env.expandToInclude( p.get0(), p.get1() );
+        }
+        return env;
+    }
+
+    
+    public Coordinate getCoordinate( int index ) {
+        Point point = points.get(index);
+        return new Coordinate( point.get0(), point.get1(), point.get2() );  
+    }
+
+    
+    public void getCoordinate( int index, Coordinate coord ) {
+        Point point = points.get(index);
+        coord.x = point.get0();
+        coord.y = point.get1();
+        coord.z = point.get2();
+    }
+
+    
+    public Coordinate getCoordinateCopy( int index ) {
+        Point point = points.get(index);
+        return new Coordinate( point.get0(), point.get1(), point.get2() );        
+    }
+
+    
+    public double getOrdinate( int index, int ordinateIndex ) {
+        return points.get( index ).get(ordinateIndex);
+    }
+
+    
+    public double getX( int index ) {
+        return points.get( index ).get0();
+    }
+
+    
+    public double getY( int index ) {
+        return points.get( index ).get1();
+    }
+
+    
+    public void setOrdinate( int index, int ordinateIndex, double value ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Coordinate[] toCoordinateArray() {
+        Coordinate[] coords = new Coordinate[size()];
+        int i = 0;
+        for ( Point p : this ) {
+            coords[i++] = new Coordinate( p.get0(), p.get1() );
+        }
+        return coords;
+    }
+    
+    
+    public Object clone () {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsPoints.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsPoints.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/points/PointsPoints.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,221 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard.points;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.Point;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateSequence;
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * {@link Points} implementation that aggregates the members from a sequence of {@link Points} objects.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author: schneider $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class PointsPoints implements Points, CoordinateSequence {
+
+    private List<Points> pointsList;
+
+    /**
+     * Creates a new {@link PointsPoints} instance from the given list of {@link Points}.
+     *
+     * @param pointsList
+     */
+    public PointsPoints( List<Points> pointsList ) {
+        this.pointsList = pointsList;
+    }
+
+    
+    public Point get( int i ) {
+        int offset = 0;
+        for ( Points points : pointsList ) {
+            if ( i - offset < points.size() ) {
+                return points.get( i - offset );
+            }
+            offset += points.size();
+        }
+        throw new NoSuchElementException();
+    }
+
+    
+    public double[] getAsArray() {
+        double[] coords = new double[getDimension() * size()];
+        int i = 0;
+        for ( Point p : this ) {
+            for ( double coord : p.getAsArray() ) {
+                coords[i++] = coord;
+            }
+        }
+        return coords;
+    }
+
+    
+    public int getDimension() {
+        return pointsList.get( 0 ).getDimension();
+    }
+
+    
+    public int size() {
+        int size = 0;
+        for ( Points points : pointsList ) {
+            size += points.size();
+        }
+        return size;
+    }
+
+    
+    public Iterator<Point> iterator() {
+        return new Iterator<Point>() {
+
+            private Iterator<Points> pointsListIter = pointsList.iterator();
+
+            private Iterator<Point> currentIter = pointsListIter.next().iterator();
+
+            
+            public boolean hasNext() {
+                if ( currentIter.hasNext() ) {
+                    return true;
+                }
+                return pointsListIter.hasNext();
+            }
+
+            
+            public Point next() {
+                if ( !hasNext() ) {
+                    throw new NoSuchElementException();
+                }
+                if ( currentIter.hasNext() ) {
+                    return currentIter.next();
+                }
+                currentIter = pointsListIter.next().iterator();
+                return currentIter.next();
+            }
+
+            
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
+        };
+    }
+
+    
+    public Point getEndPoint() {
+        Points p = pointsList.get( pointsList.size() - 1 );
+        return p.getEndPoint();
+    }
+
+    
+    public Point getStartPoint() {
+        return get( 0 );
+    }
+
+    // -----------------------------------------------------------------------
+    // Implementation of JTS methods
+    // -----------------------------------------------------------------------
+
+    
+    public Envelope expandEnvelope( Envelope env ) {
+        for ( Point p : this ) {
+            env.expandToInclude( p.get0(), p.get1() );
+        }
+        return env;
+    }
+
+    
+    public Coordinate getCoordinate( int index ) {
+        Point point = get( index );
+        return new Coordinate( point.get0(), point.get1(), point.get2() );
+    }
+
+    
+    public void getCoordinate( int index, Coordinate coord ) {
+        Point point = get( index );
+        coord.x = point.get0();
+        coord.y = point.get1();
+        coord.z = point.get2();
+    }
+
+    
+    public Coordinate getCoordinateCopy( int index ) {
+        Point point = get( index );
+        return new Coordinate( point.get0(), point.get1(), point.get2() );
+    }
+
+    
+    public double getOrdinate( int index, int ordinateIndex ) {
+        return get( index ).get( ordinateIndex );
+    }
+
+    
+    public double getX( int index ) {
+        return get( index ).get0();
+    }
+
+    
+    public double getY( int index ) {
+        return get( index ).get1();
+    }
+
+    
+    public void setOrdinate( int index, int ordinateIndex, double value ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Coordinate[] toCoordinateArray() {
+        Coordinate[] coords = new Coordinate[size()];
+        int i = 0;
+        for ( Point p : this ) {
+            coords[i++] = new Coordinate( p.get0(), p.get1() );
+        }
+        return coords;
+    }
+
+    
+    public Object clone() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultCurve.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultCurve.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultCurve.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,192 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.commons.utils.Pair;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.deegree.geometry.standard.points.PointsPoints;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Curve;
+import org.osgeo.geometry.primitive.LineString;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.CurveSegment;
+import org.osgeo.geometry.primitive.segments.LineStringSegment;
+import org.osgeo.geometry.primitive.segments.CurveSegment.CurveSegmentType;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+/**
+ * Default implementation of {@link Curve}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultCurve extends AbstractDefaultGeometry implements Curve {
+
+    private List<CurveSegment> segments;
+
+    /**
+     * Creates a new {@link DefaultCurve} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param segments
+     *            segments that constitute the curve (never null)
+     */
+    public DefaultCurve( String id, CRS crs, PrecisionModel pm, List<CurveSegment> segments ) {
+        super( id, crs, pm );
+        this.segments = new ArrayList<CurveSegment>( segments );
+    }
+
+    
+    public int getCoordinateDimension() {
+        return segments.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public Pair<Point, Point> getBoundary() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<CurveSegment> getCurveSegments() {
+        return segments;
+    }
+
+    
+    public DefaultMeasure getLength( Unit requestedUnit ) {
+        // TODO respect requested unit
+        double length = ( (com.vividsolutions.jts.geom.LineString) getJTSGeometry() ).getLength();
+        return new DefaultMeasure( Double.toString( length), null );
+    }
+
+    
+    public boolean isClosed() {
+        return getStartPoint().equals( getEndPoint() );
+    }
+
+    
+    public LineString getAsLineString() {
+        if ( segments.size() != 1 && !( segments.get( 0 ) instanceof LineString ) ) {
+            throw new UnsupportedOperationException();
+        }
+        return new DefaultLineString( null, getCoordinateSystem(), pm,
+                                      ( (LineStringSegment) segments.get( 0 ) ).getControlPoints() );
+    }
+
+    
+    public CurveType getCurveType() {
+        return CurveType.Curve;
+    }
+
+    
+    public Point getStartPoint() {
+        return segments.get( 0 ).getStartPoint();
+    }
+
+    
+    public Point getEndPoint() {
+        return segments.get( segments.size() - 1 ).getEndPoint();
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Curve;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public Points getControlPoints() {
+        if ( segments.size() == 1 ) {
+            CurveSegment segment = segments.get( 0 );
+            if ( segment.getSegmentType() == CurveSegmentType.LINE_STRING_SEGMENT ) {
+                return ( (LineStringSegment) segment ).getControlPoints();
+            }
+            throw new IllegalArgumentException( "CURVE_CONTAINS_LINEAR_SEGMENT" );
+        }
+
+        List<Points> pointsList = new ArrayList<Points>( segments.size() );
+        for ( CurveSegment segment : segments ) {
+            if ( segment.getSegmentType() == CurveSegmentType.LINE_STRING_SEGMENT ) {
+                pointsList.add( ( (LineStringSegment) segment ).getControlPoints() );
+            } else {
+                throw new IllegalArgumentException( "CURVE_CONTAINS_LINEAR_SEGMENTS" );
+            }
+        }
+        return new PointsPoints( pointsList );
+    }
+
+    
+    protected com.vividsolutions.jts.geom.Geometry buildJTSGeometry() {
+        throw new UnsupportedOperationException("Cannot generically convert curves to JTS geometries atm");
+//        CurveLinearizer linearizer = new CurveLinearizer( new GeometryFactory() );
+//        // TODO how to determine a feasible linearization criterion?
+//        LinearizationCriterion crit = new NumPointsCriterion( 100 );
+//        List<Coordinate> coords = new LinkedList<Coordinate>();
+//        for ( CurveSegment segment : segments ) {
+//            LineStringSegment lsSegment = linearizer.linearize( segment, crit );
+//            coords.addAll( getCoordinates( lsSegment ) );
+//        }
+//        return jtsFactory.createLineString( coords.toArray( new Coordinate[coords.size()] ) );
+    }
+
+    private Collection<Coordinate> getCoordinates( LineStringSegment lsSegment ) {
+        Points points = lsSegment.getControlPoints();
+        List<Coordinate> coordinates = new ArrayList<Coordinate>( points.size() );
+        for ( Point point : points ) {
+            coordinates.add( new Coordinate( point.get0(), point.get1(), point.get2() ) );
+        }
+        return coordinates;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLineString.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLineString.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLineString.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,96 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.Collections;
+
+import org.deegree.geometry.standard.curvesegments.DefaultLineStringSegment;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.LineString;
+import org.osgeo.geometry.primitive.segments.CurveSegment;
+import org.osgeo.geometry.primitive.segments.LineStringSegment;
+
+/**
+ * Default implementation of {@link LineString}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultLineString extends DefaultCurve implements LineString {
+
+    private LineStringSegment singleSegment;
+
+    /**
+     *
+     * @param id
+     * @param crs
+     * @param pm
+     * @param controlPoints
+     */
+    public DefaultLineString( String id, CRS crs, PrecisionModel pm, Points controlPoints ) {
+        super( id, crs, pm, Collections.singletonList( (CurveSegment) new DefaultLineStringSegment( controlPoints ) ) );
+        singleSegment = (LineStringSegment) getCurveSegments().get( 0 );
+    }
+
+    
+    public CurveType getCurveType() {
+        return CurveType.LineString;
+    }
+
+    
+    public Points getControlPoints() {
+        return singleSegment.getControlPoints();
+    }
+
+    
+    public int getCoordinateDimension() {
+        return singleSegment.getCoordinateDimension();
+    }
+
+    
+    public LineString getAsLineString() {
+        return this;
+    }
+    
+    
+    protected com.vividsolutions.jts.geom.Geometry buildJTSGeometry() {
+        return jtsFactory.createLineString(toCoordinateSequence(singleSegment.getControlPoints()));
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLinearRing.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLinearRing.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultLinearRing.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,103 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import org.deegree.geometry.standard.curvesegments.DefaultLineStringSegment;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.LineString;
+import org.osgeo.geometry.primitive.LinearRing;
+import org.osgeo.geometry.primitive.Ring;
+
+/**
+ * Default implementation of {@link Ring}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultLinearRing extends DefaultRing implements LinearRing {
+
+    private Points controlPoints;
+
+    /**
+     * Creates a new <code>DefaultLinearRing</code> instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param controlPoints
+     */
+    public DefaultLinearRing( String id, CRS crs, PrecisionModel pm, Points controlPoints ) {
+        super( id, crs, pm, new DefaultLineStringSegment( controlPoints ) );
+        this.controlPoints = controlPoints;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return controlPoints.getDimension();
+    }
+
+    
+    public CurveType getCurveType() {
+        return CurveType.Ring;
+    }
+
+    
+    public RingType getRingType() {
+        return RingType.LinearRing;
+    }
+
+    
+    public LineString getAsLineString() {
+        return (LineString) members.get( 0 );
+    }
+
+    
+    public Points getControlPoints() {
+        return ( (LineString) members.get( 0 ) ).getControlPoints();
+    }
+
+    
+    protected com.vividsolutions.jts.geom.LinearRing buildJTSGeometry() {
+        return jtsFactory.createLinearRing(toCoordinateSequence(controlPoints));
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableCurve.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableCurve.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableCurve.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,278 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard.primitive;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.commons.utils.Pair;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.Envelope;
+import org.osgeo.geometry.Geometry;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Curve;
+import org.osgeo.geometry.primitive.LineString;
+import org.osgeo.geometry.primitive.OrientableCurve;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.segments.CurveSegment;
+
+/**
+ * Default implementation of {@link OrientableCurve}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultOrientableCurve extends AbstractDefaultGeometry implements OrientableCurve {
+
+    private String id;
+
+    private CRS crs;
+
+    private Curve baseCurve;
+
+    private boolean isReversed;
+
+    /**
+     * Creates a new <code>DefaultOrientableCurve</code> instance from the given parameters.
+     *
+     * @param id
+     *            identifier of the created geometry object
+     * @param crs
+     *            coordinate reference system
+     * @param baseCurve
+     *            base curve
+     * @param isReversed
+     *            set to true, if the order of the base curve shall be reversed
+     */
+    public DefaultOrientableCurve( String id, CRS crs, Curve baseCurve, boolean isReversed ) {
+        super (id, crs, null);
+        this.baseCurve = baseCurve;
+        this.isReversed = isReversed;
+    }
+
+    
+    public String getId() {
+        return id;
+    }
+
+    
+    public CRS getCoordinateSystem() {
+        return crs;
+    }
+
+    
+    public LineString getAsLineString() {
+        return baseCurve.getAsLineString();
+    }
+
+    
+    public List<CurveSegment> getCurveSegments() {
+        return baseCurve.getCurveSegments();
+    }
+
+    
+    public CurveType getCurveType() {
+        return CurveType.OrientableCurve;
+    }
+
+    
+    public Curve getBaseCurve() {
+        return baseCurve;
+    }
+
+    
+    public boolean isReversed() {
+        return isReversed;
+    }
+
+    
+    public Point getEndPoint() {
+        if ( isReversed ) {
+            return baseCurve.getStartPoint();
+        }
+        return baseCurve.getEndPoint();
+    }
+
+    
+    public Point getStartPoint() {
+        if ( isReversed ) {
+            return baseCurve.getEndPoint();
+        }
+        return baseCurve.getStartPoint();
+    }
+
+    // -----------------------------------------------------------------------
+    // Curve methods that are just delegated to the wrapped base curve
+    // -----------------------------------------------------------------------
+
+    
+    public boolean contains( Geometry geometry ) {
+        return baseCurve.contains( geometry );
+    }
+
+    
+    public boolean crosses( Geometry geometry ) {
+        return baseCurve.crosses( geometry );
+    }    
+    
+    
+    public Geometry getDifference( Geometry geometry ) {
+        return baseCurve.getDifference( geometry );
+    }
+
+    
+    public Measure getDistance( Geometry geometry, Unit requestedUnit ) {
+        return baseCurve.getDistance( geometry, requestedUnit );
+    }
+
+    
+    public boolean equals( Geometry geometry ) {
+        return baseCurve.equals( geometry );
+    }
+
+    
+    public Pair<Point,Point> getBoundary() {
+        return baseCurve.getBoundary();
+    }
+
+    
+    public Geometry getBuffer( DefaultMeasure distance ) {
+        return baseCurve.getBuffer( distance );
+    }
+
+    
+    public Geometry getConvexHull() {
+        return baseCurve.getConvexHull();
+    }
+
+    
+    public int getCoordinateDimension () {
+        return baseCurve.getCoordinateDimension();
+    }
+
+    
+    public Envelope getEnvelope() {
+        return baseCurve.getEnvelope();
+    }
+
+    
+    public Measure getLength( Unit requestedUnit ) {
+        return baseCurve.getLength( requestedUnit );
+    }
+
+    
+    public PrecisionModel getPrecision() {
+        return ((AbstractDefaultGeometry) baseCurve).getPrecision();
+    }
+
+    
+    public Geometry getIntersection( Geometry geometry ) {
+        return baseCurve.getIntersection( geometry );
+    }
+
+    
+    public boolean intersects( Geometry geometry ) {
+        return baseCurve.intersects( geometry );
+    }
+
+    
+    public boolean isDisjoint( Geometry geometry ) {
+        return baseCurve.isDisjoint( geometry );
+    }
+
+    
+    public boolean overlaps( Geometry geometry ) {
+        return baseCurve.overlaps( geometry );
+    }
+
+    
+    public boolean touches( Geometry geometry ) {
+        return baseCurve.touches( geometry );
+    }    
+    
+    
+    public boolean isBeyond( Geometry geometry, DefaultMeasure distance ) {
+        return baseCurve.isBeyond( geometry, distance );
+    }
+
+    
+    public boolean isClosed() {
+        return baseCurve.isClosed();
+    }
+
+    
+    public boolean isWithin( Geometry geometry ) {
+        return baseCurve.isWithin( geometry );
+    }
+
+    
+    public boolean isWithinDistance( Geometry geometry, DefaultMeasure distance ) {
+        return baseCurve.isWithinDistance( geometry, distance );
+    }
+
+    
+    public Geometry getUnion( Geometry geometry ) {
+        return baseCurve.getUnion( geometry );
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Curve;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public Points getControlPoints() {
+        throw new RuntimeException( "not implemented yet" );
+    }
+
+    
+    public com.vividsolutions.jts.geom.Geometry getJTSGeometry() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableSurface.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableSurface.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultOrientableSurface.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,241 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard.primitive;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.Envelope;
+import org.osgeo.geometry.Geometry;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.OrientableSurface;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.Surface;
+import org.osgeo.geometry.primitive.patches.SurfacePatch;
+
+/**
+ * Default implementation of {@link OrientableSurface}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultOrientableSurface extends AbstractDefaultGeometry implements OrientableSurface {
+
+    private String id;
+
+    private CRS crs;
+
+    private Surface baseSurface;
+
+    private boolean isReversed;
+
+    /**
+     * Creates a new <code>DefaultOrientableSurface</code> instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param baseSurface
+     *            base surface
+     * @param isReversed
+     *            set to true, if the orientation of the base Surface shall be reversed
+     */
+    public DefaultOrientableSurface( String id, CRS crs, Surface baseSurface, boolean isReversed ) {
+        super( id, crs, null );
+        this.baseSurface = baseSurface;
+        this.isReversed = isReversed;
+    }
+
+    
+    public String getId() {
+        return id;
+    }
+
+    
+    public CRS getCoordinateSystem() {
+        return crs;
+    }
+
+    
+    public SurfaceType getSurfaceType() {
+        return SurfaceType.OrientableSurface;
+    }
+
+    
+    public Surface getBaseSurface() {
+        return baseSurface;
+    }
+
+    
+    public boolean isReversed() {
+        return isReversed;
+    }
+
+    // -----------------------------------------------------------------------
+    // Surface methods that are just delegated to the wrapped base surface
+    // -----------------------------------------------------------------------
+
+    public boolean contains( Geometry geometry ) {
+        return baseSurface.contains( geometry );
+    }
+
+    
+    public boolean crosses( Geometry geometry ) {
+        return baseSurface.crosses( geometry );
+    }
+
+    public Geometry getDifference( Geometry geometry ) {
+        return baseSurface.getDifference( geometry );
+    }
+
+    
+    public Measure getDistance( Geometry geometry, Unit requestedUnit ) {
+        return baseSurface.getDistance( geometry, requestedUnit );
+    }
+
+    public boolean equals( Geometry geometry ) {
+        return baseSurface.equals( geometry );
+    }
+
+    public Measure getArea( Unit requestedBaseUnit ) {
+        return baseSurface.getArea( requestedBaseUnit );
+    }
+
+    public Geometry getBuffer( DefaultMeasure distance ) {
+        return baseSurface.getBuffer( distance );
+    }
+
+    public Point getCentroid() {
+        return baseSurface.getCentroid();
+    }
+
+    public Geometry getConvexHull() {
+        return baseSurface.getConvexHull();
+    }
+
+    
+    public int getCoordinateDimension() {
+        return baseSurface.getCoordinateDimension();
+    }
+
+    public Envelope getEnvelope() {
+        return baseSurface.getEnvelope();
+    }
+
+    public GeometryType getGeometryType() {
+        return baseSurface.getGeometryType();
+    }
+
+    public List<? extends SurfacePatch> getPatches() {
+        return baseSurface.getPatches();
+    }
+
+    public Measure getPerimeter( Unit requestedUnit ) {
+        return baseSurface.getPerimeter( requestedUnit );
+    }
+
+    public PrecisionModel getPrecision() {
+        return ((AbstractDefaultGeometry) baseSurface).getPrecision();
+    }
+
+    public PrimitiveType getPrimitiveType() {
+        return baseSurface.getPrimitiveType();
+    }
+
+    public Geometry getIntersection( Geometry geometry ) {
+        return baseSurface.getIntersection( geometry );
+    }
+
+    public boolean intersects( Geometry geometry ) {
+        return baseSurface.intersects( geometry );
+    }
+
+    
+    public boolean isDisjoint( Geometry geometry ) {
+        return baseSurface.isDisjoint( geometry );
+    }
+
+    
+    public boolean overlaps( Geometry geometry ) {
+        return baseSurface.overlaps( geometry );
+    }
+
+    
+    public boolean touches( Geometry geometry ) {
+        return baseSurface.touches( geometry );
+    }
+
+    public boolean isBeyond( Geometry geometry, DefaultMeasure distance ) {
+        return baseSurface.isBeyond( geometry, distance );
+    }
+
+    public boolean isWithin( Geometry geometry ) {
+        return baseSurface.isWithin( geometry );
+    }
+
+    public boolean isWithinDistance( Geometry geometry, DefaultMeasure distance ) {
+        return baseSurface.isWithinDistance( geometry, distance );
+    }
+
+    public Geometry getUnion( Geometry geometry ) {
+        return baseSurface.getUnion( geometry );
+    }
+
+    
+    public Points getExteriorRingCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Points> getInteriorRingsCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public com.vividsolutions.jts.geom.Geometry getJTSGeometry() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPoint.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPoint.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPoint.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,172 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.deegree.geometry.standard.DefaultEnvelope;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.Envelope;
+import org.osgeo.geometry.Geometry;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Point;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+/**
+ * Default implementation of {@link Point}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider</a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultPoint extends AbstractDefaultGeometry implements org.osgeo.geometry.primitive.Point {
+
+    private double[] coordinates;
+
+    /**
+     * Creates a new <code>DefaultPoint</code> instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param coordinates
+     *            coordinates of the point
+     */
+    public DefaultPoint( String id, CRS crs, PrecisionModel pm, double[] coordinates ) {
+        super( id, crs, pm );
+        this.coordinates = coordinates;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Point;
+    }
+
+    
+    public double get( int dimension ) {
+        if ( coordinates.length > dimension && dimension >= 0 ) {
+            return coordinates[dimension];
+        }
+        throw new IndexOutOfBoundsException();
+    }
+
+    
+    public double[] getAsArray() {
+        return coordinates;
+    }
+
+    
+    public double get0() {
+        return coordinates[0];
+    }
+
+    
+    public double get1() {
+        return coordinates[1];
+    }
+
+    
+    public double get2() {
+        if ( coordinates.length > 2 ) {
+            return coordinates[2];
+        }
+        return Double.NaN;
+    }
+
+    
+    public boolean equals( Geometry geometry ) {
+        if ( !( geometry instanceof Point ) ) {
+            return false;
+        }
+        double[] coordinates = ( (Point) geometry ).getAsArray();
+        if ( coordinates.length != this.coordinates.length ) {
+            return false;
+        }
+        for ( int i = 0; i < coordinates.length; i++ ) {
+            if ( !( coordinates[i] == this.coordinates[i] ) ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return coordinates.length;
+    }
+
+    
+    public Envelope getEnvelope() {
+        return new DefaultEnvelope( null, crs, pm, this, this );
+    }
+
+    
+    public String toString() {
+        String s = "(" + coordinates[0];
+        for ( int i = 1; i < coordinates.length; i++ ) {
+            s += "," + coordinates[i];
+        }
+        s += ")";
+        return s;
+    }
+
+    
+    protected com.vividsolutions.jts.geom.Point buildJTSGeometry() {
+        Coordinate coords = null;
+        if ( coordinates.length == 2 ) {
+            coords = new Coordinate( coordinates[0], coordinates[1] );
+        } else if ( coordinates.length == 3 ) {
+            coords = new Coordinate( coordinates[0], coordinates[1], coordinates[2] );
+        } else {
+            throw new UnsupportedOperationException();
+        }
+        return jtsFactory.createPoint( coords );
+    }
+
+
+    public void setAsArray(double[] ordinates) {
+        this.coordinates = ordinates;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolygon.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolygon.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolygon.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,124 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.deegree.geometry.standard.surfacepatches.DefaultPolygonPatch;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.geometry.Envelope;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Polygon;
+import org.osgeo.geometry.primitive.Ring;
+import org.osgeo.geometry.primitive.patches.PolygonPatch;
+
+import com.vividsolutions.jts.geom.LinearRing;
+
+/**
+ * Default implementation of {@link Polygon}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultPolygon extends DefaultSurface implements Polygon {
+
+    private Ring exteriorRing;
+
+    private List<Ring> interiorRings;
+
+    private Envelope envelope;
+
+    /**
+     * Creates a new {@link DefaultPolygon} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param interiorRings
+     *            list of rings that define the inner boundaries, may be empty or null
+     */
+    public DefaultPolygon( String id, CRS crs, PrecisionModel pm, Ring exteriorRing, List<Ring> interiorRings ) {
+        super( id, crs, pm, createPatchList( exteriorRing, interiorRings ) );
+        this.exteriorRing = exteriorRing;
+        this.interiorRings = interiorRings;
+    }
+
+    private static List<PolygonPatch> createPatchList( Ring exteriorRing, List<Ring> interiorRings ) {
+        List<PolygonPatch> patches = new ArrayList<PolygonPatch>( 1 );
+        patches.add( new DefaultPolygonPatch( exteriorRing, interiorRings ) );
+        return patches;
+    }
+
+    
+    public Ring getExteriorRing() {
+        return exteriorRing;
+    }
+
+    
+    public List<Ring> getInteriorRings() {
+        return interiorRings;
+    }
+
+    
+    public SurfaceType getSurfaceType() {
+        return SurfaceType.Polygon;
+    }
+
+    
+    public List<PolygonPatch> getPatches() {
+        return (List<PolygonPatch>) patches;
+    }
+
+    
+    protected com.vividsolutions.jts.geom.Geometry buildJTSGeometry() {
+        LinearRing shell = (LinearRing) getAsDefaultGeometry( exteriorRing ).getJTSGeometry();
+        LinearRing[] holes = null;
+        if ( interiorRings != null ) {
+            holes = new LinearRing[interiorRings.size()];
+            int i = 0;
+            for ( Ring ring : interiorRings ) {
+                holes[i++] = (LinearRing) getAsDefaultGeometry( ring ).getJTSGeometry();
+            }
+        }
+        return jtsFactory.createPolygon( shell, holes );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolyhedralSurface.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolyhedralSurface.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultPolyhedralSurface.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,128 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.PolyhedralSurface;
+import org.osgeo.geometry.primitive.patches.PolygonPatch;
+
+/**
+ * Default implementation of {@link PolyhedralSurface}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultPolyhedralSurface extends AbstractDefaultGeometry implements PolyhedralSurface {
+
+    private List<PolygonPatch> patches;
+
+    /**
+     * Creates a new {@link DefaultPolyhedralSurface} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param patches
+     *            patches that constitute the surface
+     */
+    public DefaultPolyhedralSurface( String id, CRS crs, PrecisionModel pm, List<PolygonPatch> patches ) {
+        super( id, crs, pm );
+        this.patches = patches;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return patches.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getCentroid() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<PolygonPatch> getPatches() {
+        return patches;
+    }
+
+    
+    public DefaultMeasure getPerimeter( Unit requestedUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Surface;
+    }
+
+    
+    public SurfaceType getSurfaceType() {
+        return SurfaceType.PolyhedralSurface;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public Points getExteriorRingCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Points> getInteriorRingsCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultRing.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultRing.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultRing.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,245 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.commons.utils.Pair;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.deegree.geometry.standard.points.PointsPoints;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Curve;
+import org.osgeo.geometry.primitive.LineString;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.Ring;
+import org.osgeo.geometry.primitive.segments.CurveSegment;
+import org.osgeo.geometry.primitive.segments.LineStringSegment;
+import org.osgeo.geometry.primitive.segments.CurveSegment.CurveSegmentType;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+/**
+ * Default implementation of {@link Ring}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultRing extends AbstractDefaultGeometry implements Ring {
+
+    /** The constituting <code>Curve</code> instances. */
+    protected List<Curve> members;
+
+    /** The segments of all member curves. */
+    protected List<CurveSegment> segments = new LinkedList<CurveSegment>();
+
+    /**
+     * Creates a new <code>DefaultRing</code> instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param members
+     *            the <code>Curve</code>s that compose the <code>Ring</code>
+     */
+    public DefaultRing( String id, CRS crs, PrecisionModel pm, List<Curve> members ) {
+        super( id, crs, pm );
+        this.members = members;
+        for ( Curve curve : members ) {
+            segments.addAll( curve.getCurveSegments() );
+        }
+    }
+
+    /**
+     * Creates a new <code>DefaultRing</code> instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param segment
+     *            the segment that composes the <code>Ring</code>
+     */
+    public DefaultRing( String id, CRS crs, PrecisionModel pm, LineStringSegment segment ) {
+        super( id, crs, pm );
+        this.members = new ArrayList<Curve>( 1 );
+        this.members.add( new DefaultLineString( null, crs, pm, segment.getControlPoints() ) );
+        this.segments.add( segment );
+    }
+
+    /**
+     * Creates a new <code>DefaultRing</code> instance from a closed {@link DefaultLineString}.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param singleCurve
+     *            closed line string
+     */
+    protected DefaultRing( String id, CRS crs, PrecisionModel pm, DefaultLineString singleCurve ) {
+        super( id, crs, pm );
+        members = new ArrayList<Curve>( 1 );
+        members.add( singleCurve );
+        segments.addAll( singleCurve.getCurveSegments() );
+    }
+
+    
+    public int getCoordinateDimension() {
+        return members.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Curve;
+    }
+
+    
+    public RingType getRingType() {
+        return RingType.Ring;
+    }
+
+    
+    public LineString getAsLineString() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Pair<Point, Point> getBoundary() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<CurveSegment> getCurveSegments() {
+        return segments;
+    }
+
+    
+    public CurveType getCurveType() {
+        return CurveType.Ring;
+    }
+
+    
+    public DefaultMeasure getLength( Unit requestedUnit ) {
+        // TODO respect requested unit
+        double length = ( (com.vividsolutions.jts.geom.LineString) getJTSGeometry() ).getLength();
+        return new DefaultMeasure( Double.toString( length), null );
+    }
+
+    
+    public boolean isClosed() {
+        return getStartPoint().equals( getEndPoint() );
+    }
+
+    
+    public List<Curve> getMembers() {
+        return members;
+    }
+
+    
+    public Point getStartPoint() {
+        return segments.get( 0 ).getStartPoint();
+    }
+
+    
+    public Point getEndPoint() {
+        return segments.get( segments.size() - 1 ).getEndPoint();
+    }
+
+    
+    public Points getControlPoints() {
+        if ( segments.size() == 1 ) {
+            CurveSegment segment = segments.get( 0 );
+            if ( segment.getSegmentType() == CurveSegmentType.LINE_STRING_SEGMENT ) {
+                return ( (LineStringSegment) segment ).getControlPoints();
+            }
+            throw new IllegalArgumentException( "RING_CONTAINS_LINEAR_SEGMENT" );
+        }
+
+        List<Points> pointsList = new ArrayList<Points>( segments.size() );
+        for ( CurveSegment segment : segments ) {
+            if ( segment.getSegmentType() == CurveSegmentType.LINE_STRING_SEGMENT ) {
+                pointsList.add( ( (LineStringSegment) segment ).getControlPoints() );
+            } else {
+                throw new IllegalArgumentException( "RING_CONTAINS_LINEAR_SEGMENTS" );
+            }
+        }
+        return new PointsPoints( pointsList );
+    }
+
+    
+    protected com.vividsolutions.jts.geom.LinearRing buildJTSGeometry() {
+        throw new UnsupportedOperationException("Cannot convert rings to JTS geometries right now");
+//        CurveLinearizer linearizer = new CurveLinearizer( new GeometryFactory() );
+//        // TODO how to determine a feasible linearization criterion?
+//        LinearizationCriterion crit = new NumPointsCriterion( 100 );
+//        List<Coordinate> coords = new LinkedList<Coordinate>();
+//        for ( CurveSegment segment : segments ) {
+//            LineStringSegment lsSegment = linearizer.linearize( segment, crit );
+//            coords.addAll( getCoordinates( lsSegment ) );
+//        }
+//        return jtsFactory.createLinearRing( coords.toArray( new Coordinate[coords.size()] ) );
+    }
+
+    private Collection<Coordinate> getCoordinates( LineStringSegment lsSegment ) {
+        Points points = lsSegment.getControlPoints();
+        List<Coordinate> coordinates = new ArrayList<Coordinate>( points.size() );
+        for ( Point point : points ) {
+            coordinates.add( new Coordinate( point.get0(), point.get1(), point.get2() ) );
+        }
+        return coordinates;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSolid.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSolid.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSolid.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,121 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Solid;
+import org.osgeo.geometry.primitive.Surface;
+
+/**
+ * Default implementation of {@link Solid}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultSolid extends AbstractDefaultGeometry implements Solid {
+
+    private Surface exteriorSurface;
+
+    private List<Surface> interiorSurfaces;
+
+    /**
+     * Creates a new {@link DefaultSolid} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param exteriorSurface
+     *            the exterior surface (shell) of the solid, may be null
+     * @param interiorSurfaces
+     *            the interior surfaces of the solid, may be null or empty
+     */
+    public DefaultSolid( String id, CRS crs, PrecisionModel pm, Surface exteriorSurface, List<Surface> interiorSurfaces ) {
+        super( id, crs, pm );
+        this.exteriorSurface = exteriorSurface;
+        this.interiorSurfaces = interiorSurfaces;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return exteriorSurface.getCoordinateDimension();
+    }
+
+    
+    public Surface getExteriorSurface() {
+        return exteriorSurface;
+    }
+
+    
+    public List<Surface> getInteriorSurfaces() {
+        return interiorSurfaces;
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Solid;
+    }
+
+    
+    public SolidType getSolidType() {
+        return SolidType.Solid;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public DefaultMeasure getVolume( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSurface.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSurface.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultSurface.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,171 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Ring;
+import org.osgeo.geometry.primitive.Surface;
+import org.osgeo.geometry.primitive.patches.PolygonPatch;
+import org.osgeo.geometry.primitive.patches.SurfacePatch;
+
+import com.vividsolutions.jts.geom.LinearRing;
+
+/**
+ * Default implementation of {@link Surface}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultSurface extends AbstractDefaultGeometry implements Surface {
+
+    protected List<? extends SurfacePatch> patches;
+
+    /**
+     * Creates a new {@link DefaultSurface} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param patches
+     *            patches that constitute the surface
+     */
+    public DefaultSurface( String id, CRS crs, PrecisionModel pm, List<? extends SurfacePatch> patches ) {
+        super( id, crs, pm );
+        this.patches = patches;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return patches.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Surface;
+    }
+
+    
+    public SurfaceType getSurfaceType() {
+        return SurfaceType.Surface;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<? extends SurfacePatch> getPatches() {
+        return patches;
+    }
+
+    
+    public DefaultMeasure getPerimeter( Unit requestedUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Points getExteriorRingCoordinates() {
+        if ( patches.size() == 1 ) {
+            if ( patches.get( 0 ) instanceof PolygonPatch ) {
+                PolygonPatch patch = (PolygonPatch) patches.get( 0 );
+                return patch.getExteriorRing().getControlPoints();
+            }
+            throw new IllegalArgumentException( "SURFACE_IS_NON_PLANAR" );
+        }
+        throw new IllegalArgumentException( "SURFACE_MORE_THAN_ONE_PATCH" );
+    }
+
+    
+    public List<Points> getInteriorRingsCoordinates() {
+        List<Points> controlPoints = new ArrayList<Points>();
+        if ( patches.size() == 1 ) {
+            if ( patches.get( 0 ) instanceof PolygonPatch ) {
+                PolygonPatch patch = (PolygonPatch) patches.get( 0 );
+                List<Ring> interiorRings = patch.getInteriorRings();
+                for ( Ring ring : interiorRings ) {
+                    controlPoints.add( ring.getControlPoints() );
+                }
+            } else {
+                throw new IllegalArgumentException( "SURFACE_IS_NON_PLANAR" );
+            }
+        } else {
+            throw new IllegalArgumentException( "SURFACE_MORE_THAN_ONE_PATCH" );
+        }
+        return controlPoints;
+    }
+
+    
+    protected com.vividsolutions.jts.geom.Geometry buildJTSGeometry() {
+
+        if ( patches.size() != 1 || !( patches.get( 0 ) instanceof PolygonPatch ) ) {
+            throw new IllegalArgumentException( "SURFACE_NOT_EQUIVALENT_TO_POLYGON" );
+        }
+
+        PolygonPatch patch = (PolygonPatch) patches.get( 0 );
+        Ring exteriorRing = patch.getExteriorRing();
+        List<Ring> interiorRings = patch.getInteriorRings();
+
+        LinearRing shell = (LinearRing) getAsDefaultGeometry( exteriorRing ).getJTSGeometry();
+        LinearRing[] holes = null;
+        if ( interiorRings != null ) {
+            holes = new LinearRing[interiorRings.size()];
+            int i = 0;
+            for ( Ring ring : interiorRings ) {
+                holes[i++] = (LinearRing) getAsDefaultGeometry( ring ).getJTSGeometry();
+            }
+        }
+        return jtsFactory.createPolygon( shell, holes );
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTin.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTin.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTin.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,188 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Length;
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.Tin;
+import org.osgeo.geometry.primitive.patches.Triangle;
+import org.osgeo.geometry.primitive.segments.LineStringSegment;
+
+/**
+ * Default implementation of {@link Tin}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultTin extends AbstractDefaultGeometry implements Tin {
+
+    private List<Triangle> patches;
+
+    private List<List<LineStringSegment>> stopLines;
+
+    private List<List<LineStringSegment>> breakLines;
+
+    private Length maxLength;
+
+    private Points controlPoints;
+
+    /**
+     * Creates a new {@link DefaultTin} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param patches
+     *            the triangle that constitute the result of the triangulation
+     */
+    public DefaultTin( String id, CRS crs, PrecisionModel pm, List<Triangle> patches ) {
+        super( id, crs, pm );
+        this.patches = patches;
+    }
+
+    /**
+     * Creates a new {@link DefaultTin} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param stopLines
+     * @param breakLines
+     * @param maxLength
+     * @param controlPoints
+     * @param patches
+     *            the triangle that constitute the result of the triangulation
+     */
+    public DefaultTin( String id, CRS crs, PrecisionModel pm, List<List<LineStringSegment>> stopLines,
+                       List<List<LineStringSegment>> breakLines, Length maxLength, Points controlPoints,
+                       List<Triangle> patches ) {
+        super( id, crs, pm );
+        this.stopLines = stopLines;
+        this.breakLines = breakLines;
+        this.maxLength = maxLength;
+        this.controlPoints = controlPoints;
+        this.patches = patches;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return patches.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getCentroid() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Triangle> getPatches() {
+        if ( patches == null )
+            throw new UnsupportedOperationException();
+        return patches;
+    }
+
+    
+    public DefaultMeasure getPerimeter( Unit requestedUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Surface;
+    }
+
+    
+    public SurfaceType getSurfaceType() {
+        return SurfaceType.Tin;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public List<List<LineStringSegment>> getStopLines() {
+        return stopLines;
+    }
+
+    
+    public List<List<LineStringSegment>> getBreakLines() {
+        return breakLines;
+    }
+
+    
+    public Measure getMaxLength(Unit requestedUnit) {
+        return maxLength;
+    }
+
+    
+    public Points getControlPoints() {
+        return controlPoints;
+    }
+
+    
+    public Points getExteriorRingCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Points> getInteriorRingsCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTriangulatedSurface.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTriangulatedSurface.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/primitive/DefaultTriangulatedSurface.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,128 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.primitive;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.deegree.geometry.standard.AbstractDefaultGeometry;
+import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.precision.PrecisionModel;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.TriangulatedSurface;
+import org.osgeo.geometry.primitive.patches.Triangle;
+
+/**
+ * Default implementation of {@link TriangulatedSurface}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultTriangulatedSurface extends AbstractDefaultGeometry implements TriangulatedSurface {
+
+    private List<Triangle> patches;
+
+    /**
+     * Creates a new {@link DefaultTriangulatedSurface} instance from the given parameters.
+     *
+     * @param id
+     *            identifier, may be null
+     * @param crs
+     *            coordinate reference system, may be null
+     * @param pm
+     *            precision model, may be null
+     * @param patches
+     *            patches that constitute the surface
+     */
+    public DefaultTriangulatedSurface( String id, CRS crs, PrecisionModel pm, List<Triangle> patches ) {
+        super( id, crs, pm );
+        this.patches = patches;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return patches.get( 0 ).getCoordinateDimension();
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Point getCentroid() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Triangle> getPatches() {
+        return patches;
+    }
+
+    
+    public DefaultMeasure getPerimeter( Unit requestedUnit ) {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public PrimitiveType getPrimitiveType() {
+        return PrimitiveType.Surface;
+    }
+
+    
+    public SurfaceType getSurfaceType() {
+        return SurfaceType.TriangulatedSurface;
+    }
+
+    
+    public GeometryType getGeometryType() {
+        return GeometryType.PRIMITIVE_GEOMETRY;
+    }
+
+    
+    public Points getExteriorRingCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Points> getInteriorRingsCoordinates() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCone.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCone.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCone.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,114 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard.surfacepatches;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.patches.Cone;
+
+/**
+ * TODO add class documentation here.
+ *
+ * @author <a href="mailto:[hidden email]">Andrei Ionita</a>
+ * @author last edited by: $Author: ionita $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class DefaultCone implements Cone {
+
+    private List<Points> grid;
+
+    private int rows;
+
+    private int columns;
+
+    public DefaultCone( List<Points> grid ) {
+        this.grid = grid;
+        this.rows = getNumRows();
+        this.columns = getNumColumns();
+    }
+
+    public DefaultCone( List<Points> grid, int rows, int columns ) {
+        this.grid = grid;
+        this.rows = rows;
+        this.columns = columns;
+    }
+
+    
+    public GriddedSurfaceType getGriddedSurfaceType() {
+        return GriddedSurfaceType.CONE;
+    }
+
+    
+    public int getNumColumns() {
+        return grid.get( 0 ).size();
+    }
+
+    
+    public int getNumRows() {
+        return grid.size();
+    }
+
+    
+    public Points getRow( int rownum ) {
+        return grid.get( rownum );
+    }
+
+    
+    public List<Points> getRows() {
+        return grid;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public SurfacePatchType getSurfacePatchType() {
+        return SurfacePatchType.GRIDDED_SURFACE_PATCH;
+    }
+
+    
+    public int getCoordinateDimension() {
+        return grid.get( 0 ).getDimension();
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCylinder.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCylinder.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultCylinder.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,115 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard.surfacepatches;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.patches.Cylinder;
+
+/**
+ * TODO add class documentation here.
+ *
+ * @author <a href="mailto:[hidden email]">Andrei Ionita</a>
+ * @author last edited by: $Author: ionita $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class DefaultCylinder implements Cylinder {
+
+    private List<Points> grid;
+
+    private int rows;
+
+    private int columns;
+
+    public DefaultCylinder( List<Points> grid ) {
+        this.grid = grid;
+        this.rows = getNumRows();
+        this.columns = getNumColumns();
+    }
+
+    public DefaultCylinder( List<Points> grid, int rows, int columns ) {
+        this.grid = grid;
+        this.rows = rows;
+        this.columns = columns;
+    }
+
+    
+    public GriddedSurfaceType getGriddedSurfaceType() {
+        return GriddedSurfaceType.CYLINDER;
+    }
+
+    
+    public int getNumColumns() {
+        return grid.get( 0 ).size();
+    }
+
+    
+    public int getNumRows() {
+        return grid.size();
+    }
+
+    
+    public Points getRow( int rownum ) {
+        return grid.get( rownum );
+    }
+
+    
+    public List<Points> getRows() {
+        return grid;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public int getCoordinateDimension() {
+        return grid.get( 0 ).getDimension();
+    }
+
+    
+    public SurfacePatchType getSurfacePatchType() {
+        return SurfacePatchType.GRIDDED_SURFACE_PATCH;
+    }
+
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultGriddedSurfacePatch.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultGriddedSurfacePatch.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultGriddedSurfacePatch.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,114 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard.surfacepatches;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.patches.GriddedSurfacePatch;
+
+/**
+ * TODO add class documentation here.
+ *
+ * @author <a href="mailto:[hidden email]">Andrei Ionita</a>
+ * @author last edited by: $Author: ionita $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class DefaultGriddedSurfacePatch implements GriddedSurfacePatch {
+
+    private List<Points> grid;
+
+    private int rows;
+
+    private int columns;
+
+    public DefaultGriddedSurfacePatch( List<Points> grid, int rows, int columns ) {
+        this.grid = grid;
+        this.rows = rows;
+        this.columns = columns;
+    }
+
+    public DefaultGriddedSurfacePatch( List<Points> grid ) {
+        this.grid = grid;
+        this.rows = getNumRows();
+        this.columns = getNumColumns();
+    }
+
+    
+    public GriddedSurfaceType getGriddedSurfaceType() {
+        return GriddedSurfaceType.GRIDDED_SURFACE_PATCH;
+    }
+
+    
+    public int getNumColumns() {
+        return grid.get( 0 ).size();
+    }
+
+    
+    public int getNumRows() {
+        return grid.size();
+    }
+
+    
+    public Points getRow( int rownum ) {
+        return grid.get( rownum );
+    }
+
+    
+    public List<Points> getRows() {
+        return grid;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public int getCoordinateDimension() {
+        return grid.get( 0 ).getDimension();
+    }
+
+    
+    public SurfacePatchType getSurfacePatchType() {
+        return SurfacePatchType.GRIDDED_SURFACE_PATCH;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultPolygonPatch.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultPolygonPatch.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultPolygonPatch.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,116 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+ Department of Geography, University of Bonn
+ and
+ lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+ ----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.surfacepatches;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.primitive.Ring;
+import org.osgeo.geometry.primitive.patches.PolygonPatch;
+
+/**
+ * Default implementation of {@link PolygonPatch}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultPolygonPatch implements PolygonPatch {
+
+    private Ring exteriorRing;
+
+    private List<Ring> interiorRings;
+
+    private List<Ring> allBoundaries;
+
+    /**
+     * Creates a new {@link DefaultPolygonPatch} instance from the given parameters.
+     *
+     * @param exteriorRing
+     *            ring that defines the outer boundary, may be null (see section 9.2.2.5 of GML spec)
+     * @param interiorRings
+     *            list of rings that define the inner boundaries, may be empty or null
+     */
+    public DefaultPolygonPatch( Ring exteriorRing, List<Ring> interiorRings ) {
+        this.exteriorRing = exteriorRing;
+        this.interiorRings = interiorRings;
+        if ( interiorRings == null ) {
+            this.interiorRings = Collections.emptyList();
+        }
+        this.allBoundaries = new LinkedList<Ring>();
+        if ( exteriorRing != null ) {
+            allBoundaries.add( exteriorRing );
+        }
+        if ( interiorRings != null ) {
+            allBoundaries.addAll( interiorRings );
+        }
+    }
+
+    
+    public int getCoordinateDimension() {
+        return exteriorRing.getCoordinateDimension();
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Ring getExteriorRing() {
+        return exteriorRing;
+    }
+
+    
+    public List<Ring> getInteriorRings() {
+        return interiorRings;
+    }
+
+    
+    public List<Ring> getBoundaryRings() {
+        return allBoundaries;
+    }
+
+    
+    public SurfacePatchType getSurfacePatchType() {
+        return SurfacePatchType.POLYGON_PATCH;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultRectangle.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultRectangle.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultRectangle.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,124 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.surfacepatches;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.primitive.LinearRing;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.Ring;
+import org.osgeo.geometry.primitive.patches.Rectangle;
+
+/**
+ * Default implementation of {@link Rectangle}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultRectangle implements Rectangle {
+
+    private LinearRing exterior;
+
+    /**
+     * Creates a new {@link DefaultRectangle} instance from the given parameters.
+     *
+     * @param exterior
+     *            ring that contains exactly five planar points, the first and last point must be identical
+     */
+    public DefaultRectangle( LinearRing exterior ) {
+        if (exterior.getControlPoints().size() != 5) {
+            String msg = "The exterior ring of a rectangle must contain exactly five points.";
+            throw new IllegalArgumentException(msg);
+        }
+        this.exterior = exterior;
+    }
+
+    
+    public LinearRing getExteriorRing() {
+        return exterior;
+    }
+
+    
+    public Point getPoint1() {
+        return exterior.getControlPoints().get( 0 );
+    }
+
+    
+    public Point getPoint2() {
+        return exterior.getControlPoints().get( 1 );
+    }
+
+    
+    public Point getPoint3() {
+        return exterior.getControlPoints().get( 2 );
+    }
+
+    
+    public Point getPoint4() {
+        return exterior.getControlPoints().get( 3 );
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public int getCoordinateDimension() {
+        return getPoint1().getCoordinateDimension();
+    }
+
+    
+    public List<Ring> getInteriorRings() {
+        return Collections.emptyList();
+    }
+
+    
+    public List<LinearRing> getBoundaryRings() {
+        return Collections.singletonList( exterior);
+    }
+
+    
+    public SurfacePatchType getSurfacePatchType() {
+        return SurfacePatchType.RECTANGLE;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultSphere.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultSphere.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultSphere.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,114 @@
+//$HeadURL: svn+ssh://[hidden email]/deegree/base/trunk/resources/eclipse/files_template.xml $
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+
+package org.deegree.geometry.standard.surfacepatches;
+
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
+import org.osgeo.geometry.primitive.patches.Sphere;
+
+/**
+ * TODO add class documentation here.
+ *
+ * @author <a href="mailto:[hidden email]">Andrei Ionita</a>
+ * @author last edited by: $Author: ionita $
+ *
+ * @version $Revision: $, $Date: $
+ */
+public class DefaultSphere implements Sphere {
+
+    private List<Points> grid;
+
+    private int rows;
+
+    private int columns;
+
+    public DefaultSphere( List<Points> grid ) {
+        this.grid = grid;
+        this.rows = getNumRows();
+        this.columns = getNumColumns();
+    }
+
+    public DefaultSphere( List<Points> grid, int rows, int columns ) {
+        this.grid = grid;
+        this.rows = rows;
+        this.columns = columns;
+    }
+
+    
+    public GriddedSurfaceType getGriddedSurfaceType() {
+        return GriddedSurfaceType.SPHERE;
+    }
+
+    
+    public int getNumColumns() {
+        return grid.get( 0 ).size();
+    }
+
+    
+    public int getNumRows() {
+        return grid.size();
+    }
+
+    
+    public Points getRow( int rownum ) {
+        return grid.get( rownum );
+    }
+
+    
+    public List<Points> getRows() {
+        return grid;
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public int getCoordinateDimension() {
+        return grid.get( 0 ).getDimension();
+    }
+
+    
+    public SurfacePatchType getSurfacePatchType() {
+        return SurfacePatchType.GRIDDED_SURFACE_PATCH;
+    }
+}

Added: branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultTriangle.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultTriangle.java                        (rev 0)
+++ branches/geometry/spike/geometry/src/main/java/org/deegree/geometry/standard/surfacepatches/DefaultTriangle.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -0,0 +1,119 @@
+//$HeadURL$
+/*----------------------------------------------------------------------------
+ This file is part of deegree, http://deegree.org/
+ Copyright (C) 2001-2009 by:
+   Department of Geography, University of Bonn
+ and
+   lat/lon GmbH
+
+ 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; either version 2.1 of the License, or (at your option)
+ any later version.
+ 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.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Contact information:
+
+ lat/lon GmbH
+ Aennchenstr. 19, 53177 Bonn
+ Germany
+ http://lat-lon.de/
+
+ Department of Geography, University of Bonn
+ Prof. Dr. Klaus Greve
+ Postfach 1147, 53001 Bonn
+ Germany
+ http://www.geographie.uni-bonn.de/deegree/
+
+ e-mail: [hidden email]
+----------------------------------------------------------------------------*/
+package org.deegree.geometry.standard.surfacepatches;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.deegree.commons.uom.DefaultMeasure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.primitive.LinearRing;
+import org.osgeo.geometry.primitive.Point;
+import org.osgeo.geometry.primitive.Ring;
+import org.osgeo.geometry.primitive.patches.Triangle;
+
+/**
+ * Default implementation of {@link Triangle}.
+ *
+ * @author <a href="mailto:[hidden email]">Markus Schneider </a>
+ * @author last edited by: $Author:$
+ *
+ * @version $Revision:$, $Date:$
+ */
+public class DefaultTriangle implements Triangle {
+
+    private LinearRing exterior;
+
+    /**
+     * Creates a new {@link DefaultTriangle} instance from the given parameters.
+     *
+     * @param exterior
+     *            ring that contains exactly four planar points, the first and last point must be identical
+     */
+    public DefaultTriangle( LinearRing exterior ) {
+        if (exterior.getControlPoints().size() != 4) {
+            String msg = "The exterior ring of a triangle must contain exactly four points.";
+            throw new IllegalArgumentException(msg);
+        }
+        this.exterior = exterior;
+    }
+
+    
+    public LinearRing getExteriorRing() {
+        return exterior;
+    }
+
+    
+    public Point getPoint1() {
+        return exterior.getControlPoints().get( 0 );
+    }
+
+    
+    public Point getPoint2() {
+        return exterior.getControlPoints().get( 1 );
+    }
+
+    
+    public Point getPoint3() {
+        return exterior.getControlPoints().get( 2 );
+    }
+
+    
+    public DefaultMeasure getArea( Unit requestedBaseUnit ) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public int getCoordinateDimension() {
+        return getPoint1().getCoordinateDimension();
+    }
+
+    
+    public List<Ring> getInteriorRings() {
+        return Collections.emptyList();
+    }
+
+    
+    public List<LinearRing> getBoundaryRings() {
+        return Collections.singletonList( exterior );
+    }
+
+    
+    public SurfacePatchType getSurfacePatchType() {
+        return SurfacePatchType.TRIANGLE;
+    }
+}

Modified: branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/Geometry.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/Geometry.java 2009-10-25 02:29:14 UTC (rev 34215)
+++ branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/Geometry.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -19,6 +19,9 @@
 
 import org.osgeo.commons.ObjectProperties;
 import org.osgeo.commons.crs.CRS;
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.primitive.Point;
 
 /**
  * Base interface for all vector geometry types.
@@ -96,9 +99,176 @@
     public int getCoordinateDimension();
     
     /**
+     * Tests whether this geometry contains the specified geometry.
+     *
+     * TODO formal explanation (DE9IM)
+     *
+     * @param geometry
+     *            the {@link Geometry} to test this {@link Geometry} against
+     * @return true if this {@link Geometry} contains <code>geometry</code>
+     */
+    public boolean contains( Geometry geometry );
+
+    /**
+     * Tests whether this geometry crosses the specified geometry.
+     *
+     * TODO formal explanation (DE9IM)
+     *
+     * @param geometry
+     *            the {@link Geometry} to test this {@link Geometry} against
+     * @return true if this {@link Geometry} crosses <code>geometry</code>
+     */
+    public boolean crosses( Geometry geometry );
+
+    /**
+     * Tests whether this geometry is equal to the specified geometry.
+     *
+     * TODO formal explanation (DE9IM)
+     *
+     * @param geometry
+     *            the {@link Geometry} to test this {@link Geometry} against
+     * @return true if this {@link Geometry} is equal to <code>geometry</code>
+     */
+    public boolean equals( Geometry geometry );
+
+    /**
+     * Tests whether this geometry intersects the specified geometry.
+     *
+     * TODO formal explanation (DE9IM)
+     *
+     * @param geometry
+     *            the {@link Geometry} to test this {@link Geometry} against
+     * @return true if this {@link Geometry} intersects <code>geometry</code>
+     */
+    public boolean intersects( Geometry geometry );
+
+    /**
+     * Tests whether this geometry is beyond a specified distance of a second geometry.
+     *
+     * @param geometry
+     *            second geometry
+     * @param distance
+     * @return true, iff the minimum distance between this and the second geometry is greater than <code>distance</code>
+     */
+    public boolean isBeyond( Geometry geometry, Measure distance );
+
+    /**
+     * Tests whether this geometry is disjoint from the specified geometry.
+     *
+     * TODO formal explanation (DE9IM)
+     *
+     * @param geometry
+     *            the {@link Geometry} to test this {@link Geometry} against
+     * @return true if this {@link Geometry} is disjoint from <code>geometry</code>
+     */
+    public boolean isDisjoint( Geometry geometry );
+
+    /**
+     * tests whether the value of a geometric is topological located within this geometry. This method is the opposite
+     * of {@link #contains(Geometry)} method
+     *
+     * @param geometry
+     * @return true if passed geometry is located completly within this geometry
+     */
+    public boolean isWithin( Geometry geometry );
+
+    /**
+     * Tests whether this geometry is within a specified distance of a second geometry.
+     *
+     * @param geometry
+     *            second geometry
+     * @param distance
+     * @return true, iff the distance between this and the second geometry is less than or equal <code>distance</code>
+     */
+    public boolean isWithinDistance( Geometry geometry, Measure distance );
+
+    /**
+     * Tests whether this geometry overlaps the specified geometry.
+     *
+     * TODO formal explanation (DE9IM)
+     *
+     * @param geometry
+     *            the {@link Geometry} to test this {@link Geometry} against
+     * @return true if this {@link Geometry} overlaps <code>geometry</code>
+     */
+    public boolean overlaps( Geometry geometry );
+
+    /**
+     * Tests whether this geometry touches the specified geometry.
+     *
+     * TODO formal explanation (DE9IM)
+     *
+     * @param geometry
+     *            the {@link Geometry} to test this {@link Geometry} against
+     * @return true if this {@link Geometry} touches <code>geometry</code>
+     */
+    public boolean touches( Geometry geometry );
+
+    /**
+     * Return a new {@link Geometry} that contains all points with a distance from this Geometry that is less than or
+     * equal to the specified distance.
+     *
+     * @param distance
+     * @return buffer geometry
+     */
+    public Geometry getBuffer( Measure distance );
+
+    /**
+     * Returns the centroid of the geometry.
+     *
+     * @return a {@link Point} that is the centroid of this geometry
+     */
+    public Point getCentroid();
+
+    /**
      * Returns the minimal bounding box of the geometry.
      *
      * @return the minimal bounding box of the geometry
      */
     public Envelope getEnvelope();
+
+    /**
+     * Returns the set-theoretic difference of this and the passed {@link Geometry}.
+     *
+     * @param geometry
+     *            other geometry, must not be null
+     * @return difference Geometry or <code>null</code> (empty set)
+     */
+    public Geometry getDifference( Geometry geometry );
+
+    /**
+     * Returns the set-theoretic intersection of this and the passed {@link Geometry}.
+     *
+     * @param geometry
+     *            other geometry, must not be null
+     * @return intersection Geometry or <code>null</code> (empty set)
+     */
+    public Geometry getIntersection( Geometry geometry );
+
+    /**
+     * Returns the set-theoretic union of this and the passed {@link Geometry}.
+     *
+     * @param geometry
+     *            other geometry, must not be null
+     * @return united Geometry (never null)
+     */
+    public Geometry getUnion( Geometry geometry );
+
+    /**
+     * Returns the convex hull of the geometry.
+     *
+     * @return convex hull of a Geometry
+     */
+    public Geometry getConvexHull();
+
+    /**
+     * Returns the minimum distance between this and the specified geometry.
+     *
+     * @param geometry
+     *            second geometry
+     * @param requestedUnits
+     *            unit of the
+     * @return shortest distance between the two geometries
+     */
+    public Measure getDistance( Geometry geometry, Unit requestedUnits );
 }

Modified: branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/SimpleGeometryBuilder.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/SimpleGeometryBuilder.java 2009-10-25 02:29:14 UTC (rev 34215)
+++ branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/SimpleGeometryBuilder.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -2,6 +2,12 @@
 
 import java.util.List;
 
+import org.deegree.geometry.standard.DefaultEnvelope;
+import org.deegree.geometry.standard.multi.DefaultMultiGeometry;
+import org.deegree.geometry.standard.multi.DefaultMultiLineString;
+import org.deegree.geometry.standard.multi.DefaultMultiPoint;
+import org.deegree.geometry.standard.multi.DefaultMultiPolygon;
+import org.deegree.geometry.standard.primitive.DefaultPoint;
 import org.osgeo.commons.crs.CRS;
 import org.osgeo.geometry.multi.MultiCurve;
 import org.osgeo.geometry.multi.MultiGeometry;

Modified: branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Curve.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Curve.java 2009-10-25 02:29:14 UTC (rev 34215)
+++ branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Curve.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -19,6 +19,9 @@
 
 import java.util.List;
 
+import org.deegree.commons.utils.Pair;
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
 import org.osgeo.geometry.composite.CompositeCurve;
 import org.osgeo.geometry.points.Points;
 import org.osgeo.geometry.primitive.segments.CurveSegment;
@@ -89,6 +92,15 @@
      * @return the end point of the curve
      */
     public Point getEndPoint();
+    
+    /**
+     * The boundary of a curve is the set of points at either end of the curve. If the curve is a cycle, the two ends
+     * are identical, and the curve (if topologically closed) is considered to not have a boundary.
+     *
+     * @return boundary of a curve. If a curve does not have a boundary because it is closed an empty {@link List} shall
+     *         be retruned
+     */
+    public Pair<Point, Point> getBoundary();
 
     /**
      * Returns the segments that constitute this curve.
@@ -118,4 +130,13 @@
      * @return a linear interpolated representation of the curve
      */
     public LineString getAsLineString();
+    
+    /**
+     *
+     * @param requestedUnit
+     * @return length of the curve
+     */
+    public Measure getLength( Unit requestedUnit );
+    
+    
 }

Modified: branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Surface.java
===================================================================
--- branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Surface.java 2009-10-25 02:29:14 UTC (rev 34215)
+++ branches/geometry/spike/geometry/src/main/java/org/osgeo/geometry/primitive/Surface.java 2009-10-25 02:31:25 UTC (rev 34216)
@@ -19,6 +19,9 @@
 
 import java.util.List;
 
+import org.osgeo.commons.uom.Measure;
+import org.osgeo.commons.uom.Unit;
+import org.osgeo.geometry.points.Points;
 import org.osgeo.geometry.primitive.patches.PolygonPatch;
 import org.osgeo.geometry.primitive.patches.SurfacePatch;
 import org.osgeo.geometry.primitive.patches.Triangle;
@@ -67,11 +70,53 @@
      * @return the type of surface
      */
     public SurfaceType getSurfaceType();
+
+    /**
+     *
+     * @param requestedBaseUnit
+     * @return area of the surface
+     */
+    public Measure getArea( Unit requestedBaseUnit );
 
     /**
+     *
+     * @param requestedUnit
+     * @return perimeter of the surface
+     */
+    public Measure getPerimeter( Unit requestedUnit );
+
+    /**
      * Returns the patches that constitute this surface.
      *
      * @return the patches that constitute this surface
      */
     public List<? extends SurfacePatch> getPatches();
+
+    /**
+     * Convenience method for accessing the control points of the exterior ring of a simple polygon surface.
+     * <p>
+     * NOTE: This method is only safe to use when the surface consists of a single planar patch that has a linear
+     * interpolated exterior ring.
+     * </p>
+     *
+     * @return the control points
+     * @throws IllegalArgumentException
+     *             if the surface has more than one patch, the patch is not planar or the exterior boundary is not
+     *             completely described by linear interpolated segments
+     */
+    public Points getExteriorRingCoordinates();
+
+    /**
+     * Convenience method for accessing the control points of the interior rings of a simple polygon surface.
+     * <p>
+     * NOTE: This method is only safe to use when the surface consists of a single planar patch that has linear
+     * interpolated interior rings.
+     * </p>
+     *
+     * @return the control points
+     * @throws IllegalArgumentException
+     *             if the surface has more than one patch, the patch is not planar or the interior boundaries are not
+     *             completely described by linear interpolated segments
+     */
+    public List<Points> getInteriorRingsCoordinates();
 }


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
GeoTools-commits mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-commits