com.moximedia.aims
Class AimsPath

java.lang.Object
  extended bycom.moximedia.aims.AimsPath
All Implemented Interfaces:
java.io.Serializable

public class AimsPath
extends java.lang.Object
implements java.io.Serializable

Implementation of an ArcIMS polyline path object.

Author:
Doug Cates - www.moximedia.com
See Also:
Serialized Form

Constructor Summary
AimsPath()
          Creates a path point object with no arguments.
AimsPath(AimsPoints pts)
          Creates a new path object with an AimsPoints object.
 
Method Summary
 void addPoint(AimsPoint pt)
          Adds a point to the path.
 void densify(double distance)
          Densifies the points in the shape by a distance.
 void generalize(double distance)
          Generalizes the points in the shape by a distance.
 AimsPoint getClosestVertex(AimsPoint pt)
          Gets the closest vertex in the AimsPath to the specified point.
 AimsEnvelope getExtent()
          Returns the extent of the path, or null if the path has no points.
 double getLength()
          Gets the length of the path.
 AimsPoints getPoints()
          Gets the points of the path object.
 void offsetBy(AimsPoint offset)
          Offsets the points in the path by the x and y in a point.
 AimsPath project(Projection projection)
          Projects this object to the specified projection.
 AimsPath project(Projection fromProjection, Projection toProjection)
          Projects this object from one projection to another.
 void setPoints(AimsPoints points)
          Sets the points of the path object.
 java.lang.String toAxlString()
          Returns the AXL string to refresh this object.
 java.lang.String toAxlString(AimsEnvironment env)
          Returns the AXL string to refresh this object.
 com.vividsolutions.jts.geom.Geometry toJtsLineString()
           
 java.lang.String toString()
          Returns a text representation of of this object.
 AimsPath unproject(Projection projection)
          Unprojects this object to geographic from the specified projection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AimsPath

public AimsPath()
Creates a path point object with no arguments.


AimsPath

public AimsPath(AimsPoints pts)
Creates a new path object with an AimsPoints object.

Parameters:
pts - The points.
Method Detail

getLength

public double getLength()
Gets the length of the path.

Returns:
The length of the path.

getClosestVertex

public AimsPoint getClosestVertex(AimsPoint pt)
Gets the closest vertex in the AimsPath to the specified point.

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 path.

addPoint

public void addPoint(AimsPoint pt)
Adds a point to the path.

Parameters:
pt - The point to add to the path.

getPoints

public AimsPoints getPoints()
Gets the points of the path object.


densify

public void densify(double distance)
Densifies the points in the shape by a distance.

Parameters:
distance - The densify distance.

generalize

public void generalize(double distance)
Generalizes the points in the shape by a distance.

Parameters:
distance - The generalize distance.

offsetBy

public void offsetBy(AimsPoint offset)
Offsets the points in the path by the x and y in a point.

Parameters:
offset - An AimsPoint object containing the offset.

setPoints

public void setPoints(AimsPoints points)
Sets the points of the path object.

Parameters:
points - An AimsPoints object containing the path points.

getExtent

public AimsEnvelope getExtent()
Returns the extent of the path, or null if the path has no points.

Returns:
An AimsEnvelope containing the extent.

toString

public java.lang.String toString()
Returns a text representation of of this object.

Returns:
A string describing the object

toAxlString

public java.lang.String toAxlString()
Returns the AXL string to refresh this object. This method is not typically used by the application programmer.

Returns:
The AXL string to refresh this object.

toAxlString

public java.lang.String toAxlString(AimsEnvironment env)
Returns the AXL string to refresh this object. This method is not typically used by the application programmer.

Returns:
The AXL string to refresh this object.

toJtsLineString

public com.vividsolutions.jts.geom.Geometry toJtsLineString()

project

public AimsPath project(Projection fromProjection,
                        Projection toProjection)
Projects this object from one projection to another.

Parameters:
fromProjection - The projection of this object.
toProjection - The target projection.
Returns:
The projected object.

project

public AimsPath project(Projection projection)
Projects this object to the specified projection. It is assumed that the coordinate system of the original object is geographic.

Parameters:
projection - The original projection system.
Returns:
An object containing the projected coordinates.

unproject

public AimsPath unproject(Projection projection)
Unprojects this object to geographic from the specified projection.

Parameters:
projection - The projection system.
Returns:
An object containing the unprojected coordinates.


Internet Mapping Framework for ArcIMS Java Object Model API (v5.1.00)
Copyright © 2006 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.