org.deegree.geometry.standard.composite
Class DefaultCompositeSurface

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.composite.DefaultCompositeSurface
All Implemented Interfaces:
java.lang.Iterable<Surface>, java.util.Collection<Surface>, java.util.List<Surface>, TypedObjectNode, CompositeSurface, Geometry, GeometricPrimitive, Surface, GMLObject

public class DefaultCompositeSurface
extends AbstractDefaultGeometry
implements CompositeSurface

Default implementation of CompositeSurface.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.Surface
Surface.SurfaceType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.GeometricPrimitive
GeometricPrimitive.PrimitiveType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.Geometry
Geometry.GeometryType
 
Field Summary
 
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
crs, env, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultCompositeSurface(java.lang.String id, CRS crs, PrecisionModel pm, java.util.List<Surface> memberSurfaces)
          Creates a new DefaultCompositeSurface from the given parameters.
 
Method Summary
 void add(int index, Surface element)
           
 boolean add(Surface e)
           
 boolean addAll(java.util.Collection<? extends Surface> c)
           
 boolean addAll(int index, java.util.Collection<? extends Surface> c)
           
protected  com.vividsolutions.jts.geom.MultiPolygon buildJTSGeometry()
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> c)
           
 Surface get(int index)
           
 Measure getArea(Unit requestedBaseUnit)
           
 Point getCentroid()
          Returns the centroid of the geometry.
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.
 Points getExteriorRingCoordinates()
          Convenience method for accessing the control points of the exterior ring of a simple polygon surface.
 Geometry.GeometryType getGeometryType()
          Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY.
 java.util.List<Points> getInteriorRingsCoordinates()
          Convenience method for accessing the control points of the interior rings of a simple polygon surface.
 java.util.List<SurfacePatch> getPatches()
          Returns the patches that constitute this surface.
 Measure getPerimeter(Unit requestedUnit)
           
 GeometricPrimitive.PrimitiveType getPrimitiveType()
          Must always return GeometricPrimitive.PrimitiveType.Surface.
 Surface.SurfaceType getSurfaceType()
          Must always return Surface.SurfaceType#CompositeSurface.
 int indexOf(java.lang.Object o)
           
 boolean isEmpty()
           
 java.util.Iterator<Surface> iterator()
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator<Surface> listIterator()
           
 java.util.ListIterator<Surface> listIterator(int index)
           
 Surface remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 Surface set(int index, Surface element)
           
 int size()
           
 java.util.List<Surface> subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
contains, createFromJTS, crosses, equals, getAsDefaultGeometry, getBuffer, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getGMLProperties, getId, getIntersection, getJTSGeometry, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, toString, touches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.geometry.Geometry
contains, crosses, equals, getBuffer, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

DefaultCompositeSurface

public DefaultCompositeSurface(java.lang.String id,
                               CRS crs,
                               PrecisionModel pm,
                               java.util.List<Surface> memberSurfaces)
Creates a new DefaultCompositeSurface from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
memberSurfaces - surfaces that constitute the composited surface, the surfaces must join in pairs on common boundary curves and must, when considered as
Method Detail

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: Geometry
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.

Specified by:
getCoordinateDimension in interface Geometry
Returns:
the coordinate dimension

getGeometryType

public Geometry.GeometryType getGeometryType()
Description copied from interface: GeometricPrimitive
Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY.

Specified by:
getGeometryType in interface Geometry
Specified by:
getGeometryType in interface GeometricPrimitive
Returns:
must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY

getPrimitiveType

public GeometricPrimitive.PrimitiveType getPrimitiveType()
Description copied from interface: Surface
Must always return GeometricPrimitive.PrimitiveType.Surface.

Specified by:
getPrimitiveType in interface GeometricPrimitive
Specified by:
getPrimitiveType in interface Surface
Returns:
GeometricPrimitive.PrimitiveType.Surface

getSurfaceType

public Surface.SurfaceType getSurfaceType()
Description copied from interface: CompositeSurface
Must always return Surface.SurfaceType#CompositeSurface.

Specified by:
getSurfaceType in interface CompositeSurface
Specified by:
getSurfaceType in interface Surface
Returns:
Surface.SurfaceType#CompositeSurface

