com.moximedia.ows.geom
Class GeometryCollection

java.lang.Object
  extended bycom.moximedia.ows.geom.GeometryCollection
All Implemented Interfaces:
java.lang.Cloneable, Geometry, GeometryType, java.io.Serializable
Direct Known Subclasses:
MultiLine, MultiPoint, MultiPolygon

public class GeometryCollection
extends java.lang.Object
implements Geometry, GeometryType, java.lang.Cloneable, java.io.Serializable

Author:
jdc
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.moximedia.ows.types.GeometryType
GEOMETRY_TYPE_COLLECTION, GEOMETRY_TYPE_ENVELOPE, GEOMETRY_TYPE_LINE, GEOMETRY_TYPE_MULTILINE, GEOMETRY_TYPE_MULTIPOINT, GEOMETRY_TYPE_MULTIPOLYGON, GEOMETRY_TYPE_POINT, GEOMETRY_TYPE_POLYGON, GEOMETRY_TYPE_UNKNOWN
 
Constructor Summary
GeometryCollection()
          Creates new GeometryCollection
 
Method Summary
 void add(Geometry geometry)
           
 java.lang.Object clone()
          Creates a clone of this object.
 Point getClosestPointTo(Point pt)
          Gets the closest vertex in the collection to the specified point.
 Envelope getExtent()
           
 java.util.ArrayList getGeometries()
           
 int getGeometryType()
          Returns the geometry type of this geometry.
 boolean intersects(Geometry geometry)
           
 boolean isGeometryType(int geometryType)
          Compares a geometry type with another value.
 boolean isValid()
          Returns an indicator of whether this shape is valid.
 Geometry project(Projection projection)
           
 Geometry project(Projection fromProjection, Projection toProjection)
           
 void setSrs(java.lang.String srs)
           
 void setXmlAttribute(java.lang.String element, java.lang.String name, java.lang.String value)
           
 int size()
           
 java.lang.String toGmlString()
          Returns the GML text string representing this object.
 com.vividsolutions.jts.geom.Geometry toJtsGeometry()
           
 java.lang.String toWktString()
          Returns the well known string representation of this object.
 Geometry unproject(Projection projection)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryCollection

public GeometryCollection()
Creates new GeometryCollection

Method Detail

add

public void add(Geometry geometry)

clone

public java.lang.Object clone()
Creates a clone of this object. Must be cast back to the correct object type before using. Consider using getCopy() instead.

Specified by:
clone in interface Geometry
Returns:
The clone of this object.

getExtent

public Envelope getExtent()
Specified by:
getExtent in interface Geometry

getGeometries

public java.util.ArrayList getGeometries()

getGeometryType

public int getGeometryType()
Returns the geometry type of this geometry.

Specified by:
getGeometryType in interface Geometry
Returns:
The geometry type of this geometry.

intersects

public boolean intersects(Geometry geometry)
Specified by:
intersects in interface Geometry

isGeometryType

public boolean isGeometryType(int geometryType)
Compares a geometry type with another value.

Specified by:
isGeometryType in interface Geometry
Parameters:
geometryType - An enumerated value.
Returns:
True if the type of this geometry is the same, otherwise false.

setXmlAttribute

public void setXmlAttribute(java.lang.String element,
                            java.lang.String name,
                            java.lang.String value)
Specified by:
setXmlAttribute in interface Geometry

size

public int size()

setSrs

public void setSrs(java.lang.String srs)
Specified by:
setSrs in interface Geometry

toGmlString

public java.lang.String toGmlString()
Returns the GML text string representing this object.

Specified by:
toGmlString in interface Geometry
Returns:
The GML text string representing this object.

project

public Geometry project(Projection fromProjection,
                        Projection toProjection)
Specified by:
project in interface Geometry

project

public Geometry project(Projection projection)
Specified by:
project in interface Geometry

unproject

public Geometry unproject(Projection projection)
Specified by:
unproject in interface Geometry

toJtsGeometry

public com.vividsolutions.jts.geom.Geometry toJtsGeometry()
Specified by:
toJtsGeometry in interface Geometry

isValid

public boolean isValid()
Returns an indicator of whether this shape is valid.

Specified by:
isValid in interface Geometry
Returns:
True if this shape is valid, otherwise false.

getClosestPointTo

public Point getClosestPointTo(Point pt)
Gets the closest vertex in the collection to the specified point.

Specified by:
getClosestPointTo in interface Geometry
Parameters:
pt - The point to compare the vertexes to.
Returns:
The closest vertex to the specified point, or null if there are no points in the multipolygon.

toWktString

public java.lang.String toWktString()
Returns the well known string representation of this object.

Specified by:
toWktString in interface Geometry
Returns:
The well known text.


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.