deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

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:
Iterable<Surface>, Collection<Surface>, List<Surface>, 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, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultCompositeSurface(String id, CRS crs, PrecisionModel pm, 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(Collection<? extends Surface> c)
           
 boolean addAll(int index, Collection<? extends Surface> c)
           
protected  com.vividsolutions.jts.geom.MultiPolygon buildJTSGeometry()
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(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.
 List<Points> getInteriorRingsCoordinates()
          Convenience method for accessing the control points of the interior rings of a simple polygon surface.
 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(Object o)
           
 boolean isEmpty()
           
 Iterator<Surface> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<Surface> listIterator()
           
 ListIterator<Surface> listIterator(int index)
           
 Surface remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 Surface set(int index, Surface element)
           
 int size()
           
 List<Surface> subList(int fromIndex, int toIndex)
           
 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(String id,
                               CRS crs,
                               PrecisionModel pm,
                               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 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 List<Surface>

add

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

addAll

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

addAll

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

clear

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

contains

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

containsAll

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

get

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

indexOf

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

isEmpty

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

iterator

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

lastIndexOf

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

listIterator

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

listIterator

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

remove

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

remove

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

removeAll

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

retainAll

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

set

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

size

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

subList

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

toArray

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

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<Surface>
Specified by:
toArray in interface 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 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

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>