Skip to content

Commit

Permalink
Merge remote-tracking branch 'nilason/docs-minor-stylistic-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed Dec 3, 2019
2 parents cc774db + b5cc0cc commit 2e3ef09
Show file tree
Hide file tree
Showing 117 changed files with 532 additions and 540 deletions.
2 changes: 1 addition & 1 deletion benchmarks/algorithm/InteriorPointAreaPerfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class InteriorPointAreaPerfTest {
std::unique_ptr<geos::geom::Polygon> sinePoly =
createSineStar(origin, SIZE, nPts);

/**
/*
* Make the geometry "crinkly" by rounding off the points.
* This defeats the MonotoneChain optimization in the full relate
* algorithm, and provides a more realistic test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RectangleIntersectsPerfTest {
createSineStar(origin, size, nPts)->getBoundary()
);

/**
/*
* Make the geometry "crinkly" by rounding off the points.
* This defeats the MonotoneChain optimization in the full relate
* algorithm, and provides a more realistic test.
Expand Down
18 changes: 9 additions & 9 deletions include/geos/algorithm/Angle.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ class GEOS_DLL Angle {
static const int NONE = Orientation::COLLINEAR;

/// Converts from radians to degrees.
//
///
/// @param radians an angle in radians
/// @return the angle in degrees
///
static double toDegrees(double radians);

/// Converts from degrees to radians.
//
///
/// @param angleDegrees an angle in degrees
/// @return the angle in radians
///
Expand All @@ -69,7 +69,7 @@ class GEOS_DLL Angle {
/// \brief
/// Returns the angle of the vector from p0 to p1,
/// relative to the positive X-axis.
//
///
/// The angle is normalized to be in the range [ -Pi, Pi ].
///
/// @return the normalized angle (in radians) that p0-p1 makes
Expand All @@ -90,7 +90,7 @@ class GEOS_DLL Angle {
static double angle(const geom::Coordinate& p);

/// Tests whether the angle between p0-p1-p2 is acute.
//
///
/// An angle is acute if it is less than 90 degrees.
///
/// Note: this implementation is not precise (determistic) for
Expand All @@ -105,7 +105,7 @@ class GEOS_DLL Angle {
const geom::Coordinate& p2);

/// Tests whether the angle between p0-p1-p2 is obtuse.
//
///
/// An angle is obtuse if it is greater than 90 degrees.
///
/// Note: this implementation is not precise (determistic) for
Expand All @@ -120,7 +120,7 @@ class GEOS_DLL Angle {
const geom::Coordinate& p2);

/// Returns the unoriented smallest angle between two vectors.
//
///
/// The computed angle will be in the range [0, Pi).
///
/// @param tip1 the tip of one vector
Expand All @@ -133,7 +133,7 @@ class GEOS_DLL Angle {
const geom::Coordinate& tip2);

/// Returns the oriented smallest angle between two vectors.
//
///
/// The computed angle will be in the range (-Pi, Pi].
/// A positive result corresponds to a counterclockwise rotation
/// from v1 to v2;
Expand All @@ -149,7 +149,7 @@ class GEOS_DLL Angle {
const geom::Coordinate& tip2);

/// Computes the interior angle between two segments of a ring.
//
///
/// The ring is assumed to be oriented in a clockwise direction.
/// The computed angle will be in the range [0, 2Pi]
///
Expand Down Expand Up @@ -207,7 +207,7 @@ class GEOS_DLL Angle {


/// Computes the unoriented smallest difference between two angles.
//
///
/// The angles are assumed to be normalized to the range [-Pi, Pi].
/// The result will be in the range [0, Pi].
///
Expand Down
2 changes: 1 addition & 1 deletion include/geos/algorithm/Centroid.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CoordinateSequence;
namespace geos {
namespace algorithm { // geos::algorithm

/**\brief
/** \brief
* Computes the centroid of a [Geometry](@ref geom::Geometry) of any dimension.
*
* If the geometry is nomimally of higher dimension, but contains only
Expand Down
26 changes: 13 additions & 13 deletions include/geos/algorithm/Distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ class GEOS_DLL Distance {
public:

/**
* Computes the distance from a line segment AB to a line segment CD
*
* Note: NON-ROBUST!
*
* @param A
* a point of one line
* @param B
* the second point of (must be different to A)
* @param C
* one point of the line
* @param D
* another point of the line (must be different to A)
*/
* Computes the distance from a line segment AB to a line segment CD
*
* Note: NON-ROBUST!
*
* @param A
* a point of one line
* @param B
* the second point of (must be different to A)
* @param C
* one point of the line
* @param D
* another point of the line (must be different to A)
*/
// formerly distanceLineLine
static double segmentToSegment(const geom::Coordinate& A,
const geom::Coordinate& B,
Expand Down
41 changes: 20 additions & 21 deletions include/geos/algorithm/Intersection.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,26 @@ namespace geos {
namespace algorithm { // geos::algorithm

/** \brief
* Computes the intersection point of two lines.
* If the lines are parallel or collinear this case is detected
* and <code>null</code> is returned.
* <p>
* In general it is not possible to accurately compute
* the intersection point of two lines, due to
* numerical roundoff.
* This is particularly true when the input lines are nearly parallel.
* This routine uses numerical conditioning on the input values
* to ensure that the computed value should be very close to the correct value.
*
* @param p1 an endpoint of line 1
* @param p2 an endpoint of line 1
* @param q1 an endpoint of line 2
* @param q2 an endpoint of line 2
* @return the intersection point between the lines, if there is one,
* or null if the lines are parallel or collinear
*
* @see CGAlgorithmsDD#intersection(Coordinate, Coordinate, Coordinate, Coordinate)
*/

* Computes the intersection point of two lines.
* If the lines are parallel or collinear this case is detected
* and <code>null</code> is returned.
* <p>
* In general it is not possible to accurately compute
* the intersection point of two lines, due to
* numerical roundoff.
* This is particularly true when the input lines are nearly parallel.
* This routine uses numerical conditioning on the input values
* to ensure that the computed value should be very close to the correct value.
*
* @param p1 an endpoint of line 1
* @param p2 an endpoint of line 1
* @param q1 an endpoint of line 2
* @param q2 an endpoint of line 2
* @return the intersection point between the lines, if there is one,
* or null if the lines are parallel or collinear
*
* @see CGAlgorithmsDD#intersection(Coordinate, Coordinate, Coordinate, Coordinate)
*/
class GEOS_DLL Intersection {

public:
Expand Down
19 changes: 9 additions & 10 deletions include/geos/algorithm/Length.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,19 @@ namespace geos {
namespace algorithm { // geos::algorithm

/** \brief
* Functions for computing length.
*
* @author Martin Davis
*
*/
* Functions for computing length.
*
* @author Martin Davis
*/
class GEOS_DLL Length {
public:

/**
* Computes the length of a linestring specified by a sequence of points.
*
* @param ring the points specifying the linestring
* @return the length of the linestring
*/
* Computes the length of a linestring specified by a sequence of points.
*
* @param ring the points specifying the linestring
* @return the length of the linestring
*/
static double ofLine(const geom::CoordinateSequence* ring);

};
Expand Down
14 changes: 7 additions & 7 deletions include/geos/algorithm/LineIntersector.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class GEOS_DLL LineIntersector {


/// Computes the "edge distance" of an intersection point p in an edge.
//
///
/// The edge distance is a metric of the point along the edge.
/// The metric used is a robust and easy to compute metric function.
/// It is <b>not</b> equivalent to the usual Euclidean metric.
Expand Down Expand Up @@ -106,7 +106,7 @@ class GEOS_DLL LineIntersector {
bool isInteriorIntersection(int inputLineIndex);

/// Force computed intersection to be rounded to a given precision model.
//
///
/// No getter is provided, because the precision model is not required
/// to be specified.
/// @param newPM the PrecisionModel to use for rounding
Expand All @@ -118,14 +118,14 @@ class GEOS_DLL LineIntersector {
}

/// Compute the intersection of a point p and the line p1-p2.
//
///
/// This function computes the boolean value of the hasIntersection test.
/// The actual value of the intersection (if there is one)
/// is equal to the value of <code>p</code>.
///
void computeIntersection(const geom::Coordinate& p, const geom::Coordinate& p1, const geom::Coordinate& p2);

/// Same as above but doen's compute intersection point. Faster.
/// Same as above but doesn't compute intersection point. Faster.
static bool hasIntersection(const geom::Coordinate& p, const geom::Coordinate& p1, const geom::Coordinate& p2);

// These are deprecated, due to ambiguous naming
Expand Down Expand Up @@ -164,7 +164,7 @@ class GEOS_DLL LineIntersector {
}

/// Returns the number of intersection points found.
//
///
/// This will be either 0, 1 or 2.
///
size_t
Expand All @@ -175,7 +175,7 @@ class GEOS_DLL LineIntersector {


/// Returns the intIndex'th intersection point
//
///
/// @param intIndex is 0 or 1
///
/// @return the intIndex'th intersection point
Expand All @@ -187,7 +187,7 @@ class GEOS_DLL LineIntersector {
}

/// Returns false if both numbers are zero.
//
///
/// @return true if both numbers are positive or if both numbers are negative.
///
static bool isSameSignAndNonZero(double a, double b);
Expand Down
4 changes: 2 additions & 2 deletions include/geos/algorithm/Orientation.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class GEOS_DLL Orientation {
* by the three points
* ( `Orientation::COUNTERCLOCKWISE`,
* `Orientation::CLOCKWISE`, or `Orientation::STRAIGHT` )
*/
*/
static int index(const geom::Coordinate& p1, const geom::Coordinate& p2,
const geom::Coordinate& q);

Expand All @@ -83,7 +83,7 @@ class GEOS_DLL Orientation {
* @return `true` if the ring is oriented counter-clockwise.
* @throws IllegalArgumentException
* if there are too few points to determine orientation (&lt; 4)
*/
*/
static bool isCCW(const geom::CoordinateSequence* ring);

};
Expand Down
22 changes: 11 additions & 11 deletions include/geos/algorithm/PointLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class GEOS_DLL PointLocation {
* @param line the line coordinates
* @return true if the point is a vertex of the line or lies in the interior
* of a line segment in the line
*/
*/
static bool isOnLine(const geom::Coordinate& p, const geom::CoordinateSequence* line);

/** \brief
Expand All @@ -68,17 +68,17 @@ class GEOS_DLL PointLocation {
static bool isInRing(const geom::Coordinate& p, const geom::CoordinateSequence* ring);

/** \brief
* Determines whether a point lies in the interior, on the boundary, or in the
* exterior of a ring. The ring may be oriented in either direction.
*
* This method does *not* first check the point against the envelope of
* the ring.
*
* @param p point to check for ring inclusion
* @param ring an array of coordinates representing the ring (which must have
* first point identical to last point)
* Determines whether a point lies in the interior, on the boundary, or in the
* exterior of a ring. The ring may be oriented in either direction.
*
* This method does *not* first check the point against the envelope of
* the ring.
*
* @param p point to check for ring inclusion
* @param ring an array of coordinates representing the ring (which must have
* first point identical to last point)
* @return the [Location](@ref geom::Location) of p relative to the ring
*/
*/
static geom::Location locateInRing(const geom::Coordinate& p, const std::vector<const geom::Coordinate*>& ring);
static geom::Location locateInRing(const geom::Coordinate& p, const geom::CoordinateSequence& ring);

Expand Down
2 changes: 1 addition & 1 deletion include/geos/geom.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
namespace geos {

/// Contains the <CODE>Geometry</CODE> interface hierarchy and supporting classes.
//
///
/// The Java Topology Suite (JTS) is a Java API that implements a core
/// set of spatial data operations using an explicit precision model
/// and robust geometric algorithms. JTS is int ended to be used in the
Expand Down
2 changes: 1 addition & 1 deletion include/geos/geom/CoordinateSequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class GEOS_DLL CoordinateSequence {
CoordinateSequence* c);

/// Return position of a Coordinate, or -1 if not found
//
///
/// FIXME: return std::size_t, using numeric_limits<std::size_t>::max
/// as 'not found' value.
///
Expand Down
2 changes: 1 addition & 1 deletion include/geos/geom/Dimension.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace geos {
namespace geom { // geos::geom

/// Constants representing the dimensions of a point, a curve and a surface.
//
///
/// Also, constants representing the dimensions of the empty geometry and
/// non-empty geometries, and a wildcard dimension meaning "any dimension".
///
Expand Down
4 changes: 2 additions & 2 deletions include/geos/geom/GeometryFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class GEOS_DLL GeometryFactory {
const Geometry* exemplar) const;

/// Converts an Envelope to a Geometry.
//
///
/// Returned Geometry can be a Point, a Polygon or an EMPTY geom.
///
std::unique_ptr<Geometry> toGeometry(const Envelope* envelope) const;
Expand Down Expand Up @@ -419,7 +419,7 @@ class GEOS_DLL GeometryFactory {
void destroyGeometry(Geometry* g) const;

/// Request that the instance is deleted.
//
///
/// It will really be deleted only after last child Geometry is
/// deleted. Do not use the instance anymore after calling this function
/// (unless you're a live child!).
Expand Down
4 changes: 2 additions & 2 deletions include/geos/geom/LineSegment.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ class GEOS_DLL LineSegment {
double getLength() const;

/// Tests whether the segment is horizontal.
//
///
/// @return <code>true</code> if the segment is horizontal
///
bool isHorizontal() const;

/// Tests whether the segment is vertical.
//
///
/// @return <code>true</code> if the segment is vertical
///
bool isVertical() const;
Expand Down
Loading

0 comments on commit 2e3ef09

Please sign in to comment.