com.esri.arcgis.editor
Class Course

java.lang.Object
  extended by com.esri.arcgis.editor.Course
All Implemented Interfaces:
ICourse, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class Course
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ICourse

Creates line segments defined by COGO descriptions.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
Course()
          Constructs a Course using ArcGIS Engine.
Course(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
Course theCourse = (Course) obj;
 
Method Summary
 ISegment addSegment(IGeometry geom, double distanceFactor, double angularOffset)
          Adds a reference for the course to the input geometry.
 boolean equals(Object o)
          Compare this object with another
 ICourse esri_clone()
          Clones the course and adds the result to *clone.
static String getClsid()
          getClsid.
 int getCurveDirectionType()
          If the course type is esriCTCurve, defines the curve direction type of the third value.
 int getCurveParameter1()
          If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the first value.
 int getCurveParameter2()
          If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the second value.
 String getDescription(IEditor editor)
          Description of the course.
 double getMeasure1()
          The first value that defines the course.
 double getMeasure2()
          The second value that defines the course.
 double getMeasure3()
          Optionally, the direction of the curve if the course type is esriCTCurve.
 int getTurnDirection()
          Indicates if curve turns to the left or right.
 int getType()
          The type of course.
 int hashCode()
          the hashcode for this object
 void setCurveDirectionType(int cdt)
          If the course type is esriCTCurve, defines the curve direction type of the third value.
 void setCurveParameter1(int cp)
          If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the first value.
 void setCurveParameter2(int cp)
          If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the second value.
 void setMeasure1(double measure)
          The first value that defines the course.
 void setMeasure2(double measure)
          The second value that defines the course.
 void setMeasure3(double measure)
          Optionally, the direction of the curve if the course type is esriCTCurve.
 void setTurnDirection(int td)
          Indicates if curve turns to the left or right.
 void setType(int type)
          The type of course.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

Course

public Course()
       throws IOException,
              UnknownHostException
Constructs a Course using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

Course

public Course(Object obj)
       throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
Course theCourse = (Course) obj;

Construct a Course using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to Course.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getType

public int getType()
            throws IOException,
                   AutomationException
The type of course.

Remarks

Specifies the type of course that will be added when the AddSegment method is used. The course is defined by the other methods on the ICourse interface. There are four course types;

esriCTDirectionDistance - Add a straight course defined by a direction and a distance.

esriCTAngleDistance - Add a straight course defined by an angle from the previous course and a distance.

esriCTCurve - Add a non-tangent curve course. Any of the following parameters can be used to define the curve; Radius, Arc, Angle or Curve. The TurnDirection specifies that the course will be curving to the left or to the right. The direction of the curve can be specified as a tangent, a radial toward the center point or a chord direction.

esriCTTangentCurve - Add a curve that is tangent to the previous course. Use the same parameters as the esriCTCurve to define the curve.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getType in interface ICourse
Returns:
A com.esri.arcgis.editor.esriCourseType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setType

public void setType(int type)
             throws IOException,
                    AutomationException
The type of course.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setType in interface ICourse
Parameters:
type - A com.esri.arcgis.editor.esriCourseType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMeasure1

public double getMeasure1()
                   throws IOException,
                          AutomationException
The first value that defines the course.

Remarks

The Measure1 value is a direction, angle or a distance used to define a course segment.

When the Course Type is and CurveParameter1 is then Measure1 is
esriCTDirectionDistance Direction
esriCTAngleDistance Angle
esriCTTangentCurve esriCPChord Distance
esriCTTangentCurve esriCPArc Distance
esriCTTangentCurve esriCPRadius Distance
esriCTTangentCurve esriCPAngle Angle
esriCTCurve esriCPChord Distance
esriCTCurve esriCPArc Distance
esriCTCurve esriCPRadius Distance
esriCTCurve esriCPAngle Angle

A distance is specified in the linear units of the map. A angle is specified in radian. A direction is also specified in radians defined as polar units, measured counter clockwise from the positive x-axis.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getMeasure1 in interface ICourse
Returns:
The measure
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMeasure1

public void setMeasure1(double measure)
                 throws IOException,
                        AutomationException
The first value that defines the course.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setMeasure1 in interface ICourse
Parameters:
measure - The measure (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMeasure2

public double getMeasure2()
                   throws IOException,
                          AutomationException
The second value that defines the course.

Remarks

The Measure2 value is either a distance or an angle used to define a course segment.

When the Course Type is and CurveParameter2 is then Measure2 is
esriCTDirectionDistance Distance
esriCTAngleDistance Distance
esriCTTangentCurve esriCPChord Distance
esriCTTangentCurve esriCPArc Distance
esriCTTangentCurve esriCPRadius Distance
esriCTTangentCurve esriCPAngle Angle
esriCTCurve esriCPChord Distance
esriCTCurve esriCPArc Distance
esriCTCurve esriCPRadius Distance
esriCTCurve esriCPAngle Angle

A distance is specified in the linear units of the map. An angle is specified in radians.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getMeasure2 in interface ICourse
Returns:
The measure
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMeasure2

public void setMeasure2(double measure)
                 throws IOException,
                        AutomationException
The second value that defines the course.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setMeasure2 in interface ICourse
Parameters:
measure - The measure (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMeasure3

public double getMeasure3()
                   throws IOException,
                          AutomationException
Optionally, the direction of the curve if the course type is esriCTCurve.

Remarks

The Measure3 value is a direction used to define a course segment. The Measure3 value is only used when the course type is esriCTCurve.

The value is specified in radians. The type of direction is specified in the CurveDirectionType property.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getMeasure3 in interface ICourse
Returns:
The measure
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMeasure3

public void setMeasure3(double measure)
                 throws IOException,
                        AutomationException
Optionally, the direction of the curve if the course type is esriCTCurve.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setMeasure3 in interface ICourse
Parameters:
measure - The measure (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurveParameter1

public int getCurveParameter1()
                       throws IOException,
                              AutomationException
If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the first value.

Remarks

The CurveParameter1 property defines what the curve parameter in Measure1 value represents. The CurveParameter1 is only used when the course type is either esriCTCurve or esriCTTangentCurve.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCurveParameter1 in interface ICourse
Returns:
A com.esri.arcgis.editor.esriCurveParameter constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurveParameter1

public void setCurveParameter1(int cp)
                        throws IOException,
                               AutomationException
If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the first value.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setCurveParameter1 in interface ICourse
Parameters:
cp - A com.esri.arcgis.editor.esriCurveParameter constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurveParameter2

public int getCurveParameter2()
                       throws IOException,
                              AutomationException
If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the second value.

Remarks

The CurveParameter2 property defines what the curve parameter in Measure2 value represents. The CurveParameter2 is only used when the course type is either esriCTCurve or esriCTTangentCurve.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCurveParameter2 in interface ICourse
Returns:
A com.esri.arcgis.editor.esriCurveParameter constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurveParameter2

public void setCurveParameter2(int cp)
                        throws IOException,
                               AutomationException
If the course type is esriCTTangentCurve or esriCTCurve, defines the curve parameter of the second value.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setCurveParameter2 in interface ICourse
Parameters:
cp - A com.esri.arcgis.editor.esriCurveParameter constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTurnDirection

public int getTurnDirection()
                     throws IOException,
                            AutomationException
Indicates if curve turns to the left or right.

Remarks

The TurnDirection property defines which way a circular arc geometry turns, to the left or right. The property is only used when the course type is either esriCTCurve or esruCTTangentCurve .

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getTurnDirection in interface ICourse
Returns:
A com.esri.arcgis.editor.esriTurnDirection constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTurnDirection

public void setTurnDirection(int td)
                      throws IOException,
                             AutomationException
Indicates if curve turns to the left or right.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setTurnDirection in interface ICourse
Parameters:
td - A com.esri.arcgis.editor.esriTurnDirection constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurveDirectionType

public int getCurveDirectionType()
                          throws IOException,
                                 AutomationException
If the course type is esriCTCurve, defines the curve direction type of the third value.

Remarks

If the course being added is of type esriCTCurve, the direction of the geometry segment is specified with this property. The direction is defined in the Measure3 property.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCurveDirectionType in interface ICourse
Returns:
A com.esri.arcgis.editor.esriCurveDirectionType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurveDirectionType

public void setCurveDirectionType(int cdt)
                           throws IOException,
                                  AutomationException
If the course type is esriCTCurve, defines the curve direction type of the third value.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setCurveDirectionType in interface ICourse
Parameters:
cdt - A com.esri.arcgis.editor.esriCurveDirectionType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addSegment

public ISegment addSegment(IGeometry geom,
                           double distanceFactor,
                           double angularOffset)
                    throws IOException,
                           AutomationException
Adds a reference for the course to the input geometry.

Remarks

Adds a geometry segment to the input geom object. If the variable is specified, a geometry segment is returned. The geometry segment must be specified using the other methods on the ICourse interface.

The geom is a 'higher level' geometry such as a Polyline or a Polygon.

The distanceFactor is a scale factor that is multiplied to any of the distances used to define the course segment. Use a value of 1 to not change the input distances.

The angularOffset is an correction that is added to any directions used to define the course segment. The value is specified in radians. Use a value of 0 to not change the input directions.

Note: If the Type is esriCTAngleDistance or esriCTTangentCurve, there must be at least one segment in the input geometry.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
addSegment in interface ICourse
Parameters:
geom - A reference to a com.esri.arcgis.geometry.IGeometry (in)
distanceFactor - The distanceFactor (in)
angularOffset - The angularOffset (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISegment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public ICourse esri_clone()
                   throws IOException,
                          AutomationException
Clones the course and adds the result to *clone.

Product Availability

Available with ArcGIS Desktop.

Specified by:
esri_clone in interface ICourse
Returns:
A reference to a com.esri.arcgis.editor.ICourse
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

public String getDescription(IEditor editor)
                      throws IOException,
                             AutomationException
Description of the course.

Remarks

Returns a description of the course. The description includes the course type and the course parameters.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getDescription in interface ICourse
Parameters:
editor - A reference to a com.esri.arcgis.editor.IEditor (in)
Returns:
The description
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.