com.moximedia.ows.geom
Class Line

java.lang.Object
  extended bycom.moximedia.ows.geom.Line
All Implemented Interfaces:
java.lang.Cloneable, Geometry, GeometryType, java.io.Serializable

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

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
Line()
          Creates new Line
Line(com.vividsolutions.jts.geom.Point[] points)
          Creates a new Line object from a com.vividsolutions.jts.geom.Point array.
Line(Points pts)
          Creates a new Line object using a Points object.
 
Method Summary
 java.lang.Object clone()
          Creates a clone of this object.
 Point getClosestPointTo(Point pt)
          Gets the closest vertex in this object to the specified point.
 Line getCopy()
          Creates a copy of this object.
 Envelope getExtent()
           
 int getGeometryType()
          Returns the geometry type of this geometry.
 java.lang.String getGid()
           
 Points getPoints()
           
 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 setPoints(Points pts)
           
 void setSrs(java.lang.String srs)
           
 void setXmlAttribute(java.lang.String element, java.lang.String name, java.lang.String value)
           
 java.awt.geom.GeneralPath toGeneralPath()
           
 java.lang.String toGmlString()
           
 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

Line

public Line()
Creates new Line


Line

public Line(Points pts)
Creates a new Line object using a Points object.

Parameters:
pts - A Points object.

Line

public Line(com.vividsolutions.jts.geom.Point[] points)
Creates a new Line object from a com.vividsolutions.jts.geom.Point array.

Parameters:
points - A com.vividsolutions.jts.geom.Point array.
Method Detail

clone

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

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

getCopy

public Line getCopy()
Creates a copy of this object.

Returns:
The copy of this object.

getExtent

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

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.

getGid

public java.lang.String getGid()

getPoints

public Points getPoints()

setPoints

public void setPoints(Points pts)

setSrs

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

toGeneralPath

public java.awt.geom.GeneralPath toGeneralPath()

toGmlString

public java.lang.String toGmlString()
Specified by:
toGmlString in interface Geometry

toJtsGeometry

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

setXmlAttribute

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

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

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 this object 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 this object.

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.