getArea

public Measure getArea(Unit requestedBaseUnit)
Specified by:
getArea in interface Surface
Returns:
area of the surface

getPerimeter

public Measure getPerimeter(Unit requestedUnit)
Specified by:
getPerimeter in interface Surface
Returns:
perimeter of the surface

getCentroid

public Point getCentroid()
Description copied from interface: Geometry
Returns the centroid of the geometry.

Specified by:
getCentroid in interface Geometry
Overrides:
getCentroid in class AbstractDefaultGeometry
Returns:
a Point that is the centroid of this geometry

getPatches

public java.util.List<SurfacePatch> getPatches()
Description copied from interface: Surface
Returns the patches that constitute this surface.

Specified by:
getPatches in interface Surface
Returns:
the patches that constitute this surface

buildJTSGeometry

protected com.vividsolutions.jts.geom.MultiPolygon buildJTSGeometry()
Overrides:
buildJTSGeometry in class AbstractDefaultGeometry

add

public void add(int index,
                Surface element)
Specified by:
add in interface java.util.List<Surface>

add

public boolean add(Surface e)
Specified by:
add in interface java.util.Collection<Surface>
Specified by:
add in interface java.util.List<Surface>

addAll

public boolean addAll(java.util.Collection<? extends Surface> c)
Specified by:
addAll in interface java.util.Collection<Surface>
Specified by:
addAll in interface java.util.List<Surface>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends Surface> c)
Specified by:
addAll in interface java.util.List<Surface>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<Surface>
Specified by:
clear in interface java.util.List<Surface>

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<Surface>
Specified by:
contains in interface java.util.List<Surface>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<Surface>
Specified by:
containsAll in interface java.util.List<Surface>

get

public Surface get(int index)
Specified by:
get in interface java.util.List<Surface>

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List<Surface>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<Surface>
Specified by:
isEmpty in interface java.util.List<Surface>

iterator

public java.util.Iterator<Surface> iterator()
Specified by:
iterator in interface java.lang.Iterable<Surface>
Specified by:
iterator in interface java.util.Collection<Surface>
Specified by:
iterator in interface java.util.List<Surface>

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List<Surface>

listIterator

public java.util.ListIterator<Surface> listIterator()
Specified by:
listIterator in interface java.util.List<Surface>

listIterator

public java.util.ListIterator<Surface> listIterator(int index)
Specified by:
listIterator in interface java.util.List<Surface>

remove

public Surface remove(int index)
Specified by:
remove in interface java.util.List<Surface>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<Surface>
Specified by:
remove in interface java.util.List<Surface>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<Surface>
Specified by:
removeAll in interface java.util.List<Surface>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<Surface>
Specified by:
retainAll in interface java.util.List<Surface>

set

public Surface set(int index,
                   Surface element)
Specified by:
set in interface java.util.List<Surface>

size

public int size()
Specified by:
size in interface java.util.Collection<Surface>
Specified by:
size in interface java.util.List<Surface>

subList

public java.util.List<Surface> subList(int fromIndex,
                                       int toIndex)
Specified by:
subList in interface java.util.List<Surface>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<Surface>
Specified by:
toArray in interface java.util.List<Surface>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<Surface>
Specified by:
toArray in interface java.util.List<Surface>

getExteriorRingCoordinates

public Points getExteriorRingCoordinates()
Description copied from interface: Surface
Convenience method for accessing the control points of the exterior ring of a simple polygon surface.

NOTE: This method is only safe to use when the surface consists of a single planar patch that has a linear interpolated exterior ring.

Specified by:
getExteriorRingCoordinates in interface Surface
Returns:
the control points

getInteriorRingsCoordinates

public java.util.List<Points> getInteriorRingsCoordinates()
Description copied from interface: Surface
Convenience method for accessing the control points of the interior rings of a simple polygon surface.

NOTE: This method is only safe to use when the surface consists of a single planar patch that has linear interpolated interior rings.

Specified by:
getInteriorRingsCoordinates in interface Surface
Returns:
the control points


Copyright © 2011. All Rights Reserved.