diff --git a/src/main/java/com/esri/core/geometry/BucketSort.java b/src/main/java/com/esri/core/geometry/BucketSort.java index 5039a4e8..c2a6899e 100644 --- a/src/main/java/com/esri/core/geometry/BucketSort.java +++ b/src/main/java/com/esri/core/geometry/BucketSort.java @@ -137,7 +137,7 @@ public void sort(AttributeStreamOfInt32 indices, int begin, int end, * @param capacity * - the number of elements to sort (-1 if not known). The * bucket_count are usually equal. - * @return Returns False, if the bucket sort cannot be used with the given + * @return {@code false} if the bucket sort cannot be used with the given * parameters. The method also can throw out of memory exception. In * the later case, one should fall back to the regular sort. */ @@ -159,6 +159,7 @@ private boolean reset(int bucket_count, double min_value, double max_value, } /** + * TODO * Adds new element to the bucket builder. The value must be between * min_value and max_value. * @@ -175,7 +176,7 @@ private int getBucket(double value) { } /** - * Returns the bucket count. + * @return the bucket count. */ private int getBucketCount() { return m_buckets.size(); diff --git a/src/main/java/com/esri/core/geometry/CombineOperator.java b/src/main/java/com/esri/core/geometry/CombineOperator.java index 43e5ac2c..4c52a4ee 100644 --- a/src/main/java/com/esri/core/geometry/CombineOperator.java +++ b/src/main/java/com/esri/core/geometry/CombineOperator.java @@ -36,13 +36,25 @@ public interface CombineOperator { * Operation on two geometries, returning a third. Examples include * Intersection, Difference, and so forth. * - * @param geom1 and geom2 are the geometry instances to be operated on. - * @param sr The spatial reference to get the tolerance value from. - * When sr is null, the tolerance is calculated from the input geometries. - * @param progressTracker ProgressTracker instance that is used to cancel the lengthy operation. Can be null. - * @return Returns the result geoemtry. In some cases the returned value can point to geom1 or geom2 - * instance. For example, the OperatorIntersection may return geom2 when it is completely - * inside of the geom1. + * @param geom1 + * the first geometry of the parameter pair to be operated on. + * + * @param geom2 + * the second geometry of the parameter pair to be operated on. + * + * @param sr + * The spatial reference to get the tolerance value from. + * When sr is null, the tolerance is calculated from the input + * geometries. + * + * @param progressTracker + * ProgressTracker instance that is used to cancel the lengthy + * operation. Can be null. + * + * @return the result geoemtry. In some cases the returned value can point + * to geom1 or geom2 instance. For example, the + * OperatorIntersection may return geom2 when it is completely + * inside of the geom1. */ public Geometry execute(Geometry geom1, Geometry geom2, SpatialReference sr, ProgressTracker progressTracker); diff --git a/src/main/java/com/esri/core/geometry/ConvexHull.java b/src/main/java/com/esri/core/geometry/ConvexHull.java index bafe51e0..b07e1849 100644 --- a/src/main/java/com/esri/core/geometry/ConvexHull.java +++ b/src/main/java/com/esri/core/geometry/ConvexHull.java @@ -53,8 +53,10 @@ private ConvexHull(Point2D[] points) { /** * Adds a geometry to the current bounding geometry using an incremental - * algorithm for dynamic insertion. \param geometry The geometry to add to - * the bounding geometry. + * algorithm for dynamic insertion. + * + * @param geometry + * The geometry to add to the bounding geometry. */ void addGeometry(Geometry geometry) { @@ -96,8 +98,10 @@ Geometry getBoundingGeometry() { /** * Static method to construct the convex hull of a Multi_vertex_geometry. - * Returns a Polygon. \param mvg The geometry used to create the convex - * hull. + * Returns a Polygon. + * + * @param mvg + * The geometry used to create the convex hull. */ static Polygon construct(MultiVertexGeometry mvg) { @@ -157,10 +161,17 @@ static Polygon construct(MultiVertexGeometry mvg) { * Static method to construct the convex hull from an array of points. The * out_convex_hull array will be populated with the subset of index * positions which contribute to the convex hull. Returns the number of - * points in the convex hull. \param points The points used to create the - * convex hull. \param count The number of points in the input Point2D - * array. \param out_convex_hull An index array allocated by the user at - * least as big as the size of the input points array. + * points in the convex hull. + * + * @param points + * The points used to create the convex hull. + * + * @param count + * The number of points in the input Point2D array. + * + * @param out_convex_hull + * An index array allocated by the user at least as big as the size + * of the input points array. TODO */ static int construct(Point2D[] points, int count, int[] bounding_geometry) { ConvexHull convex_hull = new ConvexHull(points); @@ -199,10 +210,14 @@ static int construct(Point2D[] points, int count, int[] bounding_geometry) { } /** - * Returns true if the given path of the input MultiPath is convex. Returns - * false otherwise. \param multi_path The MultiPath to check if the path is - * convex. \param path_index The path of the MultiPath to check if its - * convex. + * @param multi_path + * The MultiPath to check if the path is convex. + * + * @param path_index + * The path of the MultiPath to check if its convex. + * + * @return {@code true} if the given path of the input MultiPath is convex. + * Return {@code false} otherwise. */ static boolean isPathConvex(MultiPath multi_path, int path_index, ProgressTracker progress_tracker) { diff --git a/src/main/java/com/esri/core/geometry/Envelope.java b/src/main/java/com/esri/core/geometry/Envelope.java index 6991f26e..d327a171 100644 --- a/src/main/java/com/esri/core/geometry/Envelope.java +++ b/src/main/java/com/esri/core/geometry/Envelope.java @@ -958,9 +958,11 @@ public Point getUpperLeft() { /** * Checks if this envelope contains (covers) the specified point. * - * @param p - * The Point to be tested for coverage. - * @return TRUE if this envelope contains (covers) the specified point. + * @param p + * The Point to be tested for coverage. + * + * @return {@code true} if this envelope contains (covers) the specified + * point. */ public boolean contains(Point p) { if (p.isEmpty()) @@ -971,9 +973,11 @@ public boolean contains(Point p) { /** * Checks if this envelope contains (covers) other envelope. * - * @param env - * The envelope to be tested for coverage. - * @return TRUE if this envelope contains (covers) the specified envelope. + * @param env + * The envelope to be tested for coverage. + * + * @return {@code true} if this envelope contains (covers) the specified + * envelope. */ public boolean contains(Envelope env) { return m_envelope.contains(env.m_envelope); diff --git a/src/main/java/com/esri/core/geometry/Envelope1D.java b/src/main/java/com/esri/core/geometry/Envelope1D.java index 9e30e08b..2aad949b 100644 --- a/src/main/java/com/esri/core/geometry/Envelope1D.java +++ b/src/main/java/com/esri/core/geometry/Envelope1D.java @@ -125,6 +125,12 @@ public boolean contains(double v) { /** * Returns True if the envelope contains the other envelope (boundary * inclusive). Note: Will return false if either envelope is empty. + * + * @param other + * the envelope to be tested for coverage. + * + * @return {@code true} if this envelope contains (covers) the specified + * envelope. */ public boolean contains(/* const */Envelope1D other) /* const */ { diff --git a/src/main/java/com/esri/core/geometry/Envelope2D.java b/src/main/java/com/esri/core/geometry/Envelope2D.java index 3b9a02f7..2707c7cf 100644 --- a/src/main/java/com/esri/core/geometry/Envelope2D.java +++ b/src/main/java/com/esri/core/geometry/Envelope2D.java @@ -114,6 +114,9 @@ public Envelope2D getInflated(double dx, double dy) { /** * Sets the envelope from the array of points. The envelope will be set to * empty if the array is null. + * + * @param points + * to define this envelope */ public void setFromPoints(Point2D[] points) { if (points == null || points.length == 0) { @@ -181,6 +184,12 @@ else if (ymax < y) /** * Merges a point with this envelope without checking if the envelope is * empty. Use with care. + * + * @param x + * TODO + * + * @param y + * TODO */ public void mergeNE(double x, double y) { if (xmin > x) @@ -240,8 +249,12 @@ public void zoom(double factorX, double factorY) { } /** - * Checks if this envelope intersects the other. - * @return True if this envelope intersects the other. + * Checks if this envelope intersects the other. + * + * @param other + * the envelope to be tested for intersection. + * + * @return {@code true} if this envelope intersects the other. */ public boolean isIntersecting(Envelope2D other) { return !isEmpty() @@ -257,9 +270,12 @@ public boolean isIntersecting(Envelope2D other) { } /** - * Checks if this envelope intersects the other assuming neither one is empty. - * @return True if this envelope intersects the other. Assumes this and - * other envelopes are not empty. + * Checks if this envelope intersects the other assuming neither one is empty. + * + * @param other + * the envelope to be tested for intersection. + * @return {@code true} if this envelope intersects the other. Assumes this + * and other envelopes are not empty. */ public boolean isIntersectingNE(Envelope2D other) { return ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin) @@ -274,9 +290,11 @@ public boolean isIntersectingNE(Envelope2D other) { /** * Intersects this envelope with the other and stores result in this * envelope. - * - * @return True if this envelope intersects the other, otherwise sets this - * envelope to empty state and returns False. + * + * @param other the envelope to be tested for intersection. + * + * @return {@code true} if this envelope intersects the other, otherwise + * sets this envelope to empty state and returns {@code false}. */ public boolean intersect(Envelope2D other) { if (isEmpty() || other.isEmpty()) @@ -303,15 +321,16 @@ public boolean intersect(Envelope2D other) { } /** - * Queries a corner of the envelope. - * - * @param index Indicates a corner of the envelope. - *
0 => lower left or (xmin, ymin) - *
1 => upper left or (xmin, ymax) - *
2 => upper right or (xmax, ymax) - *
3 => lower right or (xmax, ymin) - * @return Point at a corner of the envelope. - * + * Queries a corner of the envelope. + *
{@literal 0 => lower left or (xmin, ymin)} + *
{@literal 1 => upper left or (xmin, ymax)} + *
{@literal 2 => upper right or (xmax, ymax)} + *
{@literal 3 => lower right or (xmax, ymin)}
+ *
+ * @param index
+ * Indicates a corner of the envelope.
+ *
+ * @return Point at a corner of the envelope.
*/
public Point2D queryCorner(int index) {
switch (index) {
@@ -332,6 +351,9 @@ public Point2D queryCorner(int index) {
/**
* Queries corners into a given array. The array length must be at least
* 4. Starts from the lower left corner and goes clockwise.
+ *
+ * @param corners
+ * an array for insertion of envelope points
*/
public void queryCorners(Point2D[] corners) {
if ((corners == null) || (corners.length < 4))
@@ -361,6 +383,9 @@ public void queryCorners(Point2D[] corners) {
* Queries corners into a given array in reversed order. The array length
* must be at least 4. Starts from the lower left corner and goes
* counterclockwise.
+ *
+ * @param corners
+ * an array for insertion of envelope points
*/
public void queryCornersReversed(Point2D[] corners) {
if (corners == null || ((corners != null) && (corners.length < 4)))
@@ -462,6 +487,12 @@ public double getHeight() {
/**
* Moves the Envelope by given distance.
+ *
+ * @param dx
+ * the delta for movement in the X direction
+ *
+ * @param dy
+ * the delta for movement in the Y direction
*/
public void move(double dx, double dy) {
if (isEmpty())
@@ -518,8 +549,8 @@ public void queryUpperRight(Point2D pt) {
}
/**
- * Returns True if this envelope is valid (empty, or has xmin less or equal
- * to xmax, or ymin less or equal to ymax).
+ * @return {@code true} if this envelope is valid (empty, or has xmin less
+ * or equal to xmax, or ymin less or equal to ymax).
*/
public boolean isValid() {
return isEmpty() || (xmin <= xmax && ymin <= ymax);
@@ -581,8 +612,11 @@ public boolean contains(double x, double y) {
}
/**
- * Returns True if the envelope contains the other envelope (boundary
- * inclusive).
+ * @param other
+ * the envelope to be tested for containment.
+ *
+ * @return {@code true} if the envelope contains the other envelope
+ * (boundary inclusive).
*/
public boolean contains(Envelope2D other) {// Note: Will return False, if
// either envelope is empty.
@@ -591,7 +625,14 @@ public boolean contains(Envelope2D other) {// Note: Will return False, if
}
/**
- * Returns True if the envelope contains the point (boundary exclusive).
+ * @param x
+ * coordinate of point for containment calculation
+ *
+ * @param y
+ * coordinate of point for containment calculation
+ *
+ * @return {@code true} if the envelope contains the point (boundary
+ * exclusive).
*/
public boolean containsExclusive(double x, double y) {
// Note: This will return False, if envelope is empty, thus no need to
@@ -600,15 +641,19 @@ public boolean containsExclusive(double x, double y) {
}
/**
- * Returns True if the envelope contains the point (boundary exclusive).
+ * @param pt
+ * the query parameter for containment operation
+ *
+ * @return {@code true} if the envelope contains the point (boundary
+ * exclusive).
*/
public boolean containsExclusive(Point2D pt) {
return containsExclusive(pt.x, pt.y);
}
/**
- * Returns True if the envelope contains the other envelope (boundary
- * exclusive).
+ * @return {@code true} if the envelope contains the other envelope
+ * (boundary exclusive).
*/
boolean containsExclusive(Envelope2D other) {
// Note: This will return False, if either envelope is empty, thus no
@@ -1011,8 +1056,12 @@ boolean clipLineAuxiliary(double denominator, double numerator,
}
/**
- * Returns True, envelope is degenerate (Width or Height are less than
- * tolerance). Note: this returns False for Empty envelope.
+ * @param tolerance
+ * the resolution for degenerate classification
+ *
+ * @return {@code true} if envelope is degenerate (Width or Height are less
+ * than tolerance). Note: this returns {@code false} for Empty
+ * envelope.
*/
public boolean isDegenerate(double tolerance) {
return !isEmpty()
@@ -1035,8 +1084,11 @@ public boolean isPointOnBoundary(Point2D pt, double tolerance) {
}
/**
- * Calculates minimum distance from this envelope to the other.
- * Returns 0 for empty envelopes.
+ * @param other
+ * envelope for minimum distance calculation
+ *
+ * @return the minimum distance from this envelope to the other or 0 for
+ * empty envelopes
*/
public double distance(/* const */Envelope2D other)
{
@@ -1044,8 +1096,11 @@ public double distance(/* const */Envelope2D other)
}
/**
- * Calculates minimum distance from this envelope to the point.
- * Returns 0 for empty envelopes.
+ * @param pt2D
+ * the point for minimum distance calculation
+ *
+ * @return the minimum distance from this envelope to the given point or 0
+ * for empty envelopes
*/
public double distance(Point2D pt2D)
{
@@ -1053,8 +1108,11 @@ public double distance(Point2D pt2D)
}
/**
- * Calculates minimum squared distance from this envelope to the other.
- * Returns 0 for empty envelopes.
+ * @param other
+ * envelope for squared distance calculation
+ *
+ * @return minimum squared distance from this envelope to the other or 0
+ * for empty envelopes
*/
public double sqrDistance(Envelope2D other)
{
@@ -1083,7 +1141,12 @@ public double sqrDistance(Envelope2D other)
/**
* Calculates minimum squared distance from this envelope to the point.
- * Returns 0 for empty envelopes.
+ *
+ * @param pt2D
+ * the point to calculate the minimum squared distance from the envelope
+ *
+ * @return the minimum squared distance from the input parameter or 0 for
+ * empty envelopes
*/
public double sqrDistance(Point2D pt2D)
{
diff --git a/src/main/java/com/esri/core/geometry/Envelope2DIntersectorImpl.java b/src/main/java/com/esri/core/geometry/Envelope2DIntersectorImpl.java
index 98d7ad8c..3311c728 100644
--- a/src/main/java/com/esri/core/geometry/Envelope2DIntersectorImpl.java
+++ b/src/main/java/com/esri/core/geometry/Envelope2DIntersectorImpl.java
@@ -248,8 +248,10 @@ int getHandleB() {
}
/*
- * Sets the tolerance used for the intersection tests.\param tolerance The
- * tolerance used to determine intersection.
+ * Sets the tolerance used for the intersection tests.
+ *
+ * @param tolerance
+ * The tolerance used to determine intersection.
*/
void setTolerance(double tolerance) {
m_tolerance = tolerance;
diff --git a/src/main/java/com/esri/core/geometry/Geometry.java b/src/main/java/com/esri/core/geometry/Geometry.java
index e5d08afa..6fd2b53c 100644
--- a/src/main/java/com/esri/core/geometry/Geometry.java
+++ b/src/main/java/com/esri/core/geometry/Geometry.java
@@ -108,7 +108,7 @@ static public enum Type {
private int enumValue;
/**
- * Returns the integer representation of the enumeration value.
+ * @return the integer representation of the enumeration value.
*/
public int value() {
return enumValue;
@@ -143,7 +143,8 @@ public int value() {
public abstract int getDimension();
/**
- * Returns the VertexDescription of this geomtry.
+
+ * @return the VertexDescription of this geometry.
*/
public VertexDescription getDescription() {
return m_description;
@@ -183,6 +184,12 @@ void mergeVertexDescription(VertexDescription src) {
/**
* A shortcut for getDescription().hasAttribute()
+ *
+ * @param semantics
+ * the {@link VertexDescription.Semantics} for the attribute
+ *
+ * @return {@code true} if geometry has the attribute matching the
+ * semantics of the attribute.
*/
public boolean hasAttribute(int semantics) {
return getDescription().hasAttribute(semantics);
@@ -191,7 +198,7 @@ public boolean hasAttribute(int semantics) {
/**
* Adds a new attribute to the Geometry.
*
- * @param semantics
+ * @param semantics for the attribute
*/
public void addAttribute(int semantics) {
_touch();
@@ -207,6 +214,9 @@ public void addAttribute(int semantics) {
* equivalent to setting the attribute to the default value for each vertex,
* However, it is faster and the result Geometry has smaller memory
* footprint and smaller size when persisted.
+ *
+ * @param semantics
+ * for the attribute
*/
public void dropAttribute(int semantics) {
_touch();
@@ -226,7 +236,13 @@ public void dropAllAttributes() {
}
/**
- * Returns the min and max attribute values at the ordinate of the Geometry
+ * @param semantics
+ * as defined in {@link VertexDescription.Semantics}
+ *
+ * @param ordinate
+ * value TODO
+ *
+ * @return the min and max attribute values at the ordinate of the Geometry
*/
public abstract Envelope1D queryInterval(int semantics, int ordinate);
@@ -246,6 +262,9 @@ public void dropAllAttributes() {
/**
* Returns tight bbox of the Geometry in X, Y plane.
+ *
+ * @param env
+ * the envelope to update with the X and Y extents of the geometry
*/
public abstract void queryEnvelope2D(Envelope2D env);
@@ -258,6 +277,10 @@ public void dropAllAttributes() {
* Returns the conservative bbox of the Geometry in X, Y plane. This is a
* faster method than QueryEnvelope2D. However, the bbox could be larger
* than the tight box.
+ *
+ * @param env
+ * the envelope to update with the loose X and Y extents of the
+ * geometry
*/
public void queryLooseEnvelope2D(Envelope2D env) {
queryEnvelope2D(env);
@@ -276,7 +299,7 @@ void queryLooseEnvelope3D(Envelope3D env) {
* IsEmpty returns TRUE when the Geometry object does not contain geometric
* information beyond its original initialization state.
*
- * @return boolean Returns TRUE if this geometry is empty.
+ * @return {@code true} if this geometry is empty.
*/
public abstract boolean isEmpty();
@@ -289,8 +312,8 @@ void queryLooseEnvelope3D(Envelope3D env) {
/**
* Applies 2D affine transformation in XY plane.
*
- * @param transform
- * The affine transformation to be applied to this geometry.
+ * @param transform
+ * The affine transformation to be applied to this geometry.
*/
public abstract void applyTransformation(Transformation2D transform);
@@ -303,14 +326,17 @@ void queryLooseEnvelope3D(Envelope3D env) {
abstract void applyTransformation(Transformation3D transform);
/**
- * Creates an instance of an empty geometry of the same type.
+ * @return a new instance of an empty geometry of the same type.
*/
public abstract Geometry createInstance();
/**
* Copies this geometry to another geometry of the same type. The result
* geometry is an exact copy.
- *
+ *
+ * @param dst
+ * the destination geometry
+ *
* @exception GeometryException
* invalid_argument if the geometry is of different type.
*/
@@ -355,7 +381,7 @@ void addZ() {
/**
* Returns true if this Geometry has the Z attribute
*
- * @return true if this Geometry has the Z attribute
+ * @return {@code true} if this Geometry has the Z attribute
*/
public boolean hasZ() {
return hasAttribute(VertexDescription.Semantics.Z);
@@ -371,7 +397,7 @@ public void addM() {
/**
* Returns true if this Geometry has an M attribute
*
- * @return true if this Geometry has an M attribute
+ * @return {@code true} if this Geometry has an M attribute
*/
public boolean hasM() {
return hasAttribute(VertexDescription.Semantics.M);
@@ -387,7 +413,7 @@ public void addID() {
/**
* Returns true if this Geometry has an ID attribute
*
- * @return true if this Geometry has an ID attribute
+ * @return {@code true} if this Geometry has an ID attribute
*/
public boolean hasID() {
return hasAttribute(VertexDescription.Semantics.ID);
@@ -417,10 +443,11 @@ public static int getDimensionFromType(int type) {
* Indicates if the integer value of the enumeration is a point type
* (dimension 0).
*
- * @param type
- * The integer value from geometry enumeration. You can use the
- * method {@link Type#value()} to get at the integer value.
- * @return TRUE if the geometry is a point.
+ * @param type
+ * The integer value from geometry enumeration. You can use the
+ * method {@link Type#value()} to get at the integer value.
+ *
+ * @return {@code true} if the geometry is a point.
*/
public static boolean isPoint(int type) {
return (type & 0x20) != 0;
@@ -430,10 +457,11 @@ public static boolean isPoint(int type) {
* Indicates if the integer value of the enumeration is linear (dimension
* 1).
*
- * @param type
- * The integer value from geometry enumeration. You can use the
- * method {@link Type#value()} to get at the integer value.
- * @return TRUE if the geometry is a line.
+ * @param type
+ * The integer value from geometry enumeration. You can use the
+ * method {@link Type#value()} to get at the integer value.
+ *
+ * @return {@code true} if the geometry is a line.
*/
public static boolean isLinear(int type) {
return (type & 0x40) != 0;
@@ -443,10 +471,11 @@ public static boolean isLinear(int type) {
* Indicates if the integer value of the enumeration is an area (dimension
* 2).
*
- * @param type
- * The integer value from geometry enumeration. You can use the
- * method {@link Type#value()} to get at the integer value.
- * @return TRUE if the geometry is a polygon.
+ * @param type
+ * The integer value from geometry enumeration. You can use the
+ * method {@link Type#value()} to get at the integer value.
+ *
+ * @return {@code true} if the geometry is a polygon.
*/
public static boolean isArea(int type) {
return (type & 0x80) != 0;
@@ -456,9 +485,10 @@ public static boolean isArea(int type) {
* Indicates if the integer value of the enumeration is a segment.
*
* @param type
- * The integer value from geometry enumeration. You can use the
- * method {@link Type#value()} to get at the integer value.
- * @return TRUE if the geometry is a segment.
+ * The integer value from geometry enumeration. You can use the
+ * method {@link Type#value()} to get at the integer value.
+ *
+ * @return {@code true} if the geometry is a segment.
*/
public static boolean isSegment(int type) {
return (type & 0x100) != 0;
@@ -468,10 +498,11 @@ public static boolean isSegment(int type) {
* Indicates if the integer value of the enumeration is a multivertex (ie,
* multipoint, line, or area).
*
- * @param type
- * The integer value from geometry enumeration. You can use the
- * method {@link Type#value()} to get at the integer value.
- * @return TRUE if the geometry has multiple vertices.
+ * @param type
+ * The integer value from geometry enumeration. You can use the
+ * method {@link Type#value()} to get at the integer value.
+ *
+ * @return {@code true} if the geometry has multiple vertices.
*/
public static boolean isMultiVertex(int type) {
return (type & 0x200) != 0;
@@ -481,10 +512,11 @@ public static boolean isMultiVertex(int type) {
* Indicates if the integer value of the enumeration is a multipath (ie,
* line or area).
*
- * @param type
- * The integer value from geometry enumeration. You can use the
- * method {@link Type#value()} to get at the integer value.
- * @return TRUE if the geometry is a multipath.
+ * @param type
+ * The integer value from geometry enumeration. You can use the
+ * method {@link Type#value()} to get at the integer value.
+ *
+ * @return {@code true} if the geometry is a multipath.
*/
public static boolean isMultiPath(int type) {
return (type & 0x400) != 0;
@@ -493,7 +525,7 @@ public static boolean isMultiPath(int type) {
/**
* Creates a copy of the geometry.
*
- * @return Returns a copy of this geometry.
+ * @return a copy of this geometry.
*/
public Geometry copy() {
Geometry geom = createInstance();
@@ -502,11 +534,11 @@ public Geometry copy() {
}
/**
- * Returns boundary of this geometry.
- *
* Polygon and Envelope boundary is a Polyline. For Polyline and Line, the
* boundary is a Multi_point consisting of path endpoints. For Multi_point
* and Point NULL is returned.
+ *
+ * @return the boundary of this geometry
*/
public abstract Geometry getBoundary();
@@ -514,7 +546,12 @@ public Geometry copy() {
* Replaces NaNs in the attribute with the given value.
* If the geometry is not empty, it adds the attribute if geometry does not have it yet, and replaces the values.
* If the geometry is empty, it adds the attribute and does not set any values.
- *
+ *
+ * @param semantics
+ * the {@link VertexDescription.Semantics} NaN replacement - TODO
+ *
+ * @param value
+ * the element value for replacement - TODO
*/
public abstract void replaceNaNs(int semantics, double value);
@@ -586,11 +623,16 @@ public String toString() {
}
/**
- *Returns count of geometry vertices:
- *1 for Point, 4 for Envelope, get_point_count for MultiVertexGeometry types,
- *2 for segment types
- *Returns 0 if geometry is empty.
- */
+ * Returns count of geometry vertices:
+ * 1 for Point, 4 for Envelope, get_point_count for MultiVertexGeometry types,
+ * 2 for segment types
+ * Returns 0 if geometry is empty.
+ *
+ * @param geom
+ * input to perform the vertex count on
+ *
+ * @return count of geometry vertices
+ */
public static int vertex_count(Geometry geom) {
Geometry.Type gt = geom.getType();
if (Geometry.isMultiVertex(gt.value()))
diff --git a/src/main/java/com/esri/core/geometry/GeometryCursor.java b/src/main/java/com/esri/core/geometry/GeometryCursor.java
index 3c2ef5d6..3ee75b24 100644
--- a/src/main/java/com/esri/core/geometry/GeometryCursor.java
+++ b/src/main/java/com/esri/core/geometry/GeometryCursor.java
@@ -27,25 +27,36 @@
*An abstract Geometry Cursor class.
*/
public abstract class GeometryCursor {
- /**
- *Moves the cursor to the next Geometry. Returns null when reached the end.
- *The behavior of the cursor is undefined after the method returns null.
- */
- public abstract Geometry next();
+
+ /**
+ * Moves the cursor to the next Geometry. Returns null when reached the end.
+ * The behavior of the cursor is undefined after the method returns null.
+ *
+ * @return the next geometry or null when the end is reached
+ */
+ public abstract Geometry next();
+
+ /**
+ * An ID is associated with the current Geometry. The ID is passed along
+ * and is returned by some operators to preserve relationship between the
+ * input and output geometry classes.
+ *
+ * The ID is propagated across the operations when possible as the ID
+ * cannot always be preserved by some operations.
+ *
+ * @return the ID of the current geometry
+ */
+ public abstract int getGeometryID();
/**
- *Returns the ID of the current geometry. The ID is propagated across the operations (when possible).
- *
- *Returns an ID associated with the current Geometry. The ID is passed along and is returned by some operators to preserve relationship between the input and output geometry classes.
- *It is not always possible to preserve an ID during an operation.
- */
- public abstract int getGeometryID();
- /**
- *Executes a unit of work on the cursor.
- *@return Returns true, if there is a geometry ready to be pulled using next().
- *
- *This method is to be used together with the tick() method on the ListeningGeometryCursor.
- *Call tock() for each tick() on the ListeningGeometryCursor.
- */
- public boolean tock() { return true; }
+ * Executes a unit of work on the cursor.
+ *
+ * This method is to be used together with the tick() method on the
+ * ListeningGeometryCursor.
+ * Call tock() for each tick() on the ListeningGeometryCursor.
+ *
+ * @return {@code true}, if there is a geometry ready to be pulled using
+ * next().
+ */
+ public boolean tock() { return true; }
}
diff --git a/src/main/java/com/esri/core/geometry/GeometryEngine.java b/src/main/java/com/esri/core/geometry/GeometryEngine.java
index e027dd6c..fe62bc6f 100644
--- a/src/main/java/com/esri/core/geometry/GeometryEngine.java
+++ b/src/main/java/com/esri/core/geometry/GeometryEngine.java
@@ -43,16 +43,17 @@ public class GeometryEngine {
private static OperatorFactoryLocal factory = OperatorFactoryLocal
.getInstance();
-
+
/**
* Imports the MapGeometry from its JSON representation. M and Z values are
* not imported from JSON representation.
*
* See OperatorImportFromJson.
*
- * @param json
- * The JSON representation of the geometry (with spatial
- * reference).
+ * @param json
+ * The JSON representation of the geometry (with spatial
+ * reference).
+ *
* @return The MapGeometry instance containing the imported geometry and its
* spatial reference.
*/
@@ -67,13 +68,18 @@ public static MapGeometry jsonToGeometry(JsonParser json) {
*
* See OperatorImportFromJson.
*
- * @param json
- * The JSON representation of the geometry (with spatial
- * reference).
+ * @param json
+ * The JSON representation of the geometry (with spatial
+ * reference).
+ *
* @return The MapGeometry instance containing the imported geometry and its
* spatial reference.
- * @throws IOException
- * @throws JsonParseException
+ *
+ * @throws IOException
+ * if an I/O error occurs.
+ *
+ * @throws JsonParseException
+ * if a parse error occurs.
*/
public static MapGeometry jsonToGeometry(String json) throws JsonParseException, IOException {
MapGeometry geom = OperatorImportFromJson.local().execute(Geometry.Type.Unknown, json);
@@ -87,11 +93,14 @@ public static MapGeometry jsonToGeometry(String json) throws JsonParseException,
*
* @see GeometryEngine#geometryToJson(SpatialReference spatialiReference,
* Geometry geometry)
- * @param wkid
- * The spatial reference Well Known ID to be used for the JSON
- * representation.
- * @param geometry
- * The geometry to be exported to JSON.
+ *
+ * @param wkid
+ * The spatial reference Well Known ID to be used for the JSON
+ * representation.
+ *
+ * @param geometry
+ * The geometry to be exported to JSON.
+ *
* @return The JSON representation of the specified Geometry.
*/
public static String geometryToJson(int wkid, Geometry geometry) {
@@ -105,10 +114,12 @@ public static String geometryToJson(int wkid, Geometry geometry) {
*
* See OperatorExportToJson.
*
- * @param spatialReference
- * The spatial reference of associated object.
- * @param geometry
- * The geometry.
+ * @param spatialReference
+ * The spatial reference of associated object.
+ *
+ * @param geometry
+ * The geometry.
+ *
* @return The JSON representation of the specified geometry.
*/
public static String geometryToJson(SpatialReference spatialReference,
@@ -134,10 +145,12 @@ public static String geometryToGeoJson(Geometry geometry) {
* @see GeometryEngine#geometryToGeoJson(SpatialReference spatialReference,
* Geometry geometry)
*
- * @param wkid
- * The spatial reference Well Known ID to be used for the GeoJSON representation.
- * @param geometry
- * The geometry to be exported to GeoJSON.
+ * @param wkid
+ * The spatial reference Well Known ID to be used for the GeoJSON representation.
+ *
+ * @param geometry
+ * The geometry to be exported to GeoJSON.
+ *
* @return The GeoJSON representation of the specified geometry.
*/
public static String geometryToGeoJson(int wkid, Geometry geometry) {
@@ -150,10 +163,12 @@ public static String geometryToGeoJson(int wkid, Geometry geometry) {
*
*See OperatorImportFromGeoJson.
*
- * @param spatialReference
- * The spatial reference of associated object.
- * @param geometry
- * The geometry.
+ * @param spatialReference
+ * The spatial reference of associated object.
+ *
+ * @param geometry
+ * The geometry
+ *
* @return The GeoJSON representation of the specified geometry.
*/
public static String geometryToGeoJson(SpatialReference spatialReference,
@@ -169,18 +184,21 @@ public static String geometryToGeoJson(SpatialReference spatialReference,
*
* See OperatorImportFromESRIShape.
*
- * @param esriShapeBuffer
- * The buffer containing geometry in the ESRI shape file format.
- * @param geometryType
- * The required type of the Geometry to be imported. Use
- * Geometry.Type.Unknown if the geometry type needs to be
- * determined from the buffer content.
+ * @param esriShapeBuffer
+ * The buffer containing geometry in the ESRI shape file format.
+ *
+ * @param geometryType
+ * The required type of the Geometry to be imported. Use
+ * Geometry.Type.Unknown if the geometry type needs to be
+ * determined from the buffer content.
+ *
* @return The geometry or null if the buffer contains null shape.
+ *
* @throws GeometryException
- * when the geometryType is not Geometry.Type.Unknown and the
- * buffer contains geometry that cannot be converted to the
- * given geometryType. or the buffer is corrupt. Another
- * exception possible is IllegalArgumentsException.
+ * when the geometryType is not Geometry.Type.Unknown and the
+ * buffer contains geometry that cannot be converted to the
+ * given geometryType. or the buffer is corrupt. Another
+ * exception possible is IllegalArgumentsException.
*/
public static Geometry geometryFromEsriShape(byte[] esriShapeBuffer,
Geometry.Type geometryType) {
@@ -199,8 +217,9 @@ public static Geometry geometryFromEsriShape(byte[] esriShapeBuffer,
*
* See OperatorExportToESRIShape.
*
- * @param geometry
- * The geometry to export. (null value is not allowed)
+ * @param geometry
+ * The geometry to export. (null value is not allowed)
+ *
* @return Array containing the exported ESRI shape file.
*/
public static byte[] geometryToEsriShape(Geometry geometry) {
@@ -216,12 +235,22 @@ public static byte[] geometryToEsriShape(Geometry geometry) {
*
* See OperatorImportFromWkt.
*
- * @param wkt The string containing the geometry in WKT format.
- * @param importFlags Use the {@link WktImportFlags} interface.
- * @param geometryType The required type of the Geometry to be imported. Use Geometry.Type.Unknown if the geometry type needs to be determined from the WKT context.
+ * @param wkt
+ * The string containing the geometry in WKT format.
+ *
+ * @param importFlags
+ * Use the {@link WktImportFlags} interface.
+ *
+ * @param geometryType
+ * The required type of the Geometry to be imported. Use Geometry.Type.Unknown if the geometry type needs to be determined from the WKT context.
+ *
* @return The geometry.
- * @throws GeometryException when the geometryType is not Geometry.Type.Unknown and the WKT contains a geometry that cannot be converted to the given geometryType.
- * @throws IllegalArgument exception if an error is found while parsing the WKT string.
+ *
+ * @throws GeometryException
+ * when the geometryType is not Geometry.Type.Unknown and the WKT contains a geometry that cannot be converted to the given geometryType.
+ *
+ * @throws IllegalArgumentException
+ * exception if an error is found while parsing the WKT string.
*/
public static Geometry geometryFromWkt(String wkt, int importFlags,
Geometry.Type geometryType) {
@@ -235,12 +264,22 @@ public static Geometry geometryFromWkt(String wkt, int importFlags,
*
* See OperatorImportFromGeoJson.
*
- * @param geoJson The string containing the geometry in geoJson format.
- * @param importFlags Use the {@link GeoJsonImportFlags} interface.
- * @param geometryType The required type of the Geometry to be imported. Use Geometry.Type.Unknown if the geometry type needs to be determined from the geoJson context.
+ * @param geoJson
+ * The string containing the geometry in geoJson format.
+ *
+ * @param importFlags
+ * Use the {@link GeoJsonImportFlags} interface.
+ *
+ * @param geometryType
+ * The required type of the Geometry to be imported. Use Geometry.Type.Unknown if the geometry type needs to be determined from the geoJson context.
+ *
* @return The geometry.
- * @throws GeometryException when the geometryType is not Geometry.Type.Unknown and the geoJson contains a geometry that cannot be converted to the given geometryType.
- * @throws IllegalArgument exception if an error is found while parsing the geoJson string.
+ *
+ * @throws GeometryException
+ * when the geometryType is not Geometry.Type.Unknown and the geoJson contains a geometry that cannot be converted to the given geometryType.
+ *
+ * @throws IllegalArgumentException
+ * exception if an error is found while parsing the geoJson string.
*/
public static MapGeometry geometryFromGeoJson(String geoJson,
int importFlags, Geometry.Type geometryType) throws JSONException {
@@ -254,9 +293,13 @@ public static MapGeometry geometryFromGeoJson(String geoJson,
*
* See OperatorExportToWkt.
*
- * @param geometry The geometry to export. (null value is not allowed)
- * @param exportFlags Use the {@link WktExportFlags} interface.
- * @return A String containing the exported geometry in WKT format.
+ * @param geometry
+ * The geometry to export. (null value is not allowed)
+ *
+ * @param exportFlags
+ * Use the {@link WktExportFlags} interface.
+ *
+ * @return a String containing the exported geometry in WKT format.
*/
public static String geometryToWkt(Geometry geometry, int exportFlags) {
OperatorExportToWkt op = (OperatorExportToWkt) factory
@@ -270,11 +313,13 @@ public static String geometryToWkt(Geometry geometry, int exportFlags) {
*
* See OperatorUnion.
*
- * @param geometries
- * The geometries to union.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return The geometry object representing the resultant union.
+ * @param geometries
+ * The geometries to union.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return the geometry object representing the resultant union.
*/
public static Geometry union(Geometry[] geometries,
SpatialReference spatialReference) {
@@ -294,13 +339,16 @@ public static Geometry union(Geometry[] geometries,
*
* See OperatorDifference.
*
- * @param geometry1
- * The geometry being subtracted.
- * @param substractor
- * The geometry object to subtract from.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return The geometry of the differences.
+ * @param geometry1
+ * The geometry being subtracted.
+ *
+ * @param substractor
+ * The geometry object to subtract from.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return the geometry of the differences.
*/
public static Geometry difference(Geometry geometry1, Geometry substractor,
SpatialReference spatialReference) {
@@ -316,13 +364,16 @@ public static Geometry difference(Geometry geometry1, Geometry substractor,
*
* See OperatorSymmetricDifference.
*
- * @param leftGeometry
- * is one of the Geometry instances in the XOR operation.
- * @param rightGeometry
- * is one of the Geometry instances in the XOR operation.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return Returns the result of the symmetric difference.
+ * @param leftGeometry
+ * is one of the Geometry instances in the XOR operation.
+ *
+ * @param rightGeometry
+ * is one of the Geometry instances in the XOR operation.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return the result of the symmetric difference.
*/
public static Geometry symmetricDifference(Geometry leftGeometry,
Geometry rightGeometry, SpatialReference spatialReference) {
@@ -338,13 +389,16 @@ public static Geometry symmetricDifference(Geometry leftGeometry,
*
* See OperatorEquals.
*
- * @param geometry1
- * Geometry.
- * @param geometry2
- * Geometry.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return TRUE if both geometry objects are equal.
+ * @param geometry1
+ * first geometry for equality comparison.
+ *
+ * @param geometry2
+ * second geometry for equality comparison.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return {@code true} if both geometry objects are equal.
*/
public static boolean equals(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
@@ -356,8 +410,18 @@ public static boolean equals(Geometry geometry1, Geometry geometry2,
}
/**
- * See OperatorDisjoint.
- *
+ * See {@link OperatorDisjoint}.
+ *
+ * @param geometry1
+ * the first for comparison
+ *
+ * @param geometry2
+ * the second for comparison
+ *
+ * @param spatialReference
+ * of the supplied geometry
+ *
+ * @return {@code true} if the geometry1 is disjoint to geometry2.
*/
public static boolean disjoint(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
@@ -374,10 +438,12 @@ public static boolean disjoint(Geometry geometry1, Geometry geometry2,
*
* See OperatorIntersection (also for dimension specific intersection).
*
- * @param inputGeometries
- * An array of geometry objects.
- * @param geometry
- * The geometry object.
+ * @param inputGeometries
+ * An array of geometry objects.
+ *
+ * @param geometry
+ * The geometry object.
+ *
* @return Any array of geometry objects showing the intersection.
*/
static Geometry[] intersect(Geometry[] inputGeometries, Geometry geometry,
@@ -406,12 +472,15 @@ static Geometry[] intersect(Geometry[] inputGeometries, Geometry geometry,
*
* See OperatorIntersection.
*
- * @param geometry1
- * The first geometry.
- * @param intersector
- * The geometry to intersect the first geometry.
- * @param spatialReference
- * The spatial reference of the geometries.
+ * @param geometry1
+ * The first geometry.
+ *
+ * @param intersector
+ * The geometry to intersect the first geometry.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
* @return The geometry created through intersection.
*/
public static Geometry intersect(Geometry geometry1, Geometry intersector,
@@ -428,15 +497,18 @@ public static Geometry intersect(Geometry geometry1, Geometry intersector,
*
* See OperatorWithin.
*
- * @param geometry1
- * The base geometry that is tested for within relationship to
- * the other geometry.
- * @param geometry2
- * The comparison geometry that is tested for the contains
- * relationship to the other geometry.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return TRUE if the first geometry is within the other geometry.
+ * @param geometry1
+ * The base geometry that is tested for within relationship to
+ * the other geometry.
+ *
+ * @param geometry2
+ * The comparison geometry that is tested for the contains
+ * relationship to the other geometry.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return {@code true} if the first geometry is within the other geometry.
*/
public static boolean within(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
@@ -452,15 +524,18 @@ public static boolean within(Geometry geometry1, Geometry geometry2,
*
* See OperatorContains.
*
- * @param geometry1
- * The geometry that is tested for the contains relationship to
- * the other geometry..
- * @param geometry2
- * The geometry that is tested for within relationship to the
+ * @param geometry1
+ * The geometry that is tested for the contains relationship to
+ * the other geometry.
+ *
+ * @param geometry2
+ * The geometry that is tested for within relationship to the
* other geometry.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return TRUE if geometry1 contains geometry2.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return {@code true} if geometry1 contains geometry2.
*/
public static boolean contains(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
@@ -476,13 +551,16 @@ public static boolean contains(Geometry geometry1, Geometry geometry2,
*
* See OperatorCrosses.
*
- * @param geometry1
- * The geometry to cross.
- * @param geometry2
- * The geometry being crossed.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return TRUE if geometry1 crosses geometry2.
+ * @param geometry1
+ * The geometry to cross.
+ *
+ * @param geometry2
+ * The geometry being crossed.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return {@code true} if geometry1 crosses geometry2.
*/
public static boolean crosses(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
@@ -498,13 +576,16 @@ public static boolean crosses(Geometry geometry1, Geometry geometry2,
*
* See OperatorTouches.
*
- * @param geometry1
- * The geometry to touch.
- * @param geometry2
- * The geometry to be touched.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return TRUE if geometry1 touches geometry2.
+ * @param geometry1
+ * The geometry to touch.
+ *
+ * @param geometry2
+ * The geometry to be touched.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return {@code true} if geometry1 touches geometry2.
*/
public static boolean touches(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
@@ -518,15 +599,18 @@ public static boolean touches(Geometry geometry1, Geometry geometry2,
/**
* Indicates if one geometry overlaps another geometry.
*
- * See OperatorOverlaps.
+ * See {@link OperatorOverlaps}.
*
- * @param geometry1
- * The geometry to overlap.
- * @param geometry2
- * The geometry to be overlapped.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @return TRUE if geometry1 overlaps geometry2.
+ * @param geometry1
+ * The geometry to overlap.
+ *
+ * @param geometry2
+ * The geometry to be overlapped.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @return {@code true} if geometry1 overlaps geometry2.
*/
public static boolean overlaps(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
@@ -542,15 +626,20 @@ public static boolean overlaps(Geometry geometry1, Geometry geometry2,
*
* See OperatorRelate.
*
- * @param geometry1
- * The first geometry for the relation.
- * @param geometry2
- * The second geometry for the relation.
- * @param spatialReference
- * The spatial reference of the geometries.
- * @param relation
- * The DE-9IM relation.
- * @return TRUE if the given relation holds between geometry1 and geometry2.
+ * @param geometry1
+ * The first geometry for the relation.
+ *
+ * @param geometry2
+ * The second geometry for the relation.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @param relation
+ * The DE-9IM relation.
+ *
+ * @return {@code true} if the given relation holds between geometry1 and
+ * geometry2.
*/
public static boolean relate(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference, String relation) {
@@ -566,13 +655,16 @@ public static boolean relate(Geometry geometry1, Geometry geometry2,
*
* See OperatorDistance.
*
- * @param geometry1
- * Geometry.
- * @param geometry2
- * Geometry.
- * @param spatialReference
- * The spatial reference of the geometries. This parameter is not
- * used and can be null.
+ * @param geometry1
+ * Geometry.
+ *
+ * @param geometry2
+ * Geometry.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries. This parameter is not
+ * used and can be null.
+ *
* @return The distance between the two geometries.
*/
public static double distance(Geometry geometry1, Geometry geometry2,
@@ -588,12 +680,15 @@ public static double distance(Geometry geometry1, Geometry geometry2,
*
* See OperatorClip.
*
- * @param geometry
- * The geometry to be clipped.
- * @param envelope
- * The envelope used to clip.
- * @param spatialReference
- * The spatial reference of the geometries.
+ * @param geometry
+ * The geometry to be clipped.
+ *
+ * @param envelope
+ * The envelope used to clip.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
* @return The geometry created by clipping.
*/
public static Geometry clip(Geometry geometry, Envelope envelope,
@@ -621,12 +716,15 @@ public static Geometry clip(Geometry geometry, Envelope envelope,
*
* See OperatorCut.
*
- * @param cuttee
- * The geometry to be cut.
- * @param cutter
- * The polyline to cut the geometry.
- * @param spatialReference
- * The spatial reference of the geometries.
+ * @param cuttee
+ * The geometry to be cut.
+ *
+ * @param cutter
+ * The polyline to cut the geometry.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
* @return An array of geometries created from cutting.
*/
public static Geometry[] cut(Geometry cuttee, Polyline cutter,
@@ -647,7 +745,8 @@ public static Geometry[] cut(Geometry cuttee, Polyline cutter,
}
return cutsList.toArray(new Geometry[0]);
- }
+ }
+
/**
* Calculates a buffer polygon for each geometry at each of the
* corresponding specified distances. It is assumed that all geometries have
@@ -656,11 +755,21 @@ public static Geometry[] cut(Geometry cuttee, Polyline cutter,
*
* See OperatorBuffer.
*
- * @param geometries An array of geometries to be buffered.
- * @param spatialReference The spatial reference of the geometries.
- * @param distances The corresponding distances for the input geometries to be buffered.
- * @param toUnionResults TRUE if all geometries buffered at a given distance are to be unioned into a single polygon.
- * @return The buffer of the geometries.
+ * @param geometries
+ * An array of geometries to be buffered.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometries.
+ *
+ * @param distances
+ * The corresponding distances for the input geometries to be
+ * buffered.
+ *
+ * @param toUnionResults
+ * TRUE if all geometries buffered at a given distance are to be
+ * unioned into a single polygon.
+ *
+ * @return the buffer of the geometries.
*/
public static Polygon[] buffer(Geometry[] geometries,
SpatialReference spatialReference, double[] distances,
@@ -693,17 +802,24 @@ public static Polygon[] buffer(Geometry[] geometries,
return buffers;
}
}
-
+
+
/**
* Calculates a buffer polygon of the geometry as specified by the
* distance input. The buffer is implemented in the xy-plane.
*
* See OperatorBuffer
*
- * @param geometry Geometry to be buffered.
- * @param spatialReference The spatial reference of the geometry.
- * @param distance The specified distance for buffer. Same units as the spatial reference.
- * @return The buffer polygon at the specified distances.
+ * @param geometry
+ * Geometry to be buffered.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometry.
+ *
+ * @param distance
+ * The specified distance for buffer. Same units as the spatial reference.
+ *
+ * @return the buffer polygon at the specified distances.
*/
public static Polygon buffer(Geometry geometry,
SpatialReference spatialReference, double distance) {
@@ -719,22 +835,25 @@ public static Polygon buffer(Geometry geometry,
/**
* Calculates the convex hull geometry.
*
- * See OperatorConvexHull.
- *
- * @param geometry The input geometry.
- * @return Returns the convex hull.
- *
- * For a Point - returns the same point. For an Envelope -
- * returns the same envelope. For a MultiPoint - If the point
- * count is one, returns the same multipoint. If the point count
- * is two, returns a polyline of the points. Otherwise computes
- * and returns the convex hull polygon. For a Segment - returns a
- * polyline consisting of the segment. For a Polyline - If
- * consists of only one segment, returns the same polyline.
- * Otherwise computes and returns the convex hull polygon. For a
- * Polygon - If more than one path, or if the path isn't already
- * convex, computes and returns the convex hull polygon.
- * Otherwise returns the same polygon.
+ * See {@link OperatorConvexHull}.
+ *
+ * For a Point - returns the same point. For an Envelope -
+ * returns the same envelope. For a MultiPoint - If the point
+ * count is one, returns the same multipoint. If the point count
+ * is two, returns a polyline of the points. Otherwise computes
+ * and returns the convex hull polygon. For a Segment - returns a
+ * polyline consisting of the segment. For a Polyline - If
+ * consists of only one segment, returns the same polyline.
+ * Otherwise computes and returns the convex hull polygon. For a
+ * Polygon - If more than one path, or if the path isn't already
+ * convex, computes and returns the convex hull polygon.
+ * Otherwise returns the same polygon.
+ *
+ * @param geometry
+ * The input geometry.
+ *
+ * @return the convex hull.
+ *
*/
public static Geometry convexHull(Geometry geometry) {
OperatorConvexHull op = (OperatorConvexHull) factory
@@ -747,14 +866,17 @@ public static Geometry convexHull(Geometry geometry) {
*
* See OperatorConvexHull
*
- * @param geometries
- * The input geometry array.
- * @param b_merge
- * Put true if you want the convex hull of all the geometries in
- * the array combined. Put false if you want the convex hull of
- * each geometry in the array individually.
- * @return Returns an array of convex hulls. If b_merge is true, the result
- * will be a one element array consisting of the merged convex hull.
+ * @param geometries
+ * The input geometry array.
+ *
+ * @param b_merge
+ * Put true if you want the convex hull of all the geometries in
+ * the array combined. Put false if you want the convex hull of
+ * each geometry in the array individually.
+ *
+ * @return an array of convex hulls. If b_merge is true, the result
+ * will be a one element array consisting of the merged convex
+ * hull.
*/
public static Geometry[] convexHull(Geometry[] geometries, boolean b_merge) {
OperatorConvexHull op = (OperatorConvexHull) factory
@@ -781,13 +903,21 @@ public static Geometry[] convexHull(Geometry[] geometries, boolean b_merge) {
* Finds the coordinate of the geometry which is closest to the specified
* point.
*
- * See OperatorProximity2D.
+ * See {@link OperatorProximity2D}.
*
- * @param inputPoint
- * The point to find the nearest coordinate in the geometry for.
- * @param geometry
- * The geometry to consider.
- * @return Proximity2DResult containing the nearest coordinate.
+ * @param inputPoint
+ * The point to find the nearest coordinate in the geometry for.
+ *
+ * @param geometry
+ * The geometry to consider.
+ *
+ * @param bTestPolygonInterior
+ * When true and geometry is a polygon the function will test
+ * if the input_point is inside of the polygon. When false,
+ * the function will not check if the point is inside of the
+ * polygon but only determine proximity to the boundary.
+ *
+ * @return a Proximity2DResult containing the nearest coordinate.
*/
public static Proximity2DResult getNearestCoordinate(Geometry geometry,
Point inputPoint, boolean bTestPolygonInterior) {
@@ -805,11 +935,13 @@ public static Proximity2DResult getNearestCoordinate(Geometry geometry,
*
* See OperatorProximity2D.
*
- * @param inputPoint
- * The point to find the nearest vertex of the geometry for.
- * @param geometry
- * The geometry to consider.
- * @return Proximity2DResult containing the nearest vertex.
+ * @param inputPoint
+ * The point to find the nearest vertex of the geometry for.
+ *
+ * @param geometry
+ * The geometry to consider.
+ *
+ * @return a Proximity2DResult containing the nearest vertex.
*/
public static Proximity2DResult getNearestVertex(Geometry geometry,
Point inputPoint) {
@@ -826,15 +958,19 @@ public static Proximity2DResult getNearestVertex(Geometry geometry,
*
* See OperatorProximity2D.
*
- * @param inputPoint
- * The point to start from.
- * @param geometry
- * The geometry to consider.
- * @param searchRadius
- * The search radius.
- * @param maxVertexCountToReturn
- * The maximum number number of vertices to return.
- * @return Proximity2DResult containing the array of nearest vertices.
+ * @param inputPoint
+ * The point to start from.
+ *
+ * @param geometry
+ * The geometry to consider.
+ *
+ * @param searchRadius
+ * The search radius.
+ *
+ * @param maxVertexCountToReturn
+ * The maximum number number of vertices to return.
+ *
+ * @return a Proximity2DResult containing the array of nearest vertices.
*/
public static Proximity2DResult[] getNearestVertices(Geometry geometry,
Point inputPoint, double searchRadius, int maxVertexCountToReturn) {
@@ -852,11 +988,13 @@ public static Proximity2DResult[] getNearestVertices(Geometry geometry,
*
* See OperatorSimplify and See OperatorSimplifyOGC.
*
- * @param geometry
- * The geometry to be simplified.
- * @param spatialReference
- * The spatial reference of the geometry to be simplified.
- * @return The simplified geometry.
+ * @param geometry
+ * The geometry to be simplified.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometry to be simplified.
+ *
+ * @return the simplified geometry.
*/
public static Geometry simplify(Geometry geometry,
SpatialReference spatialReference) {
@@ -871,11 +1009,13 @@ public static Geometry simplify(Geometry geometry,
*
* See OperatorSimplify.
*
- * @param geometry
- * The geometry to be checked.
- * @param spatialReference
- * The spatial reference of the geometry.
- * @return TRUE if the geometry is simple.
+ * @param geometry
+ * The geometry to be checked.
+ *
+ * @param spatialReference
+ * The spatial reference of the geometry.
+ *
+ * @return {@code true} if the geometry is simple.
*/
static boolean isSimple(Geometry geometry, SpatialReference spatialReference) {
OperatorSimplify op = (OperatorSimplify) factory
@@ -883,14 +1023,20 @@ static boolean isSimple(Geometry geometry, SpatialReference spatialReference) {
boolean result = op.isSimpleAsFeature(geometry, spatialReference, null);
return result;
}
-
+
+
/**
* A geodesic distance is the shortest distance between any two points on the earth's surface when the earth's
* surface is approximated by a spheroid. The function returns the shortest distance between two points on the
- * WGS84 spheroid.
- * @param ptFrom The "from" point: long, lat in degrees.
- * @param ptTo The "to" point: long, lat in degrees.
- * @return The geodesic distance between two points in meters.
+ * WGS84 spheroid.
+ *
+ * @param ptFrom
+ * The "from" point: long, lat in degrees.
+ *
+ * @param ptTo
+ * The "to" point: long, lat in degrees.
+ *
+ * @return the geodesic distance between two points in meters.
*/
public static double geodesicDistanceOnWGS84(Point ptFrom, Point ptTo) {
return SpatialReferenceImpl.geodesicDistanceOnWGS84Impl(ptFrom, ptTo);
diff --git a/src/main/java/com/esri/core/geometry/IntervalTreeImpl.java b/src/main/java/com/esri/core/geometry/IntervalTreeImpl.java
index acdc10d8..79f0076e 100644
--- a/src/main/java/com/esri/core/geometry/IntervalTreeImpl.java
+++ b/src/main/java/com/esri/core/geometry/IntervalTreeImpl.java
@@ -29,9 +29,13 @@ final class IntervalTreeImpl {
static final class IntervalTreeIteratorImpl {
/**
* Resets the iterator to a starting state on the Interval_tree_impl
- * using the input Envelope_1D interval as the query \param query The
- * Envelope_1D interval used for the query. \param tolerance The
- * tolerance used for the intersection tests.
+ * using the input Envelope_1D interval as the query
+ *
+ * @param query
+ * The Envelope_1D interval used for the query.
+ *
+ * @param tolerance
+ * The tolerance used for the intersection tests.
*/
void resetIterator(Envelope1D query, double tolerance) {
m_query.vmin = query.vmin - tolerance;
@@ -43,9 +47,16 @@ void resetIterator(Envelope1D query, double tolerance) {
/**
* Resets the iterator to a starting state on the Interval_tree_impl
- * using the input Envelope_1D interval as the query \param query The
- * Envelope_1D interval used for the query. \param tolerance The
- * tolerance used for the intersection tests.
+ * using the input Envelope_1D interval as the query
+ *
+ * @param query_min
+ * The Envelope_1D interval used for the query. TODO verify
+ *
+ * @param query_max
+ * The Envelope_1D interval used for the query. TODO verify
+ *
+ * @param tolerance
+ * The tolerance used for the intersection tests.
*/
void resetIterator(double query_min, double query_max, double tolerance) {
if (query_min > query_max)
@@ -60,9 +71,13 @@ void resetIterator(double query_min, double query_max, double tolerance) {
/**
* Resets the iterator to a starting state on the Interval_tree_impl
- * using the input double as the stabbing query \param query The double
- * used for the query. \param tolerance The tolerance used for the
- * intersection tests.
+ * using the input double as the stabbing query
+ *
+ * @param query
+ * The double used for the query.
+ *
+ * @param tolerance
+ * The tolerance used for the intersection tests.
*/
void resetIterator(double query, double tolerance) {
m_query.vmin = query - tolerance;
@@ -478,8 +493,10 @@ void endConstruction() {
/**
* Inserts the interval from the given index into the Interval_tree_impl.
- * This operation can only be performed in the offline dynamic case. \param
- * index The index containing the interval to be inserted.
+ * This operation can only be performed in the offline dynamic case.
+ *
+ * @param index
+ * The index containing the interval to be inserted.
*/
void insert(int index) {
if (!m_b_offline_dynamic || !m_b_construction_ended)
@@ -521,8 +538,11 @@ void insert(int index) {
}
/**
- * Deletes the interval from the Interval_tree_impl. \param index The index
- * containing the interval to be deleted from the Interval_tree_impl.
+ * Deletes the interval from the Interval_tree_impl.
+ *
+ * @param index
+ * the index containing the interval to be deleted from the
+ * Interval_tree_impl.
*/
void remove(int index) {
if (!m_b_offline_dynamic || !m_b_construction_ended)
@@ -637,9 +657,13 @@ int size() {
* Gets an iterator on the Interval_tree_impl using the input Envelope_1D
* interval as the query. To reuse the existing iterator on the same
* Interval_tree_impl but with a new query, use the reset_iterator function
- * on the Interval_tree_iterator_impl. \param query The Envelope_1D interval
- * used for the query. \param tolerance The tolerance used for the
- * intersection tests.
+ * on the Interval_tree_iterator_impl.
+ *
+ * @param query
+ * The Envelope_1D interval used for the query.
+ *
+ * @param tolerance
+ * The tolerance used for the intersection tests.
*/
IntervalTreeIteratorImpl getIterator(Envelope1D query, double tolerance) {
return new IntervalTreeImpl.IntervalTreeIteratorImpl(this, query,
@@ -650,9 +674,13 @@ IntervalTreeIteratorImpl getIterator(Envelope1D query, double tolerance) {
* Gets an iterator on the Interval_tree_impl using the input double as the
* stabbing query. To reuse the existing iterator on the same
* Interval_tree_impl but with a new query, use the reset_iterator function
- * on the Interval_tree_iterator_impl. \param query The double used for the
- * stabbing query. \param tolerance The tolerance used for the intersection
- * tests.
+ * on the Interval_tree_iterator_impl.
+ *
+ * @param query
+ * The double used for the stabbing query.
+ *
+ * @param tolerance
+ * The tolerance used for the intersection tests.
*/
IntervalTreeIteratorImpl getIterator(double query, double tolerance) {
return new IntervalTreeImpl.IntervalTreeIteratorImpl(this, query,
diff --git a/src/main/java/com/esri/core/geometry/JsonCursor.java b/src/main/java/com/esri/core/geometry/JsonCursor.java
index 0af0024f..1af6f146 100644
--- a/src/main/java/com/esri/core/geometry/JsonCursor.java
+++ b/src/main/java/com/esri/core/geometry/JsonCursor.java
@@ -28,19 +28,22 @@
*/
public abstract class JsonCursor {
- /**
- * Moves the cursor to the next string. Returns null when reached the end.
- */
- public abstract String next();
-
- /**
- * Returns the ID of the current geometry. The ID is propagated across the
- * operations (when possible).
- *
- * Returns an ID associated with the current Geometry. The ID is passed
- * along and is returned by some operators to preserve relationship between
- * the input and output geometry classes. It is not always possible to
- * preserve an ID during an operation.
- */
- public abstract int getID();
+ /**
+ * Moves the cursor to the next string.
+ *
+ * @return the next value or null when the end is reached.
+ */
+ public abstract String next();
+
+ /**
+ * Returns an ID associated with the current Geometry. The ID is
+ * propagated across the operations (when possible).
+ * The ID is passed along and is returned by some operators to preserve
+ * relationship between the input and output geometry classes. It is not
+ * always possible to preserve an ID during an operation.
+ *
+ * @return the ID of the current geometry. The ID is propagated across the
+ * operations (when possible).
+ */
+ public abstract int getID();
}
diff --git a/src/main/java/com/esri/core/geometry/MapGeometry.java b/src/main/java/com/esri/core/geometry/MapGeometry.java
index d7161d52..0259250e 100644
--- a/src/main/java/com/esri/core/geometry/MapGeometry.java
+++ b/src/main/java/com/esri/core/geometry/MapGeometry.java
@@ -53,7 +53,7 @@ public MapGeometry(Geometry g, SpatialReference _sr) {
}
/**
- * Gets the only geometry without the spatial reference from the
+ * @return the only geometry without the spatial reference from the
* MapGeometry.
*/
public Geometry getGeometry() {
@@ -82,7 +82,7 @@ public void setSpatialReference(SpatialReference sr) {
}
/**
- * Gets the spatial reference for this MapGeometry.
+ * @return the spatial reference for this MapGeometry.
*/
public SpatialReference getSpatialReference() {
return sr;
diff --git a/src/main/java/com/esri/core/geometry/MathUtils.java b/src/main/java/com/esri/core/geometry/MathUtils.java
index 208fe4ba..c9394d58 100644
--- a/src/main/java/com/esri/core/geometry/MathUtils.java
+++ b/src/main/java/com/esri/core/geometry/MathUtils.java
@@ -36,8 +36,10 @@ static final class KahanSummator {
// startValue)
/**
- * initialize to the given start value. \param startValue_ The value to
- * be added to the accumulated sum.
+ * initialize to the given start value.
+ *
+ * @param startValue_
+ * The value to be added to the accumulated sum.
*/
KahanSummator(double startValue_) {
startValue = startValue_;
diff --git a/src/main/java/com/esri/core/geometry/MultiPath.java b/src/main/java/com/esri/core/geometry/MultiPath.java
index 8e778725..66e9a0f2 100644
--- a/src/main/java/com/esri/core/geometry/MultiPath.java
+++ b/src/main/java/com/esri/core/geometry/MultiPath.java
@@ -209,14 +209,14 @@ public void queryCoordinates(Point[] dst) {
}
/**
- * Returns TRUE if the multipath contains non-linear segments.
+ * @return {@code true} if the multipath contains non-linear segments.
*/
boolean hasNonLinearSegments() {
return m_impl.hasNonLinearSegments();
}
/**
- * Returns total segment count in the MultiPath.
+ * @return total segment count in the MultiPath.
*/
public int getSegmentCount() {
return m_impl.getSegmentCount();
@@ -225,8 +225,9 @@ public int getSegmentCount() {
/**
* Returns the segment count in the given multipath path.
*
- * @param pathIndex
- * The path to determine the segment.
+ * @param pathIndex
+ * The path to determine the segment.
+ *
* @return The segment of the multipath.
*/
public int getSegmentCount(int pathIndex) {
@@ -239,11 +240,12 @@ public int getSegmentCount(int pathIndex) {
/**
* Appends all paths from another multipath.
*
- * @param src
- * The multipath to append to this multipath.
- * @param bReversePaths
- * TRUE if the multipath is added should be added with its paths
- * reversed.
+ * @param src
+ * The multipath to append to this multipath.
+ *
+ * @param bReversePaths
+ * {@code true} if the multipath is added should be added with its
+ * paths reversed.
*/
public void add(MultiPath src, boolean bReversePaths) {
m_impl.add((MultiPathImpl) src._getImpl(), bReversePaths);
@@ -252,12 +254,14 @@ public void add(MultiPath src, boolean bReversePaths) {
/**
* Copies a path from another multipath.
*
- * @param src
- * The multipath to copy from.
- * @param srcPathIndex
- * The index of the path in the the source MultiPath.
- * @param bForward
- * When FALSE, the points are inserted in reverse order.
+ * @param src
+ * The multipath to copy from.
+ *
+ * @param srcPathIndex
+ * The index of the path in the the source MultiPath.
+ *
+ * @param bForward
+ * When FALSE, the points are inserted in reverse order.
*/
public void addPath(MultiPath src, int srcPathIndex, boolean bForward) {
m_impl.addPath((MultiPathImpl) src._getImpl(), srcPathIndex, bForward);
@@ -266,12 +270,14 @@ public void addPath(MultiPath src, int srcPathIndex, boolean bForward) {
/**
* Adds a new path to this multipath.
*
- * @param points
- * The array of points to add to this multipath.
- * @param count
- * The number of points added to the mulitpath.
- * @param bForward
- * When FALSE, the points are inserted in reverse order.
+ * @param points
+ * The array of points to add to this multipath.
+ *
+ * @param count
+ * The number of points added to the mulitpath.
+ *
+ * @param bForward
+ * When FALSE, the points are inserted in reverse order.
*/
void addPath(Point2D[] points, int count, boolean bForward) {
m_impl.addPath(points, count, bForward);
@@ -280,10 +286,11 @@ void addPath(Point2D[] points, int count, boolean bForward) {
/**
* Adds a new segment to this multipath.
*
- * @param segment
- * The segment to be added to this mulitpath.
- * @param bStartNewPath
- * TRUE if a new path will be added.
+ * @param segment
+ * The segment to be added to this mulitpath.
+ *
+ * @param bStartNewPath
+ * TRUE if a new path will be added.
*/
public void addSegment(Segment segment, boolean bStartNewPath) {
m_impl.addSegment(segment, bStartNewPath);
@@ -299,8 +306,8 @@ public void reverseAllPaths() {
/**
* Reverses the order of vertices in the path.
*
- * @param pathIndex
- * The start index of the path to reverse the order.
+ * @param pathIndex
+ * The start index of the path to reverse the order.
*/
public void reversePath(int pathIndex) {
m_impl.reversePath(pathIndex);
@@ -309,8 +316,8 @@ public void reversePath(int pathIndex) {
/**
* Removes the path at the given index.
*
- * @param pathIndex
- * The start index to remove the path.
+ * @param pathIndex
+ * The start index to remove the path.
*/
public void removePath(int pathIndex) {
m_impl.removePath(pathIndex);
@@ -319,15 +326,18 @@ public void removePath(int pathIndex) {
/**
* Inserts a path from another multipath.
*
- * @param pathIndex
- * The start index of the multipath to insert.
- * @param src
- * The multipath to insert into this multipath. Can be the same
- * as the multipath being modified.
- * @param srcPathIndex
- * The start index to insert the path into the multipath.
- * @param bForward
- * When FALSE, the points are inserted in reverse order.
+ * @param pathIndex
+ * The start index of the multipath to insert.
+ *
+ * @param src
+ * The multipath to insert into this multipath. Can be the same
+ * as the multipath being modified.
+ *
+ * @param srcPathIndex
+ * The start index to insert the path into the multipath.
+ *
+ * @param bForward
+ * When FALSE, the points are inserted in reverse order.
*/
public void insertPath(int pathIndex, MultiPath src, int srcPathIndex,
boolean bForward) {
@@ -338,16 +348,20 @@ public void insertPath(int pathIndex, MultiPath src, int srcPathIndex,
/**
* Inserts a path from an array of 2D Points.
*
- * @param pathIndex
- * The path index of the multipath to place the new path.
- * @param points
- * The array of points defining the new path.
- * @param pointsOffset
- * The offset into the array to start reading.
- * @param count
- * The number of points to insert into the new path.
- * @param bForward
- * When FALSE, the points are inserted in reverse order.
+ * @param pathIndex
+ * The path index of the multipath to place the new path.
+ *
+ * @param points
+ * The array of points defining the new path.
+ *
+ * @param pointsOffset
+ * The offset into the array to start reading.
+ *
+ * @param count
+ * The number of points to insert into the new path.
+ *
+ * @param bForward
+ * When FALSE, the points are inserted in reverse order.
*/
void insertPath(int pathIndex, Point2D[] points, int pointsOffset,
int count, boolean bForward) {
@@ -359,24 +373,30 @@ void insertPath(int pathIndex, Point2D[] points, int pointsOffset,
* vertices are connected by linear segments with each other and with the
* existing vertices.
*
- * @param pathIndex
- * The path index in this multipath to insert points to. Must
- * correspond to an existing path.
- * @param beforePointIndex
- * The point index before all other vertices to insert in the
- * given path of this multipath. This value must be between 0 and
- * GetPathSize(pathIndex), or -1 to insert points at the end of
- * the given path.
- * @param src
- * The source multipath.
- * @param srcPathIndex
- * The source path index to copy points from.
- * @param srcPointIndexFrom
- * The start point in the source path to start copying from.
- * @param srcPointCount
- * The count of points to add.
- * @param bForward
- * When FALSE, the points are inserted in reverse order.
+ * @param pathIndex
+ * The path index in this multipath to insert points to. Must
+ * correspond to an existing path.
+ *
+ * @param beforePointIndex
+ * The point index before all other vertices to insert in the
+ * given path of this multipath. This value must be between 0 and
+ * GetPathSize(pathIndex), or -1 to insert points at the end of
+ * the given path.
+ *
+ * @param src
+ * The source multipath.
+ *
+ * @param srcPathIndex
+ * The source path index to copy points from.
+ *
+ * @param srcPointIndexFrom
+ * The start point in the source path to start copying from.
+ *
+ * @param srcPointCount
+ * The count of points to add.
+ *
+ * @param bForward
+ * When FALSE, the points are inserted in reverse order.
*/
public void insertPoints(int pathIndex, int beforePointIndex,
MultiPath src, int srcPathIndex, int srcPointIndexFrom,
@@ -389,22 +409,27 @@ public void insertPoints(int pathIndex, int beforePointIndex,
/**
* Inserts a part of a path from the given array.
*
- * @param pathIndex
- * The path index in this class to insert points to. Must
- * correspond to an existing path.
- * @param beforePointIndex
- * The point index in the given path of this MultiPath before
- * which the vertices need to be inserted. This value must be
- * between 0 and GetPathSize(pathIndex), or -1 to insert points
- * at the end of the given path.
- * @param src
- * The source array
- * @param srcPointIndexFrom
- * The start point in the source array to start copying from.
- * @param srcPointCount
- * The count of points to add.
- * @param bForward
- * When FALSE, the points are inserted in reverse order.
+ * @param pathIndex
+ * The path index in this class to insert points to. Must
+ * correspond to an existing path.
+ *
+ * @param beforePointIndex
+ * The point index in the given path of this MultiPath before
+ * which the vertices need to be inserted. This value must be
+ * between 0 and GetPathSize(pathIndex), or -1 to insert points
+ * at the end of the given path.
+ *
+ * @param src
+ * The source array
+ *
+ * @param srcPointIndexFrom
+ * The start point in the source array to start copying from.
+ *
+ * @param srcPointCount
+ * The count of points to add.
+ *
+ * @param bForward
+ * When FALSE, the points are inserted in reverse order.
*/
void insertPoints(int pathIndex, int beforePointIndex, Point2D[] src,
int srcPointIndexFrom, int srcPointCount, boolean bForward) {
@@ -415,15 +440,17 @@ void insertPoints(int pathIndex, int beforePointIndex, Point2D[] src,
/**
* Inserts a point.
*
- * @param pathIndex
- * The path index in this class to insert the point to. Must
- * correspond to an existing path.
- * @param beforePointIndex
- * The point index in the given path of this multipath. This
- * value must be between 0 and GetPathSize(pathIndex), or -1 to
- * insert the point at the end of the given path.
- * @param pt
- * The point to be inserted.
+ * @param pathIndex
+ * The path index in this class to insert the point to. Must
+ * correspond to an existing path.
+ *
+ * @param beforePointIndex
+ * The point index in the given path of this multipath. This
+ * value must be between 0 and GetPathSize(pathIndex), or -1 to
+ * insert the point at the end of the given path.
+ *
+ * @param pt
+ * The point to be inserted.
*/
void insertPoint(int pathIndex, int beforePointIndex, Point2D pt) {
m_impl.insertPoint(pathIndex, beforePointIndex, pt);
@@ -432,15 +459,17 @@ void insertPoint(int pathIndex, int beforePointIndex, Point2D pt) {
/**
* Inserts a point.
*
- * @param pathIndex
- * The path index in this class to insert the point to. Must
- * correspond to an existing path.
- * @param beforePointIndex
- * The point index in the given path of this multipath. This
- * value must be between 0 and GetPathSize(pathIndex), or -1 to
- * insert the point at the end of the given path.
- * @param pt
- * The point to be inserted.
+ * @param pathIndex
+ * The path index in this class to insert the point to. Must
+ * correspond to an existing path.
+ *
+ * @param beforePointIndex
+ * The point index in the given path of this multipath. This
+ * value must be between 0 and GetPathSize(pathIndex), or -1 to
+ * insert the point at the end of the given path.
+ *
+ * @param pt
+ * The point to be inserted.
*/
public void insertPoint(int pathIndex, int beforePointIndex, Point pt) {
m_impl.insertPoint(pathIndex, beforePointIndex, pt);
@@ -449,10 +478,11 @@ public void insertPoint(int pathIndex, int beforePointIndex, Point pt) {
/**
* Removes a point at a given index.
*
- * @param pathIndex
- * The path from whom to remove the point.
- * @param pointIndex
- * The index of the point to be removed.
+ * @param pathIndex
+ * The path from whom to remove the point.
+ *
+ * @param pointIndex
+ * The index of the point to be removed.
*/
public void removePoint(int pathIndex, int pointIndex) {
m_impl.removePoint(pathIndex, pointIndex);
@@ -470,8 +500,9 @@ public int getPathCount() {
/**
* Returns the number of vertices in a path.
*
- * @param pathIndex
- * The index of the path to return the number of vertices from.
+ * @param pathIndex
+ * The index of the path to return the number of vertices from.
+ *
* @return The number of vertices in a path.
*/
public int getPathSize(int pathIndex) {
@@ -481,8 +512,9 @@ public int getPathSize(int pathIndex) {
/**
* Returns the start index of the path.
*
- * @param pathIndex
- * The index of the path to return the start index from.
+ * @param pathIndex
+ * The index of the path to return the start index from.
+ *
* @return The start index of the path.
*
*/
@@ -493,8 +525,9 @@ public int getPathStart(int pathIndex) {
/**
* Returns the index immediately following the last index of the path.
*
- * @param pathIndex
- * The index of the path to return the end index from.
+ * @param pathIndex
+ * The index of the path to return the end index from.
+ *
* @return Integer index after last index of path
*/
public int getPathEnd(int pathIndex) {
@@ -504,8 +537,9 @@ public int getPathEnd(int pathIndex) {
/**
* Returns the path index from the point index. This is O(log N) operation.
*
- * @param pointIndex
- * The index of the point.
+ * @param pointIndex
+ * The index of the point.
+ *
* @return The index of the path.
*/
public int getPathIndexFromPointIndex(int pointIndex) {
@@ -515,10 +549,11 @@ public int getPathIndexFromPointIndex(int pointIndex) {
/**
* Starts a new path at given coordinates.
*
- * @param x
- * The X coordinate of the start point.
- * @param y
- * The Y coordinate of the start point.
+ * @param x
+ * The X coordinate of the start point.
+ *
+ * @param y
+ * The Y coordinate of the start point.
*/
public void startPath(double x, double y) {
m_impl.startPath(x, y);
@@ -535,8 +570,8 @@ void startPath(Point3D point) {
/**
* Starts a new path at a point.
*
- * @param point
- * The point to start the path from.
+ * @param point
+ * The point to start the path from.
*/
public void startPath(Point point) {
m_impl.startPath(point);
@@ -545,10 +580,11 @@ public void startPath(Point point) {
/**
* Adds a line segment from the last point to the given end coordinates.
*
- * @param x
- * The X coordinate to the end point.
- * @param y
- * The Y coordinate to the end point.
+ * @param x
+ * The X coordinate to the end point.
+ *
+ * @param y
+ * The Y coordinate to the end point.
*/
public void lineTo(double x, double y) {
m_impl.lineTo(x, y);
@@ -565,9 +601,9 @@ void lineTo(Point3D endPoint) {
/**
* Adds a Line Segment to the given end point.
*
- * @param endPoint
- * The end point to which the newly added line segment should
- * point.
+ * @param endPoint
+ * The end point to which the newly added line segment should
+ * point.
*/
public void lineTo(Point endPoint) {
m_impl.lineTo(endPoint);
@@ -626,9 +662,10 @@ public void closeAllPaths() {
* path. The first point is not duplicated to close the path. Polygons
* always have all paths closed.
*
- * @param pathIndex
- * The index of the path to check to be closed.
- * @return TRUE if the given path is closed (represents a Ring).
+ * @param pathIndex
+ * The index of the path to check to be closed.
+ *
+ * @return {@code true} if the given path is closed (represents a Ring).
*/
public boolean isClosedPath(int pathIndex) {
return m_impl.isClosedPath(pathIndex);
@@ -648,10 +685,11 @@ boolean hasNonLinearSegments(int pathIndex) {
/**
* Adds a rectangular closed Path to the MultiPathImpl.
*
- * @param envSrc
- * is the source rectangle.
- * @param bReverse
- * Creates reversed path.
+ * @param envSrc
+ * is the source rectangle.
+ *
+ * @param bReverse
+ * Creates reversed path.
*/
public void addEnvelope(Envelope2D envSrc, boolean bReverse) {
m_impl.addEnvelope(envSrc, bReverse);
@@ -660,10 +698,11 @@ public void addEnvelope(Envelope2D envSrc, boolean bReverse) {
/**
* Adds a rectangular closed path to this multipath.
*
- * @param envSrc
- * Is the envelope to add to this mulitpath.
- * @param bReverse
- * Adds the path reversed (counter-clockwise).
+ * @param envSrc
+ * Is the envelope to add to this mulitpath.
+ *
+ * @param bReverse
+ * Adds the path reversed (counter-clockwise).
*/
public void addEnvelope(Envelope envSrc, boolean bReverse) {
m_impl.addEnvelope(envSrc, bReverse);
@@ -686,8 +725,9 @@ public SegmentIterator querySegmentIterator() {
* at the vertex. Calling PreviousSegment () will return the segment that
* starts at the previous vertex.
*
- * @param startVertexIndex
- * The start index of the SegementIterator.
+ * @param startVertexIndex
+ * The start index of the SegementIterator.
+ *
* @return The SegmentIterator for this mulitpath at the specified vertex.
*/
public SegmentIterator querySegmentIteratorAtVertex(int startVertexIndex) {
diff --git a/src/main/java/com/esri/core/geometry/MultiVertexGeometry.java b/src/main/java/com/esri/core/geometry/MultiVertexGeometry.java
index 668d6b33..fffe2f62 100644
--- a/src/main/java/com/esri/core/geometry/MultiVertexGeometry.java
+++ b/src/main/java/com/esri/core/geometry/MultiVertexGeometry.java
@@ -41,17 +41,26 @@ protected void _assignVertexDescriptionImpl(VertexDescription newDescription) {
}
/**
- * Returns the total vertex count in this Geometry.
+ * @return the total vertex count in this Geometry.
*/
public abstract int getPointCount();
/**
- * Returns given vertex of the Geometry.
+ * @param index
+ * the position of the vertex for retrieval
+ *
+ * @return given vertex of the Geometry.
*/
public abstract Point getPoint(int index);// Java only
/**
* Returns given vertex of the Geometry by value.
+ *
+ * @param index
+ * the position of the vertex for retrieval
+ *
+ * @param ptOut
+ * the Point instance to apply the vertex coordinates
*/
public void getPoint(int index, Point ptOut) {
getPointByVal(index, ptOut);
@@ -60,22 +69,26 @@ public void getPoint(int index, Point ptOut) {
/**
* Sets the vertex at given index of the Geometry.
*
- * @param index
- * The index of the vertex being changed.
- * @param pointSrc
- * The Point instance to set given vertex attributes from. The
- * pointSrc can not be empty.
- * The method throws if the pointSrc is not of the Point type.
- * The attributes, that are present in the pointSrc and missing
- * in this Geometry, will be added to the Geometry.
- * The vertex attributes missing in the pointSrc but present in
- * the Geometry will be set to the default values (see
- * VertexDescription::GetDefaultValue).
+ * @param index
+ * The index of the vertex being changed.
+ *
+ * @param pointSrc
+ * The Point instance to set given vertex attributes from. The
+ * pointSrc can not be empty.
+ * The method throws if the pointSrc is not of the Point type.
+ * The attributes, that are present in the pointSrc and missing
+ * in this Geometry, will be added to the Geometry.
+ * The vertex attributes missing in the pointSrc but present in
+ * the Geometry will be set to the default values (see
+ * VertexDescription::GetDefaultValue).
*/
public abstract void setPoint(int index, Point pointSrc);// Java only
/**
- * Returns XY coordinates of the given vertex of the Geometry.
+ * @param index
+ * the specified vertex position
+ *
+ * @return XY coordinates of the given vertex of the Geometry.
*/
public abstract Point2D getXY(int index);
@@ -84,12 +97,23 @@ public void getPoint(int index, Point ptOut) {
/**
* Sets XY coordinates of the given vertex of the Geometry. All other
* attributes are unchanged.
+ *
+ * @param index
+ * the specified vertex position
+ *
+ * @param pt
+ * the coordinates for the given index position
*/
public abstract void setXY(int index, Point2D pt);
/**
* Returns XYZ coordinates of the given vertex of the Geometry. If the
* Geometry has no Z's, the default value for Z is returned (0).
+ *
+ * @param index
+ * of the required vertex
+ *
+ * @return XYZ coordinates of the given vertex of the Geometry
*/
abstract Point3D getXYZ(int index);
@@ -97,11 +121,17 @@ public void getPoint(int index, Point ptOut) {
* Sets XYZ coordinates of the given vertex of the Geometry. If Z attribute
* is not present in this Geometry, it is added. All other attributes are
* unchanged.
+ *
+ * @param index
+ * the specified vertex position
+ *
+ * @param pt
+ * the coordinates for the given index position
*/
abstract void setXYZ(int index, Point3D pt);
/**
- * Returns XY coordinates as an array.
+ * @return XY coordinates as an array.
*/
public Point2D[] getCoordinates2D() {
Point2D[] arr = new Point2D[getPointCount()];
@@ -110,7 +140,7 @@ public Point2D[] getCoordinates2D() {
}
/**
- * Returns XYZ coordinates as an array.
+ * @return XYZ coordinates as an array.
*/
Point3D[] getCoordinates3D() {
Point3D[] arr = new Point3D[getPointCount()];
@@ -123,72 +153,104 @@ Point3D[] getCoordinates3D() {
/**
* Queries XY coordinates as an array. The array must be larg enough (See
* GetPointCount()).
+ *
+ * @param dst
+ * array to contain XY coordinates for this geometry
*/
public abstract void queryCoordinates(Point2D[] dst);
/**
* Queries XYZ coordinates as an array. The array must be larg enough (See
* GetPointCount()).
+ *
+ * @param dst
+ * array to contain XYZ coordinates for this geometry
*/
abstract void queryCoordinates(Point3D[] dst);
/**
- * Returns value of the given vertex attribute as double.
+ * @param semantics
+ * The attribute semantics.
+ *
+ * @param index
+ * is the vertex index in the Geometry.
+ *
+ * @param ordinate
+ * is the ordinate of a vertex attribute (for example, y has
+ * ordinate of 1, because it is second ordinate of POSITION)
*
- * @param semantics
- * The atribute semantics.
- * @param index
- * is the vertex index in the Geometry.
- * @param ordinate
- * is the ordinate of a vertex attribute (for example, y has
- * ordinate of 1, because it is second ordinate of POSITION)
- *
- * If attribute is not present, the default value is returned.
- * See VertexDescription::GetDefaultValue() method.
+ * If attribute is not present, the default value is returned.
+ * See VertexDescription::GetDefaultValue() method.
+ *
+ * @return
+ * the value of the given vertex attribute as double.
+ *
*/
abstract double getAttributeAsDbl(int semantics, int index,
int ordinate);
/**
- * Returns value of the given vertex attribute as int.
- *
- * @param semantics
- * The atribute semantics.
- * @param index
- * is the vertex index in the Geometry.
- * @param ordinate
- * is the ordinate of a vertex attribute (for example, y has
- * ordinate of 1, because it is second ordinate of POSITION)
+ * @param semantics
+ * The attribute semantics.
+ *
+ * @param index
+ * is the vertex index in the Geometry.
+ *
+ * @param ordinate
+ * is the ordinate of a vertex attribute (for example, y has
+ * ordinate of 1, because it is second ordinate of POSITION)
*
- * If attribute is not present, the default value is returned.
- * See VertexDescription::GetDefaultValue() method. Avoid using
- * this method on non-integer atributes.
+ * If attribute is not present, the default value is returned.
+ * See VertexDescription::GetDefaultValue() method. Avoid using
+ * this method on non-integer attributes.
+ *
+ * @return
+ * the value of the given vertex attribute as int.
*/
abstract int getAttributeAsInt(int semantics, int index, int ordinate);
/**
- * Sets the value of given attribute at given posisiotnsis.
+ * Sets the value of given attribute at given position.
*
- * @param semantics
- * The atribute semantics.
- * @param index
- * is the vertex index in the Geometry.
- * @param ordinate
- * is the ordinate of a vertex attribute (for example, y has
- * ordinate of 1, because it is seond ordinate of POSITION)
- * @param value
- * is the value to set. as well as the number of components of
- * the attribute.
+ * @param semantics
+ * The attribute semantics.
+ *
+ * @param index
+ * is the vertex index in the Geometry.
+ *
+ * @param ordinate
+ * is the ordinate of a vertex attribute (for example, y has
+ * ordinate of 1, because it is seond ordinate of POSITION)
+ *
+ * @param value
+ * is the value to set. as well as the number of components of
+ * the attribute.
*
- * If the attribute is not present in this Geometry, it is added.
+ * If the attribute is not present in this Geometry, it is added.
*/
abstract void setAttribute(int semantics, int index, int ordinate,
double value);
/**
- * Same as above, but works with ints. Avoid using this method on
- * non-integer atributes because some double attributes may have NaN default
- * values (e.g. Ms)
+ * Same as {@link MultiVertexGeometry#setAttribute(int, int, int, double)},
+ * but works with ints. Avoid using this method on non-integer attributes
+ * because some double attributes may have NaN default values (e.g. Ms)
+ *
+ * @param semantics
+ * The attribute semantics.
+ *
+ * @param index
+ * is the vertex index in the Geometry.
+ *
+ * @param ordinate
+ * is the ordinate of a vertex attribute (for example, y has
+ * ordinate of 1, because it is seond ordinate of POSITION)
+ *
+ * @param value
+ * is the value to set. as well as the number of components of
+ * the attribute.
+ *
+ * If the attribute is not present in this Geometry, it is added.
*/
abstract void setAttribute(int semantics, int index, int ordinate,
int value);
@@ -196,23 +258,30 @@ abstract void setAttribute(int semantics, int index, int ordinate,
/**
* Returns given vertex of the Geometry. The outPoint will have same
* VertexDescription as this Geometry.
+ *
+ * @param index
+ * the required vertex index in the Geometry.
+ *
+ * @param outPoint
+ * the Point to apply values for the specified index
*/
abstract void getPointByVal(int index, Point outPoint);
/**
* Sets the vertex at given index of the Geometry.
*
- * @param index
- * The index of the vertex being changed.
- * @param pointSrc
- * The Point instance to set given vertex attributes from. The
- * pointSrc can not be empty.
- * The method throws if the pointSrc is not of the Point type.
- * The attributes, that are present in the pointSrc and missing
- * in this Geometry, will be added to the Geometry.
- * The vertex attributes missing in the pointSrc but present in
- * the Geometry will be set to the default values (see
- * VertexDescription::GetDefaultValue).
+ * @param index
+ * The index of the vertex being changed.
+ *
+ * @param pointSrc
+ * The Point instance to set given vertex attributes from. The
+ * pointSrc can not be empty.
+ * The method throws if the pointSrc is not of the Point type.
+ * The attributes, that are present in the pointSrc and missing
+ * in this Geometry, will be added to the Geometry.
+ * The vertex attributes missing in the pointSrc but present in
+ * the Geometry will be set to the default values (see
+ * VertexDescription::GetDefaultValue).
*/
abstract void setPointByVal(int index, Point pointSrc);
diff --git a/src/main/java/com/esri/core/geometry/Operator.java b/src/main/java/com/esri/core/geometry/Operator.java
index ffceb73f..23f6c41b 100644
--- a/src/main/java/com/esri/core/geometry/Operator.java
+++ b/src/main/java/com/esri/core/geometry/Operator.java
@@ -66,11 +66,16 @@ public enum Type {
* a different one. If the accelerator is built for the given parameters,
* the method returns immediately.
*
- * @param geometry
- * The geometry to be accelerated
- * @param spatialReference
- * The spatial reference of that geometry
- * @param accelDegree The acceleration degree for geometry.
+ * @param geometry
+ * The geometry to be accelerated
+ *
+ * @param spatialReference
+ * The spatial reference of that geometry
+ *
+ * @param accelDegree
+ * The acceleration degree for geometry.
+ *
+ * @return TODO
*/
public boolean accelerateGeometry(Geometry geometry,
SpatialReference spatialReference,
@@ -82,9 +87,11 @@ public boolean accelerateGeometry(Geometry geometry,
/**
* Returns true if the geometry can be accelerated.
*
- * @param geometry
- * @return true for geometries that can be accelerated, false for geometries
- * that cannot
+ * @param geometry
+ * under test
+ *
+ * @return {@code true} for geometries that can be accelerated, false for
+ * geometries that cannot
*/
public boolean canAccelerateGeometry(Geometry geometry) {
// Override at specific Operator level
diff --git a/src/main/java/com/esri/core/geometry/OperatorBuffer.java b/src/main/java/com/esri/core/geometry/OperatorBuffer.java
index cca44f54..07783922 100644
--- a/src/main/java/com/esri/core/geometry/OperatorBuffer.java
+++ b/src/main/java/com/esri/core/geometry/OperatorBuffer.java
@@ -35,31 +35,57 @@ public Type getType() {
return Type.Buffer;
}
- /**
- *Creates a buffer around the input geometries
- *
- *@param inputGeometries The geometries to buffer.
- *@param sr The SpatialReference of the Geometries.
- *@param distances The buffer distances for the Geometries. If the size of the distances array is less than the number of geometries in the inputGeometries, the last distance value is used for the rest of geometries.
- *@param bUnion If True, the buffered geometries will be unioned, otherwise they wont be unioned.
- */
+ /**
+ * Creates a buffer around the input geometries
+ *
+ * @param inputGeometries
+ * The geometries to buffer.
+ *
+ * @param sr
+ * The SpatialReference of the Geometries.
+ *
+ * @param distances
+ * The buffer distances for the Geometries. If the size of the
+ * distances array is less than the number of geometries in the
+ * inputGeometries, the last distance value is used for the rest of
+ * geometries.
+ *
+ * @param bUnion
+ * If True, the buffered geometries will be unioned, otherwise they
+ * wont be unioned.
+ *
+ * @param progressTracker
+ * the callback used periodically by lengthy operations
+ *
+ * @return a cursor to a collection of buffered geometries
+ */
public abstract GeometryCursor execute(GeometryCursor inputGeometries,
- SpatialReference sr, double[] distances, boolean bUnion,
- ProgressTracker progressTracker);
+ SpatialReference sr, double[] distances, boolean bUnion,
+ ProgressTracker progressTracker);
- /**
- *Creates a buffer around the input geometry
- *
- *@param inputGeometry The geometry to buffer.
- *@param sr The SpatialReference of the Geometry.
- *@param distance The buffer distance for the Geometry.
- */
- public abstract Geometry execute(Geometry inputGeometry,
- SpatialReference sr, double distance,
- ProgressTracker progressTracker);
+ /**
+ * Creates a buffer around the input geometry
+ *
+ * @param inputGeometry
+ * The geometry to buffer.
+ *
+ * @param sr
+ * The SpatialReference of the Geometry.
+ *
+ * @param distance
+ * The buffer distance for the Geometry.
+ *
+ * @param progressTracker
+ * the callback used periodically by lengthy operations
+ *
+ * @return a buffered geometry from input
+ */
+ public abstract Geometry execute(Geometry inputGeometry,
+ SpatialReference sr, double distance,
+ ProgressTracker progressTracker);
- public static OperatorBuffer local() {
- return (OperatorBuffer) OperatorFactoryLocal.getInstance().getOperator(
- Type.Buffer);
+ public static OperatorBuffer local() {
+ return (OperatorBuffer) OperatorFactoryLocal.getInstance().getOperator(
+ Type.Buffer);
}
}
diff --git a/src/main/java/com/esri/core/geometry/OperatorClip.java b/src/main/java/com/esri/core/geometry/OperatorClip.java
index 8b1907af..22b2deca 100644
--- a/src/main/java/com/esri/core/geometry/OperatorClip.java
+++ b/src/main/java/com/esri/core/geometry/OperatorClip.java
@@ -34,22 +34,48 @@ public Type getType() {
return Type.Clip;
}
- /**
- * Performs the Clip operation on the geometry set.
- */
- public abstract GeometryCursor execute(GeometryCursor geoms,
- Envelope2D envelope, SpatialReference spatialRef,
- ProgressTracker progressTracker);
-
- /**
- * Performs the Clip operation on a single geometry.
- */
- public abstract Geometry execute(Geometry geom, Envelope2D envelope,
- SpatialReference spatialRef, ProgressTracker progressTracker);
-
- public static OperatorClip local() {
- return (OperatorClip) OperatorFactoryLocal.getInstance().getOperator(
- Type.Clip);
- }
+ /**
+ * Performs the Clip operation on the geometry set.
+ * @param geoms
+ * referencing input geometries for the clip operation
+ *
+ * @param envelope
+ * used to clip input geometries
+ *
+ * @param spatialRef
+ * the geometry spatial reference
+ *
+ * @param progressTracker
+ * the callback used periodically by lengthy operations
+ *
+ * @return a cursor to the geometries created by clipping.
+ */
+ public abstract GeometryCursor execute(GeometryCursor geoms,
+ Envelope2D envelope, SpatialReference spatialRef,
+ ProgressTracker progressTracker);
+
+ /**
+ * Performs the Clip operation on a single geometry.
+ * @param geom
+ * input geometry for the clip operation
+ *
+ * @param envelope
+ * used to clip input geometries
+ *
+ * @param spatialRef
+ * the geometry spatial reference
+ *
+ * @param progressTracker
+ * the callback used periodically by lengthy operations
+ *
+ * @return The geometry created by clipping.
+ */
+ public abstract Geometry execute(Geometry geom, Envelope2D envelope,
+ SpatialReference spatialRef, ProgressTracker progressTracker);
+
+ public static OperatorClip local() {
+ return (OperatorClip) OperatorFactoryLocal.getInstance().getOperator(
+ Type.Clip);
+ }
}
diff --git a/src/main/java/com/esri/core/geometry/OperatorCut.java b/src/main/java/com/esri/core/geometry/OperatorCut.java
index 762db7d6..0c406fff 100644
--- a/src/main/java/com/esri/core/geometry/OperatorCut.java
+++ b/src/main/java/com/esri/core/geometry/OperatorCut.java
@@ -34,14 +34,9 @@ public Type getType() {
}
/**
- * Performs the Cut operation on a geometry.
- * @param bConsiderTouch Indicates whether we consider a touch event a cut.
- * This only applies to polylines, but it's recommended to set this variable to True.
- * @param cuttee The input geometry to be cut.
- * @param cutter The polyline that will be used to divide the cuttee into
- * pieces where it crosses the cutter.
- * @return Returns a GeometryCursor of cut geometries.
- * All left cuts will be grouped together in the first geometry. Right cuts and
+ * Performs the Cut operation on a geometry.
+ *
+ * All left cuts will be grouped together in the first geometry. Right cuts and
* coincident cuts are grouped in the second geometry, and each undefined cut along
* with any uncut parts are output as separate geometries. If there were no cuts
* the cursor will return no geometry. If the left or right cut does not
@@ -49,6 +44,26 @@ public Type getType() {
* undefined cut will only be produced if a left cut or right cut was
* produced and there was a part left over after cutting or a cut is
* bounded to the left and right of the cutter.
+ *
+ * @param bConsiderTouch
+ * Indicates whether we consider a touch event a cut.
+ * This only applies to polylines, but it's recommended to set this
+ * variable to True.
+ *
+ * @param cuttee
+ * The input geometry to be cut.
+ *
+ * @param cutter
+ * The polyline that will be used to divide the cuttee into pieces
+ * where it crosses the cutter.
+ *
+ * @param spatialReference
+ * The spatial reference of the input geometry
+ *
+ * @param progressTracker
+ * the callback used by lengthy operations
+ *
+ * @return Returns a GeometryCursor of cut geometries.
*/
public abstract GeometryCursor execute(boolean bConsiderTouch,
Geometry cuttee, Polyline cutter, SpatialReference spatialReference,
diff --git a/src/main/java/com/esri/core/geometry/OperatorDensifyByLength.java b/src/main/java/com/esri/core/geometry/OperatorDensifyByLength.java
index 085dd397..bf99d269 100644
--- a/src/main/java/com/esri/core/geometry/OperatorDensifyByLength.java
+++ b/src/main/java/com/esri/core/geometry/OperatorDensifyByLength.java
@@ -36,45 +36,55 @@ public Type getType() {
return Type.DensifyByLength;
}
- /**
- * Performs the Densify operation on the geometry set.
- *
- * @param inputGeometries
- * The geometries to be densified.
- * @param maxLength
- * The maximum segment length allowed. Must be a positive value.
- * Curves are densified to straight segments using the
- * maxSegmentLength. Curves are split into shorter subcurves such
- * that the length of subcurves is shorter than maxSegmentLength.
- * After that the curves are replaced with straight segments.
- * @param progressTracker
- * @return Returns the densified geometries (It does nothing to geometries
- * with dim < 1, but simply passes them along).
- */
- public abstract GeometryCursor execute(GeometryCursor inputGeometries,
- double maxLength, ProgressTracker progressTracker);
+ /**
+ * Performs the Densify operation on the geometry set.
+ *
+ * @param inputGeometries
+ * The geometries to be densified.
+ *
+ * @param maxLength
+ * The maximum segment length allowed. Must be a positive value.
+ * Curves are densified to straight segments using the
+ * maxSegmentLength. Curves are split into shorter subcurves such
+ * that the length of subcurves is shorter than maxSegmentLength.
+ * After that the curves are replaced with straight segments.
+ *
+ * @param progressTracker
+ * ProgressTracker instance that is used to cancel
+ * the lengthy operation. Can be null.
+ *
+ * @return the densified geometries (It does nothing to geometries
+ * with {@literal dim < 1}, but simply passes them along).
+ */
+ public abstract GeometryCursor execute(GeometryCursor inputGeometries,
+ double maxLength, ProgressTracker progressTracker);
- /**
- * Performs the Densify operation on the geometry set.
- *
- * @param inputGeometry
- * The geometry to be densified.
- * @param maxLength
- * The maximum segment length allowed. Must be a positive value.
- * Curves are densified to straight segments using the
- * maxSegmentLength. Curves are split into shorter subcurves such
- * that the length of subcurves is shorter than maxSegmentLength.
- * After that the curves are replaced with straight segments.
- * @param progressTracker
- * @return Returns the densified geometry. (It does nothing to geometries
- * with dim < 1, but simply passes them along).
- */
- public abstract Geometry execute(Geometry inputGeometry, double maxLength,
- ProgressTracker progressTracker);
+ /**
+ * Performs the Densify operation on the geometry set.
+ *
+ * @param inputGeometry
+ * The geometry to be densified.
+ *
+ * @param maxLength
+ * The maximum segment length allowed. Must be a positive value.
+ * Curves are densified to straight segments using the
+ * maxSegmentLength. Curves are split into shorter subcurves such
+ * that the length of subcurves is shorter than maxSegmentLength.
+ * After that the curves are replaced with straight segments.
+ *
+ * @param progressTracker
+ * ProgressTracker instance that is used to cancel
+ * the lengthy operation. Can be null.
+ *
+ * @return the densified geometry. (It does nothing to geometries
+ * with {@literal dim < 1}, but simply passes them along).
+ */
+ public abstract Geometry execute(Geometry inputGeometry, double maxLength,
+ ProgressTracker progressTracker);
- public static OperatorDensifyByLength local() {
- return (OperatorDensifyByLength) OperatorFactoryLocal.getInstance()
- .getOperator(Type.DensifyByLength);
- }
+ public static OperatorDensifyByLength local() {
+ return (OperatorDensifyByLength) OperatorFactoryLocal.getInstance()
+ .getOperator(Type.DensifyByLength);
+ }
}
diff --git a/src/main/java/com/esri/core/geometry/OperatorDifference.java b/src/main/java/com/esri/core/geometry/OperatorDifference.java
index 5e4b40e6..e756f44e 100644
--- a/src/main/java/com/esri/core/geometry/OperatorDifference.java
+++ b/src/main/java/com/esri/core/geometry/OperatorDifference.java
@@ -36,40 +36,56 @@ public Type getType() {
return Type.Difference;
}
- /**
- * Performs the Topological Difference operation on the geometry set.
- *
- * @param inputGeometries
- * is the set of Geometry instances to be subtracted by the
- * subtractor
- * @param subtractor
- * is the Geometry being subtracted.
- * @return Returns the result of the subtraction.
- *
- * The operator subtracts subtractor from every geometry in
- * inputGeometries.
- */
- public abstract GeometryCursor execute(GeometryCursor inputGeometries,
- GeometryCursor subtractor, SpatialReference sr,
- ProgressTracker progressTracker);
+ /**
+ * Performs the Topological Difference operation on the geometry set.
+ *
+ * The operator subtracts subtractor from every geometry in
+ * inputGeometries.
+ *
+ * @param inputGeometries
+ * is the set of Geometry instances to be subtracted by the
+ * subtractor
+ *
+ * @param subtractor
+ * is the Geometry being subtracted.
+ *
+ * @param sr
+ * The spatial reference to get the tolerance value from.
+ *
+ * @param progressTracker
+ * the callback used to cancel the lengthy operation. Can be null.
+ *
+ * @return the result of the subtraction.
+ */
+ public abstract GeometryCursor execute(GeometryCursor inputGeometries,
+ GeometryCursor subtractor, SpatialReference sr,
+ ProgressTracker progressTracker);
- /**
- * Performs the Topological Difference operation on the two geometries.
- *
- * @param inputGeometry
- * is the Geometry instance on the left hand side of the
- * subtraction.
- * @param subtractor
- * is the Geometry on the right hand side being subtracted.
- * @return Returns the result of subtraction.
- */
- public abstract Geometry execute(Geometry inputGeometry,
- Geometry subtractor, SpatialReference sr,
- ProgressTracker progressTracker);
+ /**
+ * Performs the Topological Difference operation on the two geometries.
+ *
+ * @param inputGeometry
+ * is the Geometry instance on the left hand side of the
+ * subtraction.
+ *
+ * @param subtractor
+ * is the Geometry on the right hand side being subtracted.
+ *
+ * @param sr
+ * The spatial reference to get the tolerance value from.
+ *
+ * @param progressTracker
+ * the callback used to cancel the lengthy operation. Can be null.
+ *
+ * @return the result of subtraction.
+ */
+ public abstract Geometry execute(Geometry inputGeometry,
+ Geometry subtractor, SpatialReference sr,
+ ProgressTracker progressTracker);
- public static OperatorDifference local() {
- return (OperatorDifference) OperatorFactoryLocal.getInstance()
- .getOperator(Type.Difference);
- }
+ public static OperatorDifference local() {
+ return (OperatorDifference) OperatorFactoryLocal.getInstance()
+ .getOperator(Type.Difference);
+ }
}
diff --git a/src/main/java/com/esri/core/geometry/OperatorDistance.java b/src/main/java/com/esri/core/geometry/OperatorDistance.java
index d29c2c43..991706e7 100644
--- a/src/main/java/com/esri/core/geometry/OperatorDistance.java
+++ b/src/main/java/com/esri/core/geometry/OperatorDistance.java
@@ -31,20 +31,29 @@
*/
public abstract class OperatorDistance extends Operator {
- @Override
- public Type getType() {
- return Type.Distance;
- }
-
- /**
- * Calculates distance between two geometries.
- */
- public abstract double execute(Geometry geom1, Geometry geom2,
- ProgressTracker progressTracker);
-
- public static OperatorDistance local() {
- return (OperatorDistance) OperatorFactoryLocal.getInstance()
- .getOperator(Type.Distance);
- }
+ @Override
+ public Type getType() {
+ return Type.Distance;
+ }
+
+ /**
+ * @param geom1
+ * the first geometry of the parameter pair to be operated on.
+ *
+ * @param geom2
+ * the second geometry of the parameter pair to be operated on.
+ *
+ * @param progressTracker
+ * the callback used to cancel the lengthy operation. Can be null.
+ *
+ * @return the distance between two geometries
+ */
+ public abstract double execute(Geometry geom1, Geometry geom2,
+ ProgressTracker progressTracker);
+
+ public static OperatorDistance local() {
+ return (OperatorDistance) OperatorFactoryLocal.getInstance()
+ .getOperator(Type.Distance);
+ }
}
diff --git a/src/main/java/com/esri/core/geometry/OperatorExportToJson.java b/src/main/java/com/esri/core/geometry/OperatorExportToJson.java
index 32bfc078..0f6a8198 100644
--- a/src/main/java/com/esri/core/geometry/OperatorExportToJson.java
+++ b/src/main/java/com/esri/core/geometry/OperatorExportToJson.java
@@ -40,7 +40,13 @@ public Type getType() {
/**
* Performs the ExportToJson operation
*
- * @return Returns a JsonCursor.
+ * @param spatialReference
+ * the spatial reference of the input geometry
+ *
+ * @param geometryCursor
+ * the cursor to geometries for export
+ *
+ * @return a JsonCursor.
*/
public abstract JsonCursor execute(SpatialReference spatialReference,
GeometryCursor geometryCursor);
@@ -48,7 +54,13 @@ public abstract JsonCursor execute(SpatialReference spatialReference,
/**
* Performs the ExportToJson operation
*
- * @return Returns a String.
+ * @param spatialReference
+ * the spatial reference of the input geometry
+ *
+ * @param geometry
+ * the geometry to export
+ *
+ * @return a JSON String.
*/
public abstract String execute(SpatialReference spatialReference,
Geometry geometry);
@@ -56,7 +68,16 @@ public abstract String execute(SpatialReference spatialReference,
/**
* Performs the ExportToJson operation
*
- * @return Returns a String.
+ * @param spatialReference
+ * the spatial reference of the input geometry
+ *
+ * @param geometry
+ * the geometry to export
+ *
+ * @param exportProperties
+ * the export properties
+ *
+ * @return a JSON String.
*/
public abstract String execute(SpatialReference spatialReference,
Geometry geometry, Map
* Equivalent to this *= right.
*
- * @param right
- * The matrix to be multiplied with.
+ * @param right
+ * The matrix to be multiplied with.
*/
public void multiply(Transformation2D right) {
multiply(this, right, this);
@@ -209,8 +213,8 @@ public void multiply(Transformation2D right) {
* result into this matrix and returns a reference to it.
* Equivalent to this = left * this.
*
- * @param left
- * The matrix to be multiplied with.
+ * @param left
+ * The matrix to be multiplied with.
*/
public void mulLeft(Transformation2D left) {
multiply(left, this, this);
@@ -221,12 +225,14 @@ public void mulLeft(Transformation2D left) {
* this matrix. The a, b, and result could point to same objects.
* Equivalent to result = a * b.
*
- * @param a
- * The 2D transformation to be multiplied.
- * @param b
- * The 2D transformation to be multiplied.
- * @param result
- * The 2D transformation created by multiplication of matrices.
+ * @param a
+ * The 2D transformation to be multiplied.
+ *
+ * @param b
+ * The 2D transformation to be multiplied.
+ *
+ * @param result
+ * The 2D transformation created by multiplication of matrices.
*/
public static void multiply(Transformation2D a, Transformation2D b,
Transformation2D result) {
@@ -248,9 +254,7 @@ public static void multiply(Transformation2D a, Transformation2D b,
}
/**
- * Returns a copy of the Transformation2D object.
- *
- * @return A copy of this object.
+ * @return a copy of this Transformation2D object.
*/
public Transformation2D copy() {
Transformation2D result = new Transformation2D();
@@ -267,9 +271,9 @@ public Transformation2D copy() {
* Writes the matrix coefficients in the order XX, XY, XD, YX, YY, YD into
* the given array.
*
- * @param coefs
- * The array into which the coefficients are returned. Should be
- * of size 6 elements.
+ * @param coefs
+ * The array into which the coefficients are returned. Should be of
+ * size 6 elements.
*/
public void getCoefficients(double[] coefs) {
if (coefs.length < 6)
@@ -287,8 +291,8 @@ public void getCoefficients(double[] coefs) {
/**
* Transforms envelope
*
- * @param env
- * The envelope that is to be transformed
+ * @param env
+ * The envelope that is to be transformed
*/
void transform(Envelope2D env) {
@@ -384,8 +388,10 @@ Point2D transformSize(Point2D SizeSrc) {
/**
* Transforms a tolerance value.
*
- * @param tolerance
- * The tolerance value.
+ * @param tolerance
+ * The tolerance value.
+ *
+ * @return TODO
*/
public double transform(double tolerance) {
// the function should be implemented as follows: find encompassing
@@ -441,7 +447,7 @@ public void setIdentity() {
}
/**
- * Returns TRUE if this matrix is the identity matrix.
+ * @return {@code true} if this matrix is the identity matrix.
*/
public boolean isIdentity() {
return xx == 1.0 && yy == 1.0
@@ -449,11 +455,11 @@ public boolean isIdentity() {
}
/**
- * Returns TRUE if this matrix is an identity matrix within the given
- * tolerance.
- *
- * @param tol
- * The tolerance value.
+ * @param tol
+ * The tolerance value.
+ *
+ * @return true if this matrix is an identity matrix within the given
+ * tolerance.
*/
public boolean isIdentity(double tol) {
Point2D pt = Point2D.construct(0., 1.);
@@ -474,7 +480,7 @@ public boolean isIdentity(double tol) {
}
/**
- * Returns TRUE for reflective transformations. It inverts the sign of
+ * @return {@code true} for reflective transformations. It inverts the sign of
* vector cross product.
*/
public boolean isReflective() {
@@ -482,10 +488,13 @@ public boolean isReflective() {
}
/**
- * Returns TRUE if this transformation is a uniform transformation.
- *
* The uniform transformation is a transformation, which transforms a square
* to a square.
+ *
+ * @param eps
+ * TODO
+ *
+ * @return {@code true} if this transformation is a uniform transformation.
*/
public boolean isUniform(double eps) {
double v1 = xx * xx + yx * yx;
@@ -495,19 +504,19 @@ public boolean isUniform(double eps) {
}
/**
- * Returns TRUE if this transformation is a shift transformation. The shift
- * transformation performs shift only.
+ * @return {@code true} if this transformation is a shift transformation.
+ * The shift transformation performs shift only.
*/
public boolean isShift() {
return xx == 1.0 && yy == 1.0 && 0 == xy && 0 == yx;
}
/**
- * Returns TRUE if this transformation is a shift transformation within the
- * given tolerance.
- *
- * @param tol
- * The tolerance value.
+ * @param tol
+ * The tolerance value.
+ *
+ * @return {@code true} if this transformation is a shift transformation
+ * within the given tolerance.
*/
public boolean isShift(double tol) {
Point2D pt = transformWithoutShift(Point2D.construct(0., 1.));
@@ -521,12 +530,15 @@ public boolean isShift(double tol) {
}
/**
- * Returns TRUE if this is an orthonormal transformation with the given
+ * Establishes if this is an orthonormal transformation with the given
* tolerance. The orthonormal: Rotation or rotoinversion and shift
* (preserves lengths of vectors and angles between vectors).
*
- * @param tol
- * The tolerance value.
+ * @param tol
+ * The tolerance value.
+ *
+ * @return true if this is an orthonormal transformation with the given
+ * tolerance.
*/
public boolean isOrthonormal(double tol) {
Transformation2D r = new Transformation2D();
@@ -541,11 +553,11 @@ public boolean isOrthonormal(double tol) {
}
/**
- * Returns TRUE if this matrix is degenerated (does not have an inverse)
- * within the given tolerance.
- *
- * @param tol
- * The tolerance value.
+ * @param tol
+ * The tolerance value.
+ *
+ * @return true if this matrix is degenerated (does not have an inverse)
+ * within the given tolerance.
*/
public boolean isDegenerate(double tol) {
return Math.abs(xx * yy - yx * xy) <= 2 * tol
@@ -553,11 +565,11 @@ public boolean isDegenerate(double tol) {
}
/**
- * Returns TRUE, if this transformation does not have rotation and shear
- * within the given tolerance.
- *
- * @param tol
- * The tolerance value.
+ * @param tol
+ * The tolerance value.
+ *
+ * @return {@code true} if this transformation does not have rotation and
+ * shear within the given tolerance.
*/
public boolean isScaleAndShift(double tol) {
return xy * xy + yx * yx < (xx * xx + yy * yy) * tol;
@@ -566,10 +578,11 @@ public boolean isScaleAndShift(double tol) {
/**
* Set this transformation to be a shift.
*
- * @param x
- * The X coordinate to shift to.
- * @param y
- * The Y coordinate to shift to.
+ * @param x
+ * The X coordinate to shift to.
+ *
+ * @param y
+ * The Y coordinate to shift to.
*/
public void setShift(double x, double y) {
xx = 1;
@@ -583,10 +596,11 @@ public void setShift(double x, double y) {
/**
* Set this transformation to be a scale.
*
- * @param x
- * The X coordinate to scale to.
- * @param y
- * The Y coordinate to scale to.
+ * @param x
+ * The X coordinate to scale to.
+ *
+ * @param y
+ * The Y coordinate to scale to.
*/
public void setScale(double x, double y) {
xx = x;
@@ -600,8 +614,8 @@ public void setScale(double x, double y) {
/**
* Set transformation to be a uniform scale.
*
- * @param _scale
- * The scale of the transformation.
+ * @param _scale
+ * The scale of the transformation.
*/
public void setScale(double _scale) {
setScale(_scale, _scale);
@@ -611,10 +625,11 @@ public void setScale(double _scale) {
* Sets the transformation to be a flip around the X axis. Flips the X
* coordinates so that the x0 becomes x1 and vice verse.
*
- * @param x0
- * The X coordinate to flip.
- * @param x1
- * The X coordinate to flip to.
+ * @param x0
+ * The X coordinate to flip.
+ *
+ * @param x1
+ * The X coordinate to flip to.
*/
public void setFlipX(double x0, double x1) {
xx = -1;
@@ -629,10 +644,11 @@ public void setFlipX(double x0, double x1) {
* Sets the transformation to be a flip around the Y axis. Flips the Y
* coordinates so that the y0 becomes y1 and vice verse.
*
- * @param y0
- * The Y coordinate to flip.
- * @param y1
- * The Y coordinate to flip to.
+ * @param y0
+ * The Y coordinate to flip.
+ *
+ * @param y1
+ * The Y coordinate to flip to.
*/
public void setFlipY(double y0, double y1) {
xx = 1;
@@ -646,10 +662,11 @@ public void setFlipY(double y0, double y1) {
/**
* Set transformation to a shear.
*
- * @param proportionX
- * The proportion of shearing in x direction.
- * @param proportionY
- * The proportion of shearing in y direction.
+ * @param proportionX
+ * The proportion of shearing in x direction.
+ *
+ * @param proportionY
+ * The proportion of shearing in y direction.
*/
public void setShear(double proportionX, double proportionY) {
xx = 1;
@@ -668,16 +685,16 @@ public void setShear(double proportionX, double proportionY) {
* Y is directed down and X is directed to the right, the positive angle
* corresponds to the clockwise rotation.
*
- * @param angle_in_Radians
- * The rotation angle in radian.
+ * @param angle_in_Radians
+ * The rotation angle in radian.
*/
public void setRotate(double angle_in_Radians) {
setRotate(Math.cos(angle_in_Radians), Math.sin(angle_in_Radians));
}
/**
- * Produces a transformation that swaps x and y coordinate values. xx = 0.0;
- * xy = 1.0; xd = 0; yx = 1.0; yy = 0.0; yd = 0;
+ * @return a transformation that swaps x and y coordinate values.
+ * xx = 0.0; xy = 1.0; xd = 0; yx = 1.0; yy = 0.0; yd = 0;
*/
Transformation2D setSwapCoordinates() {
xx = 0.0;
@@ -697,10 +714,11 @@ Transformation2D setSwapCoordinates() {
* Y is directed down and X is directed to the right, the positive angle
* corresponds to the clockwise rotation.
*
- * @param angle_in_Radians
- * The rotation angle in radian.
- * @param rotationCenter
- * The center point of the rotation.
+ * @param angle_in_Radians
+ * The rotation angle in radian.
+ *
+ * @param rotationCenter
+ * The center point of the rotation.
*/
void setRotate(double angle_in_Radians, Point2D rotationCenter) {
setRotate(Math.cos(angle_in_Radians), Math.sin(angle_in_Radians),
@@ -715,10 +733,11 @@ void setRotate(double angle_in_Radians, Point2D rotationCenter) {
* Y is directed down and X is directed to the right, the positive angle
* corresponds to the clockwise rotation.
*
- * @param cosA
- * The rotation angle.
- * @param sinA
- * The rotation angle.
+ * @param cosA
+ * The rotation angle.
+ *
+ * @param sinA
+ * The rotation angle.
*/
public void setRotate(double cosA, double sinA) {
@@ -738,12 +757,14 @@ public void setRotate(double cosA, double sinA) {
* Y is directed down and X is directed to the right, the positive angle
* corresponds to the clockwise rotation.
*
- * @param cosA
- * The cos of the rotation angle.
- * @param sinA
- * The sin of the rotation angle.
- * @param rotationCenter
- * The center point of the rotation.
+ * @param cosA
+ * The cos of the rotation angle.
+ *
+ * @param sinA
+ * The sin of the rotation angle.
+ *
+ * @param rotationCenter
+ * The center point of the rotation.
*/
void setRotate(double cosA, double sinA, Point2D rotationCenter) {
setShift(-rotationCenter.x, -rotationCenter.y);
@@ -756,10 +777,11 @@ void setRotate(double cosA, double sinA, Point2D rotationCenter) {
/**
* Shifts the transformation.
*
- * @param x
- * The shift factor in X direction.
- * @param y
- * The shift factor in Y direction.
+ * @param x
+ * The shift factor in X direction.
+ *
+ * @param y
+ * The shift factor in Y direction.
*/
public void shift(double x, double y) {
xd += x;
@@ -769,10 +791,11 @@ public void shift(double x, double y) {
/**
* Scales the transformation.
*
- * @param x
- * The scale factor in X direction.
- * @param y
- * The scale factor in Y direction.
+ * @param x
+ * The scale factor in X direction.
+ *
+ * @param y
+ * The scale factor in Y direction.
*/
public void scale(double x, double y) {
xx *= x;
@@ -786,10 +809,11 @@ public void scale(double x, double y) {
/**
* Flips the transformation around the X axis.
*
- * @param x0
- * The X coordinate to flip.
- * @param x1
- * The X coordinate to flip to.
+ * @param x0
+ * The X coordinate to flip.
+ *
+ * @param x1
+ * The X coordinate to flip to.
*/
public void flipX(double x0, double x1) {
xx = -xx;
@@ -800,10 +824,11 @@ public void flipX(double x0, double x1) {
/**
* Flips the transformation around the Y axis.
*
- * @param y0
- * The Y coordinate to flip.
- * @param y1
- * The Y coordinate to flip to.
+ * @param y0
+ * The Y coordinate to flip.
+ *
+ * @param y1
+ * The Y coordinate to flip to.
*/
public void flipY(double y0, double y1) {
yx = -yx;
@@ -814,10 +839,11 @@ public void flipY(double y0, double y1) {
/**
* Shears the transformation.
*
- * @param proportionX
- * The proportion of shearing in x direction.
- * @param proportionY
- * The proportion of shearing in y direction.
+ * @param proportionX
+ * The proportion of shearing in x direction.
+ *
+ * @param proportionY
+ * The proportion of shearing in y direction.
*/
public void shear(double proportionX, double proportionY) {
Transformation2D temp = new Transformation2D();
@@ -828,8 +854,8 @@ public void shear(double proportionX, double proportionY) {
/**
* Rotates the transformation.
*
- * @param angle_in_Radians
- * The rotation angle in radian.
+ * @param angle_in_Radians
+ * The rotation angle in radian.
*/
public void rotate(double angle_in_Radians) {
Transformation2D temp = new Transformation2D();
@@ -840,10 +866,11 @@ public void rotate(double angle_in_Radians) {
/**
* Rotates the transformation.
*
- * @param cos
- * The cos angle of the rotation.
- * @param sin
- * The sin angle of the rotation.
+ * @param cos
+ * The cos angle of the rotation.
+ *
+ * @param sin
+ * The sin angle of the rotation.
*/
public void rotate(double cos, double sin) {
Transformation2D temp = new Transformation2D();
@@ -854,12 +881,14 @@ public void rotate(double cos, double sin) {
/**
* Rotates the transformation aroung a center point.
*
- * @param cos
- * The cos angle of the rotation.
- * @param sin
- * sin angle of the rotation.
- * @param rotationCenter
- * The center point of the rotation.
+ * @param cos
+ * The cos angle of the rotation.
+ *
+ * @param sin
+ * sin angle of the rotation.
+ *
+ * @param rotationCenter
+ * The center point of the rotation.
*/
public void rotate(double cos, double sin, Point2D rotationCenter) {
Transformation2D temp = new Transformation2D();
@@ -871,8 +900,8 @@ public void rotate(double cos, double sin, Point2D rotationCenter) {
* Produces inverse matrix for this matrix and puts result into the inverse
* parameter.
*
- * @param inverse
- * The result inverse matrix.
+ * @param inverse
+ * The result inverse matrix.
*/
public void inverse(Transformation2D inverse) {
double det = xx * yy - xy * yx;
@@ -904,11 +933,12 @@ public void inverse() {
* Extracts scaling part of the transformation. this == scale *
* rotateNshearNshift.
*
- * @param scale
- * The destination matrix where the scale part is copied.
- * @param rotateNshearNshift
- * The destination matrix where the part excluding rotation is
- * copied.
+ * @param scale
+ * The destination matrix where the scale part is copied.
+ *
+ * @param rotateNshearNshift
+ * The destination matrix where the part excluding rotation is
+ * copied.
*/
public void extractScaleTransform(Transformation2D scale,
Transformation2D rotateNshearNshift) {
diff --git a/src/main/java/com/esri/core/geometry/VertexDescription.java b/src/main/java/com/esri/core/geometry/VertexDescription.java
index 1fc1a6f6..bb193b3e 100644
--- a/src/main/java/com/esri/core/geometry/VertexDescription.java
+++ b/src/main/java/com/esri/core/geometry/VertexDescription.java
@@ -169,19 +169,19 @@ public interface Semantics {
}
/**
- * Returns the attribute count of this description. The value is always
- * greater or equal to 1. The first attribute is always a POSITION.
+ * @return the attribute count of this description. The value is always
+ * greater or equal to 1. The first attribute is always a POSITION.
*/
public final int getAttributeCount() {
return m_attributeCount;
}
/**
- * Returns the semantics of the given attribute.
- *
- * @param attributeIndex
- * The index of the attribute in the description. Max value is
- * GetAttributeCount() - 1.
+ * @param attributeIndex
+ * The index of the attribute in the description. Max value is
+ * GetAttributeCount() - 1.
+ *
+ * @return the semantics of the given attribute.
*/
public final int getSemantics(int attributeIndex) {
if (attributeIndex < 0 || attributeIndex > m_attributeCount)
@@ -192,46 +192,48 @@ public final int getSemantics(int attributeIndex) {
/**
* Returns the index the given attribute in the vertex description.
- *
- * @param semantics
- * @return Returns the attribute index or -1 of the attribute does not exist
+ *
+ * @param semantics
+ * The semantics of the attribute.
+ *
+ * @return The attribute index or -1 of the attribute does not exist
*/
public final int getAttributeIndex(int semantics) {
return m_semanticsToIndexMap[semantics];
}
/**
- * Returns the interpolation type for the attribute.
- *
- * @param semantics
- * The semantics of the attribute.
+ * @param semantics
+ * The semantics of the attribute.
+ *
+ * @return The interpolation type for the attribute.
*/
static int getInterpolation(int semantics) {
return _interpolation[semantics];
}
/**
- * Returns the persistence type for the attribute.
- *
- * @param semantics
- * The semantics of the attribute.
+ * @param semantics
+ * The semantics of the attribute.
+ *
+ * @return the persistence type for the attribute.
*/
static int getPersistence(int semantics) {
return _persistence[semantics];
}
/**
- * Returns the size of the persistence type in bytes.
- *
- * @param persistence
- * The persistence type to query.
+ * @param persistence
+ * The persistence type to query.
+ *
+ * @return The size of the persistence type in bytes.
*/
static int getPersistenceSize(int persistence) {
return _persistencesize[persistence];
}
/**
- * Returns the size of the semantics in bytes.
+ * @return The size of the semantics in bytes.
*/
static int getPersistenceSizeSemantics(int semantics) {
return getPersistenceSize(getPersistence(semantics))
@@ -242,61 +244,67 @@ static int getPersistenceSizeSemantics(int semantics) {
* Returns the number of the components of the given semantics. For example,
* it returns 2 for the POSITION.
*
- * @param semantics
- * The semantics of the attribute.
+ * @param semantics
+ * The semantics of the attribute.
+ *
+ * @return the number of the components of the given semantics
*/
public static int getComponentCount(int semantics) {
return _components[semantics];
}
/**
- * Returns True for integer persistence type.
+ * @return {@code true} for integer persistence type.
*/
static boolean isIntegerPersistence(int persistence) {
return persistence < Persistence.enumInt32;
}
/**
- * Returns True for integer semantics type.
+ * @return {@code true} for integer semantics type.
*/
static boolean isIntegerSemantics(int semantics) {
return isIntegerPersistence(getPersistence(semantics));
}
/**
- * Returns True if the attribute with the given name and given set exists.
- *
- * @param semantics
- * The semantics of the attribute.
+ * @param semantics
+ * The semantics of the attribute.
+ *
+ * @return {@code true} if the attribute with the given name and given set
+ * exists.
*/
public boolean hasAttribute(int semantics) {
return m_semanticsToIndexMap[semantics] >= 0;
}
/**
- * Returns True, if the vertex has Z attribute.
+ * @return {@code true} if the vertex has Z attribute.
*/
public boolean hasZ() {
return hasAttribute(Semantics.Z);
}
/**
- * Returns True, if the vertex has M attribute.
+ * @return {@code true} if the vertex has M attribute.
*/
public boolean hasM() {
return hasAttribute(Semantics.M);
}
/**
- * Returns True, if the vertex has ID attribute.
+ * @return {@code true} if the vertex has ID attribute.
*/
public boolean hasID() {
return hasAttribute(Semantics.ID);
}
/**
- * Returns default value for each ordinate of the vertex attribute with
- * given semantics.
+ * @param semantics
+ * the semantics value to obtain default values for
+ *
+ * @return default value for each ordinate of the vertex attribute with
+ * given semantics.
*/
public static double getDefaultValue(int semantics) {
return _defaultValues[semantics];
@@ -307,7 +315,7 @@ int getPointAttributeOffset_(int attribute_index) {
}
/**
- * Returns the total component count.
+ * @return the total component count.
*/
public int getTotalComponentCount() {
return m_total_component_count;
@@ -317,6 +325,14 @@ public int getTotalComponentCount() {
* Checks if the given value is the default one. The simple equality test
* with GetDefaultValue does not work due to the use of NaNs as default
* value for some parameters.
+ *
+ * @param semantics
+ * the semantics value to obtain default values for
+ *
+ * @param v
+ * the value under test
+ *
+ * @return {@code true} if the given value is equal to default value
*/
public static boolean isDefaultValue(int semantics, double v) {
return NumberUtils.doubleToInt64Bits(_defaultValues[semantics]) == NumberUtils
@@ -346,9 +362,9 @@ int calculateHashImpl() {
}
/**
- *
- * Returns a packed array of double representation of all ordinates of
- * attributes of a point, i.e.: X, Y, Z, ID, TEXTURE2D.u, TEXTURE2D.v
+ * @return a packed array of double representation of all ordinates of
+ * attributes of a point, i.e.: X, Y, Z, ID, TEXTURE2D.u,
+ * TEXTURE2D.v
*/
double[] _getDefaultPointAttributes() {
return m_defaultPointAttributes;
@@ -364,6 +380,11 @@ int calculateHashImpl() {
* Returns an offset to the first ordinate of the given attribute. This
* method is used for the cases when one wants to have a packed array of
* ordinates of all attributes, i.e.: X, Y, Z, ID, TEXTURE2D.u, TEXTURE2D.v
+ *
+ * @param attributeIndex
+ * the required attribute index
+ *
+ * @return an offset to the first ordinate of the given attribute
*/
int _getPointAttributeOffset(int attributeIndex) {
return m_pointAttributeOffsets[attributeIndex];
diff --git a/src/main/java/com/esri/core/geometry/ogc/OGCGeometry.java b/src/main/java/com/esri/core/geometry/ogc/OGCGeometry.java
index 9783bb94..41e433e6 100644
--- a/src/main/java/com/esri/core/geometry/ogc/OGCGeometry.java
+++ b/src/main/java/com/esri/core/geometry/ogc/OGCGeometry.java
@@ -143,7 +143,7 @@ public double MaxMeasure() {
* For non-simple geometries, it terminates immediately when the first issue
* is encountered.
*
- * @return True if geometry is simple and false otherwise.
+ * @return {@code true} if geometry is simple and false otherwise.
*
* Note: If isSimple is true, then isSimpleRelaxed is true too.
*/
@@ -174,6 +174,9 @@ public OGCGeometry MakeSimpleRelaxed(boolean forceProcessing) {
}
/**
* Makes a simple geometry for Geodatabase.
+ *
+ * @param forceProcessing true if the Geometry should be simplified
+ * regardless of the internal IsKnownSimple flag.
*
* @return Returns simplified geometry.
*
@@ -211,8 +214,11 @@ public boolean isMeasured() {
abstract public OGCGeometry boundary();
/**
- * OGC equals
- *
+ * @param another
+ * The {@code OGCGeometry} to compare this against
+ *
+ * @return {@code true} if the given OGC geometry is equivalent to this
+ * OGC geometry, {@code false} otherwise
*/
public boolean equals(OGCGeometry another) {
com.esri.core.geometry.Geometry geom1 = getEsriGeometry();
@@ -437,8 +443,8 @@ public com.esri.core.geometry.SpatialReference getEsriSpatialReference() {
/**
* Create an OGCGeometry instance from the GeometryCursor.
*
- * @param gc
- * @param sr
+ * @param gc cursor to a geometry
+ * @param sr spatial reference of the given geometry
* @return Geometry instance created from the geometry cursor.
*/
public static OGCGeometry createFromEsriCursor(GeometryCursor gc,
diff --git a/src/main/java/com/esri/core/geometry/ogc/OGCGeometryCollection.java b/src/main/java/com/esri/core/geometry/ogc/OGCGeometryCollection.java
index ea0d84af..1e9ffcc3 100644
--- a/src/main/java/com/esri/core/geometry/ogc/OGCGeometryCollection.java
+++ b/src/main/java/com/esri/core/geometry/ogc/OGCGeometryCollection.java
@@ -2,13 +2,15 @@
public abstract class OGCGeometryCollection extends OGCGeometry {
/**
- * Returns the number of geometries in this GeometryCollection.
+ * @return the number of geometries in this GeometryCollection.
*/
public abstract int numGeometries();
/**
- * Returns the Nth geometry in this GeometryCollection.
- * @param n The 0 based index of the geometry.
+ * @param n
+ * The 0 based index of the geometry.
+ *
+ * @return the Nth geometry in this GeometryCollection.
*/
public abstract OGCGeometry geometryN(int n);
}
diff --git a/src/main/java/com/esri/core/geometry/ogc/OGCLineString.java b/src/main/java/com/esri/core/geometry/ogc/OGCLineString.java
index eb3ee7bb..43fc4e01 100644
--- a/src/main/java/com/esri/core/geometry/ogc/OGCLineString.java
+++ b/src/main/java/com/esri/core/geometry/ogc/OGCLineString.java
@@ -14,7 +14,7 @@
public class OGCLineString extends OGCCurve {
/**
- * The number of Points in this LineString.
+ * @return the number of Points in this LineString.
*/
public int numPoints() {
if (multiPath.isEmpty())
@@ -38,8 +38,10 @@ public ByteBuffer asBinary() {
}
/**
- * Returns the specified Point N in this LineString.
- * @param n The 0 based index of the Point.
+ * @param n
+ * The 0 based index of the Point.
+ *
+ * @return the specified Point N in this LineString.
*/
public OGCPoint pointN(int n) {
int nn;
diff --git a/src/main/java/com/esri/core/geometry/ogc/OGCMultiPoint.java b/src/main/java/com/esri/core/geometry/ogc/OGCMultiPoint.java
index a57c3b4e..548402bf 100644
--- a/src/main/java/com/esri/core/geometry/ogc/OGCMultiPoint.java
+++ b/src/main/java/com/esri/core/geometry/ogc/OGCMultiPoint.java
@@ -45,9 +45,11 @@ public String geometryType() {
}
/**
- *
- * @param mp
- * MultiPoint instance will be referenced by this OGC class
+ * @param mp
+ * MultiPoint instance will be referenced by this OGC class
+ *
+ * @param sr
+ * Spatial reference for the given {@link MultiPoint}
*/
public OGCMultiPoint(MultiPoint mp, SpatialReference sr) {
multiPoint = mp;
diff --git a/src/main/java/com/esri/core/geometry/ogc/OGCPolygon.java b/src/main/java/com/esri/core/geometry/ogc/OGCPolygon.java
index 5a038d2a..88ffc2e8 100644
--- a/src/main/java/com/esri/core/geometry/ogc/OGCPolygon.java
+++ b/src/main/java/com/esri/core/geometry/ogc/OGCPolygon.java
@@ -57,7 +57,7 @@ public OGCLineString exteriorRing() {
}
/**
- * Returns the number of interior rings in this Polygon.
+ * @return the number of interior rings in this Polygon.
*/
public int numInteriorRing() {
return polygon.getPathCount() - 1;