This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 084d6a5343e956313542911050ac6ffc4be9edcf Author: jsorel <[email protected]> AuthorDate: Tue Oct 13 15:39:28 2026 +0200 doc(Geometry): replace in javadoc old sequence name which was renamed DataPoints --- .../main/org/apache/sis/geometries/BBox.java | 6 +-- .../main/org/apache/sis/geometries/Curve.java | 2 +- .../main/org/apache/sis/geometries/DataPoints.java | 36 +++++++------- .../main/org/apache/sis/geometries/Empty.java | 2 +- .../main/org/apache/sis/geometries/Geometry.java | 6 +-- .../org/apache/sis/geometries/GeometryFactory.java | 56 +++++++++++----------- .../main/org/apache/sis/geometries/HyperPlane.java | 10 ++-- .../main/org/apache/sis/geometries/OBBox.java | 2 +- .../main/org/apache/sis/geometries/Plane.java | 10 ++-- .../main/org/apache/sis/geometries/Point.java | 4 +- .../main/org/apache/sis/geometries/Prism.java | 2 +- .../main/org/apache/sis/geometries/Ray.java | 10 ++-- .../apache/sis/geometries/adapter/JTSAdapter.java | 2 +- .../geometries/adapter/PathIteratorAdapter.java | 36 +++++++------- .../org/apache/sis/geometries/adapter/SIS.java | 14 +++--- .../sis/geometries/adapter/ShapeConverter.java | 8 ++-- .../geometries/adapter/WellKnownBinaryParser.java | 8 ++-- .../geometries/adapter/WellKnownTextParser.java | 6 +-- .../internal/shared/ArrayDataPoints.java | 2 +- .../internal/shared/BSplineEvaluator.java | 4 +- .../internal/shared/ConcatenatedDataPoints.java | 30 ++++++------ .../internal/shared/DefaultArcByCenterPoint.java | 2 +- .../internal/shared/EmptyDataPoints.java | 10 ++-- .../geometries/internal/shared/IndexedPoint.java | 2 +- .../internal/shared/SinglePositionDataPoints.java | 8 ++-- .../sis/geometries/solid/ParametricCurveSolid.java | 2 +- .../solid/polyhedron/AbstractPolyhedron.java | 2 +- .../org/apache/sis/geometries/surface/Capsule.java | 6 +-- .../apache/sis/geometries/surface/Cylinder.java | 8 ++-- .../apache/sis/geometries/surface/Ellipsoid.java | 15 +++--- .../geometries/surface/ParametricCurveSurface.java | 2 +- .../org/apache/sis/geometries/surface/Sphere.java | 13 ++--- .../main/org/apache/sis/gml/AbstractGMLWriter.java | 2 +- .../main/org/apache/sis/gml/GML3Writer.java | 2 +- .../main/org/apache/sis/gml/GMLCRS.java | 2 +- .../org/apache/sis/gml/PositionListBuilder.java | 8 ++-- .../org/apache/sis/geometries/DataPointsTest.java | 2 +- .../org/apache/sis/geometries/GeometryTest.java | 37 ++++++++++++++ .../test/org/apache/sis/gml/GML2ReaderTest.java | 2 +- .../test/org/apache/sis/gml/GML2WriterTest.java | 2 +- .../test/org/apache/sis/gml/GML3ReaderTest.java | 2 +- .../test/org/apache/sis/gml/GML3WriterTest.java | 2 +- .../test/org/apache/sis/gml/GeometryAssert.java | 2 +- .../apache/sis/gml/JAXBGeometryAdapterTest.java | 2 +- 44 files changed, 215 insertions(+), 176 deletions(-) diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java index d914577fec..f188a6c71a 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java @@ -146,9 +146,9 @@ public final class BBox extends GeneralEnvelope implements Geometry { } /** - * Returns the two corners of this box, the lower one first, as a sequence of two positions. + * Returns the two corners of this box, the lower one first, as a {@code DataPoints} of two positions. * Those corners are what this box is made of, so writing a position through the returned - * sequence moves the corresponding corner. + * {@code DataPoints} moves the corresponding corner. */ @Override public DataPoints getDataPoints() { @@ -156,7 +156,7 @@ public final class BBox extends GeneralEnvelope implements Geometry { } /** - * The two corners of the enclosing box, seen as a sequence of two positions. + * The two corners of the enclosing box, seen as a {@code DataPoints} of two positions. * This class holds no coordinate of its own: it reads and writes the box. */ private final class Corners implements DataPoints { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Curve.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Curve.java index fc97b02f23..59693f4cc5 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Curve.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Curve.java @@ -43,7 +43,7 @@ import org.apache.sis.measure.Units; /** * A 1-dimensional geometric primitive, continuous image of an open real interval, - * usually stored as a sequence of points with the subtype specifying the interpolation between them. + * usually stored as {@code DataPoints} with the subtype specifying the interpolation between them. * * <p>A curve is connected and has a measurable length. Its orientation is given by its * parameterization, consistently with the tangent which always points in the forward direction. diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/DataPoints.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/DataPoints.java index c5bbfbebe2..2e6972cbf2 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/DataPoints.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/DataPoints.java @@ -131,27 +131,27 @@ public interface DataPoints { void setAttribute(int index, String name, ReadOnly.Vector<?> value); /** - * Returns a new point between the two given points of this sequence, for example on a segment. + * Returns a new point between the two given points of this {@code DataPoints}, for example on a segment. * This is a shortcut for {@link #interpolatePoint(int[], double[])} with the weights * 1 − {@code ratio} and {@code ratio}. * * @param i0 index of the point at ratio 0, the start of the segment. * @param i1 index of the point at ratio 1, the end of the segment. * @param ratio position between the two points, from 0 to 1. - * @return a new point holding the computed attributes, independent of this sequence. + * @return a new point holding the computed attributes, independent of this {@code DataPoints}. */ default Point interpolatePoint(final int i0, final int i1, final double ratio) { return interpolatePoint(new int[] {i0, i1}, new double[] {1 - ratio, ratio}); } /** - * Returns a new point interpolated between any number of points of this sequence, for example on + * Returns a new point interpolated between any number of points of this {@code DataPoints}, for example on * a segment or inside a triangle. Each attribute of the new point, the position included, is * computed by {@link #interpolateAttribute(String, int[], double[])}. * * @param indices indices of the points to interpolate between, at least one. * @param weights weight of each point, in the same order. - * @return a new point holding the computed attributes, independent of this sequence. + * @return a new point holding the computed attributes, independent of this {@code DataPoints}. * @throws IllegalArgumentException if there is no point, or not one weight per point. */ default Point interpolatePoint(final int[] indices, final double[] weights) { @@ -164,7 +164,7 @@ public interface DataPoints { } /** - * Returns the value of an attribute between the two given points of this sequence, for example on + * Returns the value of an attribute between the two given points of this {@code DataPoints}, for example on * a segment. This is a shortcut for {@link #interpolateAttribute(String, int[], double[])} with the * weights 1 − {@code ratio} and {@code ratio}. * @@ -172,14 +172,14 @@ public interface DataPoints { * @param i0 index of the point at ratio 0, the start of the segment. * @param i1 index of the point at ratio 1, the end of the segment. * @param ratio position between the two points, from 0 to 1. - * @return the attribute value, independent of this sequence. + * @return the attribute value, independent of this {@code DataPoints}. */ default Vector<?> interpolateAttribute(final String name, final int i0, final int i1, final double ratio) { return interpolateAttribute(name, new int[] {i0, i1}, new double[] {1 - ratio, ratio}); } /** - * Returns the value of an attribute interpolated between any number of points of this sequence, + * Returns the value of an attribute interpolated between any number of points of this {@code DataPoints}, * for example on a segment, inside a triangle or inside a quadrilateral. The weights are the * generalized barycentric coordinates of the position where the value is computed: they are * positive and sum to 1. The value is computed as declared by the @@ -198,7 +198,7 @@ public interface DataPoints { * @param name name of the attribute. * @param indices indices of the points to interpolate between, at least one. * @param weights weight of each point, in the same order. - * @return the attribute value, independent of this sequence. + * @return the attribute value, independent of this {@code DataPoints}. * @throws IllegalArgumentException if there is no point, or not one weight per point. */ default Vector<?> interpolateAttribute(final String name, final int[] indices, final double[] weights) { @@ -266,13 +266,13 @@ public interface DataPoints { } /** - * Returns a hash code value for the given sequence, computed from the attributes it declares + * Returns a hash code value for the given {@code DataPoints}, computed from the attributes it declares * and from the values it holds for them. Implementations of this interface shall base their - * {@code hashCode()} on this method, so that two sequences holding the same data have the + * {@code hashCode()} on this method, so that two {@code DataPoints} holding the same data have the * same hash code whatever the way they store it. * - * @param points the sequence to hash, not null. - * @return a hash code value for the given sequence. + * @param points the {@code DataPoints} to hash, not null. + * @return a hash code value for the given {@code DataPoints}. */ static int hashCode(final DataPoints points) { final DataPointsType type = points.getType(); @@ -290,19 +290,19 @@ public interface DataPoints { } /** - * Returns whether the given object is a sequence declaring the same attributes as the given one + * Returns whether the given object is a {@code DataPoints} declaring the same attributes as the given one * and holding the same values for them. Implementations of this interface shall base their - * {@code equals(Object)} on this method, so that two sequences holding the same data are equal - * whatever the way they store it: a sequence backed by arrays is equal to a sequence backed by + * {@code equals(Object)} on this method, so that two {@code DataPoints} holding the same data are equal + * whatever the way they store it: a {@code DataPoints} backed by arrays is equal to one backed by * a list of points when both describe the same positions. * * <p>The attributes are compared one by one rather than by delegating to - * {@link DataPointsType#equals(DataPointsType, Object)}, because a sequence may be its own + * {@link DataPointsType#equals(DataPointsType, Object)}, because a {@code DataPoints} may be its own * description, and that method reports two descriptions as different as soon as one of them * also carries the positions.</p> * - * @param points the sequence to compare, not null. - * @param obj the object to compare to the given sequence, or {@code null}. + * @param points the {@code DataPoints} to compare, not null. + * @param obj the object to compare to the given {@code DataPoints}, or {@code null}. * @return whether the two hold the same attributes with the same values. */ static boolean equals(final DataPoints points, final Object obj) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Empty.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Empty.java index a7c2dccbe4..2dc82a4d0a 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Empty.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Empty.java @@ -166,7 +166,7 @@ public sealed interface Empty extends Geometry } /** - * Returns an empty sequence: the empty set holds no position. + * Returns an empty {@code DataPoints}: the empty set holds no position. */ @Override default DataPoints getDataPoints() { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java index eb3ea6a22d..150c5239b5 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java @@ -158,11 +158,11 @@ public sealed interface Geometry /** * Positions this geometry is made of. * - * <p>The returned sequence is the one this geometry holds, or a view onto it: writing a + * <p>The returned {@code DataPoints} is the one this geometry holds, or a view onto it: writing a * position through it moves this geometry. A geometry built on other geometries, such as a * surface on its rings or a collection on its elements, returns a view concatenating their - * sequences in the order it holds them, so a position shared by two elements appears as many - * times as it is held. A geometry which has no position of its own returns an empty sequence.</p> + * {@code DataPoints} in the order it holds them, so a position shared by two elements appears as many + * times as it is held. A geometry which has no position of its own returns an empty {@code DataPoints}.</p> * * <p>Difference with ISO 19107: the type has been changed from a list of direct positions * to {@link DataPoints}, in order to accommodate additional attributes like in GLTF or diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryFactory.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryFactory.java index bbbcc8c08e..d92129f139 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryFactory.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryFactory.java @@ -176,12 +176,12 @@ public final class GeometryFactory { } /** - * Creates a sequence of the given size holding the attributes declared by the given type. + * Creates a {@code DataPoints} of the given size holding the attributes declared by the given type. * All the values are initialized to zero. * - * @param type the attributes of the sequence, which shall include the position. - * @param size number of points in the sequence. - * @return a new sequence of the given size. + * @param type the attributes of the {@code DataPoints}, which shall include the position. + * @param size number of points in the {@code DataPoints}. + * @return a new {@code DataPoints} of the given size. */ public DataPoints createDataPoints(DataPointsType type, int size) { final Map<String,Array> attributes = new LinkedHashMap<>(); @@ -615,13 +615,13 @@ public final class GeometryFactory { } /** - * Creates a sphere of the given radius centered on the single position of the given sequence. - * The sequence is taken as-is, so the caller may give the sphere the attributes carried by it. + * Creates a sphere of the given radius centered on the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the sphere the attributes carried by it. * - * @param points the center of the sphere, as a sequence of exactly one position. + * @param points the center of the sphere, as a {@code DataPoints} of exactly one position. * @param radius radius of the sphere, must be positive. * @return the sphere of the given center and radius. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Sphere createSphere(DataPoints points, double radius) { return new Sphere(points, radius); @@ -629,15 +629,15 @@ public final class GeometryFactory { /** * Creates an ellipsoid of the given semi-axes centered on the single position of the given - * sequence. The sequence is taken as-is, so the caller may give the ellipsoid the attributes - * carried by it. An ellipsoid whose semi-axes are all equal is a {@linkplain #createSphere - * sphere} of that radius. + * {@code DataPoints}. The {@code DataPoints} is taken as-is, so the caller may give the + * ellipsoid the attributes carried by it. An ellipsoid whose semi-axes are all equal is a + * {@linkplain #createSphere sphere} of that radius. * - * @param points the center of the ellipsoid, as a sequence of exactly one position. + * @param points the center of the ellipsoid, as a {@code DataPoints} of exactly one position. * @param semiAxes length of the semi-axis along each axis of the coordinate system, * one value per dimension. Each of them must be positive. * @return the ellipsoid of the given center and semi-axes. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position, + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position, * or if the number of semi-axes is not the number of dimensions. */ public Ellipsoid createEllipsoid(DataPoints points, double... semiAxes) { @@ -777,13 +777,13 @@ public final class GeometryFactory { } /** - * Creates a ray starting from the single position of the given sequence. - * The sequence is taken as-is, so the caller may give the ray the attributes carried by it. + * Creates a ray starting from the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the ray the attributes carried by it. * - * @param points the position the ray starts from, as a sequence of exactly one position. + * @param points the position the ray starts from, as a {@code DataPoints} of exactly one position. * @param direction the direction the ray extends toward, not null. - * @return the ray starting from the position of the given sequence. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @return the ray starting from the position of the given {@code DataPoints}. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Ray createRay(DataPoints points, Vector<?> direction) { return new Ray(points, direction); @@ -806,13 +806,13 @@ public final class GeometryFactory { } /** - * Creates a plane centered on the single position of the given sequence. - * The sequence is taken as-is, so the caller may give the plane the attributes carried by it. + * Creates a plane centered on the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the plane the attributes carried by it. * - * @param points the position the plane is centered on, as a sequence of exactly one position. + * @param points the position the plane is centered on, as a {@code DataPoints} of exactly one position. * @param normal the direction the plane is perpendicular to, not null. - * @return the plane centered on the position of the given sequence. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @return the plane centered on the position of the given {@code DataPoints}. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Plane createPlane(DataPoints points, Vector<?> normal) { return new Plane(points, normal); @@ -833,13 +833,13 @@ public final class GeometryFactory { } /** - * Creates a hyperplane passing by the single position of the given sequence. - * The sequence is taken as-is, so the caller may give the hyperplane the attributes carried by it. + * Creates a hyperplane passing by the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the hyperplane the attributes carried by it. * - * @param points a position the hyperplane passes by, as a sequence of exactly one position. + * @param points a position the hyperplane passes by, as a {@code DataPoints} of exactly one position. * @param normal the direction the hyperplane is perpendicular to, not null. - * @return the hyperplane passing by the position of the given sequence. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @return the hyperplane passing by the position of the given {@code DataPoints}. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public HyperPlane createHyperPlane(DataPoints points, Vector<?> normal) { return new HyperPlane(points, normal); diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java index c8799ab869..74627f4640 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java @@ -56,13 +56,13 @@ public final class HyperPlane extends AbstractGeometry{ } /** - * Creates a hyperplane passing by the single position of the given sequence. - * The sequence is taken as-is, so the caller may give the hyperplane the attributes - * carried by that sequence. + * Creates a hyperplane passing by the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the hyperplane the attributes + * carried by that {@code DataPoints}. * - * @param points a position the hyperplane passes by, as a sequence of exactly one position. + * @param points a position the hyperplane passes by, as a {@code DataPoints} of exactly one position. * @param normal the direction the hyperplane is perpendicular to, not null. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public HyperPlane(DataPoints points, Vector<?> normal) { if (points.size() != 1) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java index 477849b9a4..5ebb9b4567 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java @@ -164,7 +164,7 @@ public final class OBBox extends AbstractGeometry { } /** - * Returns the center of this box, as a sequence of one position. The corners of the box are + * Returns the center of this box, as a {@code DataPoints} of one position. The corners of the box are * derived from that position and from its axes, so the center is the only position it holds. */ @Override diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java index 3bf350b7fa..62cdc24f30 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java @@ -68,13 +68,13 @@ public final class Plane extends AbstractGeometry{ } /** - * Creates a plane centered on the single position of the given sequence. - * The sequence is taken as-is, so the caller may give the plane the attributes - * carried by that sequence. + * Creates a plane centered on the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the plane the attributes + * carried by that {@code DataPoints}. * - * @param points the position the plane is centered on, as a sequence of exactly one position. + * @param points the position the plane is centered on, as a {@code DataPoints} of exactly one position. * @param normal the direction the plane is perpendicular to, not null. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Plane(DataPoints points, Vector<?> normal) { if (points.size() != 1) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Point.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Point.java index e35674e779..d61c4ba788 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Point.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Point.java @@ -98,9 +98,9 @@ public sealed interface Point extends Primitive void setAttribute(String name, ReadOnly.Vector<?> tuple); /** - * View this point as a single point sequence + * View this point as a {@code DataPoints} of a single point * - * @return this point as a sequence of one data point. + * @return this point as a {@code DataPoints} of one point. */ @Override default DataPoints getDataPoints() { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java index b4d1b38a0c..51a38718ee 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java @@ -54,7 +54,7 @@ public sealed interface Prism extends Geometry /** * Returns the positions of the geometry this prism is the extrusion of. The positions the - * extrusion adds are not materialized, so they are not part of the returned sequence. + * extrusion adds are not materialized, so they are not part of the returned {@code DataPoints}. */ @Override default DataPoints getDataPoints() { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java index 897b484728..129ba74266 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java @@ -53,13 +53,13 @@ public final class Ray extends AbstractGeometry{ } /** - * Creates a ray starting from the single position of the given sequence. - * The sequence is taken as-is, so the caller may give the ray the attributes - * carried by that sequence. + * Creates a ray starting from the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the ray the attributes + * carried by that {@code DataPoints}. * - * @param points the position the ray starts from, as a sequence of exactly one position. + * @param points the position the ray starts from, as a {@code DataPoints} of exactly one position. * @param direction the direction the ray extends toward, not null. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Ray(DataPoints points, Vector<?> direction) { if (points.size() != 1) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/JTSAdapter.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/JTSAdapter.java index 37a75d4857..74e0b6acab 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/JTSAdapter.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/JTSAdapter.java @@ -124,7 +124,7 @@ public final class JTSAdapter { /** * View a geometry as a JTS geometry. * - * @param copy if true create a copy of the point sequence, otherwise create a view + * @param copy if true create a copy of the {@code DataPoints}, otherwise create a view * @return JTS equivalent */ public static org.locationtech.jts.geom.Geometry asJTS(Geometry geom, boolean copy, org.locationtech.jts.geom.GeometryFactory gf) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/PathIteratorAdapter.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/PathIteratorAdapter.java index ba280325ac..901380b39c 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/PathIteratorAdapter.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/PathIteratorAdapter.java @@ -34,7 +34,7 @@ import org.apache.sis.maths.Vector; /** * Java2D path iterator for SIS geometry. - * This iterator gets coordinates from the {@link CoordinateSequence} associated with each geometry. + * This iterator gets coordinates from the {@link DataPoints} associated with each geometry. * * @author Johann Sorel (Puzzle-GIS, Geomatys) * @author Martin Desruisseaux (Geomatys) @@ -47,18 +47,18 @@ final class PathIteratorAdapter implements PathIterator { private final AffineTransform at; /** - * Provider of point sequences. + * Provider of the {@code DataPoints}. */ private final Iterator<DataPoints> sequences; /** - * The sequence of point tuples to return, + * The {@code DataPoints} to return, * or {@code null} if the iteration is finished. */ private DataPoints coordinates; /** - * Number of points to return in the sequence. + * Number of points to return in the {@code DataPoints}. */ private int pointCount; @@ -68,7 +68,7 @@ final class PathIteratorAdapter implements PathIterator { private int closingPoint; /** - * Index of current position in the sequence of coordinate tuples. + * Index of current position in the {@code DataPoints}. */ private int currentIndex; @@ -85,8 +85,8 @@ final class PathIteratorAdapter implements PathIterator { } /** - * Moves to the next sequence of coordinate tuples. The {@link #coordinates} sequence - * should be null when this method is invoked. If there are no more sequences, + * Moves to the next {@code DataPoints}. The {@link #coordinates} {@code DataPoints} + * should be null when this method is invoked. If there are no more {@code DataPoints}, * then the {@link #coordinates} will be left unchanged (i.e. null). */ private void nextSequence() { @@ -170,10 +170,10 @@ final class PathIteratorAdapter implements PathIterator { } /** - * Returns an iterator over the coordinate sequences of the given geometry. + * Returns an iterator over the {@code DataPoints} of the given geometry. * - * @param geometry the geometry for which to get coordinate sequences. - * @return coordinate sequences over the given geometry. + * @param geometry the geometry for which to get the {@code DataPoints}. + * @return {@code DataPoints} over the given geometry. */ private static Iterator<DataPoints> iterator(final Geometry geometry) { final Collection<DataPoints> sequences; @@ -192,9 +192,9 @@ final class PathIteratorAdapter implements PathIterator { } /** - * An iterator over the coordinate sequences of a polygon. - * The first coordinate sequence is the exterior ring and - * all other sequences are interior rings. + * An iterator over the {@code DataPoints} of a polygon. + * The first {@code DataPoints} is the exterior ring and + * all others are interior rings. */ private static final class RingIterator implements Iterator<DataPoints> { /** The polygon for which to return rings. */ @@ -214,7 +214,7 @@ final class PathIteratorAdapter implements PathIterator { return interior < polygon.getNumInteriorRing(); } - /** Returns the coordinate sequence of the next ring. */ + /** Returns the {@code DataPoints} of the next ring. */ @Override public DataPoints next() { final LineString current; if (interior < 0) { @@ -228,7 +228,7 @@ final class PathIteratorAdapter implements PathIterator { } /** - * An iterator over the coordinate sequences of a geometry collection. + * An iterator over the {@code DataPoints} of a geometry collection. */ private static final class GeomIterator implements Iterator<DataPoints> { /** The collection for which to return geometries. */ @@ -237,7 +237,7 @@ final class PathIteratorAdapter implements PathIterator { /** Index of current geometry. */ private int index; - /** Coordinate sequences of the current geometry. */ + /** {@code DataPoints} of the current geometry. */ private Iterator<DataPoints> current; /** Created a new iterator for the given collection. */ @@ -250,7 +250,7 @@ final class PathIteratorAdapter implements PathIterator { } } - /** Returns {@code true} if there is more sequences to return. */ + /** Returns {@code true} if there is more {@code DataPoints} to return. */ @Override public boolean hasNext() { while (!current.hasNext()) { if (++index >= collection.getNumGeometries()) { @@ -261,7 +261,7 @@ final class PathIteratorAdapter implements PathIterator { return true; } - /** Returns the coordinate sequence of the next geometry. */ + /** Returns the {@code DataPoints} of the next geometry. */ @Override public DataPoints next() { return current.next(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/SIS.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/SIS.java index ed1fbbf1d5..1b6488e9bb 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/SIS.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/SIS.java @@ -395,7 +395,7 @@ public final class SIS extends org.apache.sis.geometry.wrapper.Geometries<Geomet * desired target type.</li> * <li>Otherwise, if {@code type} is {@link GeometryType#POLYGON}, then the components shall be * a {@link LineString}[] with the first ring taken as the shell and all other rings as holes.</li> - * <li>Otherwise, the components shall be a {@link DataPoints} sequence, an {@link Array} of + * <li>Otherwise, the components shall be a {@link DataPoints}, an {@link Array} of * positions, or an array or collection of {@link Point} or {@link Vector} instances.</li> * </ul> * @@ -502,7 +502,7 @@ public final class SIS extends org.apache.sis.geometry.wrapper.Geometries<Geomet } /** - * Reads the given number of coordinate tuples from the given buffer as a sequence of positions. + * Reads the given number of coordinate tuples from the given buffer as a {@code DataPoints}. * The buffer position is advanced by {@code dimensions.count} × {@code count}. * * @param isFloat whether to store the coordinates as single-precision numbers. @@ -529,7 +529,7 @@ public final class SIS extends org.apache.sis.geometry.wrapper.Geometries<Geomet } /** - * Returns the given coordinate tuples as a sequence of positions. + * Returns the given coordinate tuples as a {@code DataPoints}. * * @param tuples the coordinate tuples, each of {@code dimensions.count} values. * @param isFloat whether to store the coordinates as single-precision numbers. @@ -554,14 +554,14 @@ public final class SIS extends org.apache.sis.geometry.wrapper.Geometries<Geomet } /** - * Returns the given coordinates as a sequence of positions carrying the measures, if any, + * Returns the given coordinates as a {@code DataPoints} carrying the measures, if any, * as their {@value DataPointsType#ATT_M} attribute. * * @param isFloat whether to store the values as single-precision numbers. * @param spatial the number of spatial dimensions of the positions. * @param positions the spatial coordinates, as {@code spatial} values per position. * @param measures one measure per position, or {@code null} if the positions have no measure. - * @return the sequence of the given positions. + * @return the {@code DataPoints} of the given positions. */ private static ArrayDataPoints toDataPoints(final boolean isFloat, final int spatial, final double[] positions, final double[] measures) @@ -589,8 +589,8 @@ public final class SIS extends org.apache.sis.geometry.wrapper.Geometries<Geomet } /** - * Returns the given components as a sequence of positions. The components can be a - * {@link DataPoints} sequence, an {@link Array} of positions, or an array or collection + * Returns the given components as a {@code DataPoints}. The components can be a + * {@link DataPoints}, an {@link Array} of positions, or an array or collection * of {@link Point} or {@link Vector} instances. * * @param components the components to read. diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/ShapeConverter.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/ShapeConverter.java index 0d7f198fe3..a10c39ccc9 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/ShapeConverter.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/ShapeConverter.java @@ -153,7 +153,7 @@ public abstract class ShapeConverter { length += DIMENSION; } - /** Returns a copy of current coordinate values as a SIS coordinate sequence. */ + /** Returns a copy of current coordinate values as a {@code DataPoints}. */ @Override DataPoints toSequence(final boolean close) { if (close && !Arrays.equals(buffer, 0, 2, buffer, length - 2, length)) { addPoint(buffer); @@ -201,7 +201,7 @@ public abstract class ShapeConverter { length += DIMENSION; } - /** Returns a copy of current coordinate values as a SIS coordinate sequence. */ + /** Returns a copy of current coordinate values as a {@code DataPoints}. */ @Override DataPoints toSequence(final boolean close) { if (close && !Arrays.equals(buffer, 0, 2, buffer, length - 2, length)) { addPoint(buffer); @@ -225,11 +225,11 @@ public abstract class ShapeConverter { abstract void addPoint(); /** - * Returns a copy of current coordinate values as a SIS coordinate sequence. + * Returns a copy of current coordinate values as a {@code DataPoints}. * The number of values to copy in a new array is {@link #length}. * * @param close whether to ensure that the first point is repeated as the last point. - * @return a SIS coordinate sequence containing a copy of current coordinate values. + * @return a {@code DataPoints} containing a copy of current coordinate values. */ abstract DataPoints toSequence(boolean close); diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownBinaryParser.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownBinaryParser.java index 239121b859..92accc436e 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownBinaryParser.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownBinaryParser.java @@ -247,8 +247,8 @@ final class WellKnownBinaryParser { * Parses the single coordinate tuple of a point. * * <p>A tuple of {@link Double#NaN} ordinates is the usual way of writing an empty point, and - * does not map to a {@link Point}: the Apache SIS model has no empty point, since a point - * sequence of length 0 is not a valid position of a point. It maps to {@link Empty} instead, + * does not map to a {@link Point}: the Apache SIS model has no empty point, since a + * {@code DataPoints} of length 0 is not a valid position of a point. It maps to {@link Empty} instead, * the geometry which stands for the empty point set whatever its type, and which is written * back as an empty {@code GEOMETRYCOLLECTION}.</p> */ @@ -605,7 +605,7 @@ final class WellKnownBinaryParser { } /** - * Builds the point sequence of the accumulated tuples, possibly empty. + * Builds the {@code DataPoints} of the accumulated tuples, possibly empty. */ DataPoints build() { final int posWidth = positionDimension(); @@ -635,7 +635,7 @@ final class WellKnownBinaryParser { } /** - * Returns a sequence holding both the positions and the measures. + * Returns a {@code DataPoints} holding both the positions and the measures. */ private DataPoints createSequence(final Array positions, final Array measures) { final Map<String,Array> attributes = new LinkedHashMap<>(4); diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownTextParser.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownTextParser.java index 4f7244ccb8..9c009b0471 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownTextParser.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/adapter/WellKnownTextParser.java @@ -226,7 +226,7 @@ final class WellKnownTextParser { * Parses {@code (1 2)} or {@code EMPTY}. * * <p>{@code POINT EMPTY} does not map to a {@link Point}: the Apache SIS model has no empty - * point, since a point sequence of length 0 is not a valid position of a point and + * point, since a {@code DataPoints} of length 0 is not a valid position of a point and * {@link GeometryFactory#createPoint(CoordinateReferenceSystem)} builds a point at the origin * rather than an absent one. It maps to {@link Empty} instead, the geometry which stands for * the empty point set whatever its type, and which is written back as @@ -664,7 +664,7 @@ final class WellKnownTextParser { } /** - * Builds the point sequence of the accumulated tuples, possibly empty. + * Builds the {@code DataPoints} of the accumulated tuples, possibly empty. */ DataPoints build() { final int posWidth = positionDimension(); @@ -694,7 +694,7 @@ final class WellKnownTextParser { } /** - * Returns a sequence holding both the positions and the measures. + * Returns a {@code DataPoints} holding both the positions and the measures. */ private DataPoints createSequence(final Array positions, final Array measures) { final Map<String,Array> attributes = new LinkedHashMap<>(4); diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ArrayDataPoints.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ArrayDataPoints.java index 37bbdfc4bb..7293639601 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ArrayDataPoints.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ArrayDataPoints.java @@ -174,7 +174,7 @@ public final class ArrayDataPoints implements DataPoints, DataPointsType { } /** - * An indexed point in the point sequence + * An indexed point in the {@code DataPoints} */ public static non-sealed class Indexed implements Point { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/BSplineEvaluator.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/BSplineEvaluator.java index 5a2b2238e2..e0f04b619e 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/BSplineEvaluator.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/BSplineEvaluator.java @@ -186,12 +186,12 @@ final class BSplineEvaluator { } /** - * Returns the given control points as a sequence in the given reference system. + * Returns the given control points as a {@code DataPoints} in the given reference system. * The control points of some curves are only positions, sometimes without reference system. * * @param points the control points. * @param crs the reference system of the curve. - * @return the control points as a sequence of positions. + * @return the control points as a {@code DataPoints} of positions. */ static DataPoints asDataPoints(final Array points, final CoordinateReferenceSystem crs) { if (points.getCoordinateReferenceSystem() != null) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ConcatenatedDataPoints.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ConcatenatedDataPoints.java index bdec3d2233..ca029cc24f 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ConcatenatedDataPoints.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/ConcatenatedDataPoints.java @@ -29,12 +29,12 @@ import org.apache.sis.maths.Vector; /** - * Several sequences of positions seen as a single one, in the order they are given. - * This is the sequence of an aggregate geometry: the rings of a surface, the elements of a + * Several {@code DataPoints} seen as a single one, in the order they are given. + * This is the {@code DataPoints} of an aggregate geometry: the rings of a surface, the elements of a * collection, the segments of a compound curve. The positions a geometry holds several times, * such as the end position two consecutive segments have in common, appear as many times. * - * <p>The sequences must all declare the same attributes, which {@link #ConcatenatedDataPoints} + * <p>The {@code DataPoints} must all declare the same attributes, which {@link #ConcatenatedDataPoints} * verifies.</p> * * @author Johann Sorel (Geomatys) @@ -42,7 +42,7 @@ import org.apache.sis.maths.Vector; public final class ConcatenatedDataPoints implements DataPoints { /** - * The sequences this view concatenates, never empty. + * The {@code DataPoints} this view concatenates, never empty. */ private final DataPoints[] sources; @@ -54,11 +54,11 @@ public final class ConcatenatedDataPoints implements DataPoints { private final int[] offsets; /** - * Creates a view over the given sequences. + * Creates a view over the given {@code DataPoints}. * - * @param sources the sequences to concatenate, at least one. - * @throws IllegalArgumentException if no sequence is given, - * or if the sequences do not declare the same attributes. + * @param sources the {@code DataPoints} to concatenate, at least one. + * @throws IllegalArgumentException if no {@code DataPoints} is given, + * or if the {@code DataPoints} do not declare the same attributes. */ public ConcatenatedDataPoints(final DataPoints... sources) { if (sources.length == 0) { @@ -76,10 +76,10 @@ public final class ConcatenatedDataPoints implements DataPoints { } /** - * Creates a view over the sequences of the given geometries. + * Creates a view over the {@code DataPoints} of the given geometries. * - * @param geometries the geometries whose sequences to concatenate, at least one. - * @return the positions of the given geometries, as a single sequence. + * @param geometries the geometries whose {@code DataPoints} to concatenate, at least one. + * @return the positions of the given geometries, as a single {@code DataPoints}. * @throws IllegalArgumentException if no geometry is given, * or if they do not declare the same attributes. */ @@ -92,11 +92,11 @@ public final class ConcatenatedDataPoints implements DataPoints { } /** - * Creates a view over the sequences of the given geometries. + * Creates a view over the {@code DataPoints} of the given geometries. * - * @param first the geometry whose sequence comes first, not null. - * @param others the geometries whose sequences follow, possibly empty. - * @return the positions of the given geometries, as a single sequence. + * @param first the geometry whose {@code DataPoints} comes first, not null. + * @param others the geometries whose {@code DataPoints} follow, possibly empty. + * @return the positions of the given geometries, as a single {@code DataPoints}. */ public static DataPoints of(final Geometry first, final List<? extends Geometry> others) { final DataPoints[] sources = new DataPoints[others.size() + 1]; diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/DefaultArcByCenterPoint.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/DefaultArcByCenterPoint.java index 45b77d0f04..a6c635be54 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/DefaultArcByCenterPoint.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/DefaultArcByCenterPoint.java @@ -99,7 +99,7 @@ public non-sealed class DefaultArcByCenterPoint extends AbstractGeometry impleme } /** - * Returns the center of this arc, as a sequence of one position. An arc by center point is + * Returns the center of this arc, as a {@code DataPoints} of one position. An arc by center point is * defined by that position and by angles, so the center is the only position it holds. */ @Override diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/EmptyDataPoints.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/EmptyDataPoints.java index fd3e873b5b..ab17447b6b 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/EmptyDataPoints.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/EmptyDataPoints.java @@ -25,11 +25,11 @@ import org.apache.sis.maths.Vector; /** - * A sequence holding no position. This is what a geometry which has no position of its own - * returns, so that asking any geometry for its positions answers an empty sequence rather + * A {@code DataPoints} holding no position. This is what a geometry which has no position of its own + * returns, so that asking any geometry for its positions answers an empty {@code DataPoints} rather * than failing. * - * <p>Every accessor reports the sequence as empty: there is no index to read from or to write + * <p>Every accessor reports the {@code DataPoints} as empty: there is no index to read from or to write * to, so this class is modifiable in the same way an empty list is.</p> * * @author Johann Sorel (Geomatys) @@ -40,7 +40,7 @@ public final class EmptyDataPoints implements DataPoints { private final DataPointsType type; /** - * Creates an empty sequence described by the given attributes. + * Creates an empty {@code DataPoints} described by the given attributes. * * @param crs the reference system the absent positions would be expressed in, not null. * @param type the attributes the absent positions would carry, not null. @@ -51,7 +51,7 @@ public final class EmptyDataPoints implements DataPoints { } /** - * Creates an empty sequence in the given reference system, carrying no attribute. + * Creates an empty {@code DataPoints} in the given reference system, carrying no attribute. * * @param crs the reference system the absent positions would be expressed in, not null. */ diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/IndexedPoint.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/IndexedPoint.java index b15198864a..27de382a1b 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/IndexedPoint.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/IndexedPoint.java @@ -42,7 +42,7 @@ public non-sealed class IndexedPoint implements Point { } /** - * @return index in the parent point sequence. + * @return index in the parent {@code DataPoints}. */ public int getIndex() { return index; diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/SinglePositionDataPoints.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/SinglePositionDataPoints.java index b0dcaa51c4..3c31372084 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/SinglePositionDataPoints.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/internal/shared/SinglePositionDataPoints.java @@ -28,8 +28,8 @@ import org.apache.sis.maths.Vector; /** - * The single position a geometry is placed by, seen as a sequence of one position. This is the - * sequence of a shape which is defined by one position and by parameters rather than by a list + * The single position a geometry is placed by, seen as a {@code DataPoints} of one position. This is the + * {@code DataPoints} of a shape which is defined by one position and by parameters rather than by a list * of coordinates: the center of a sphere, the center of an oriented box. * * <p>This class holds no position of its own. The position is read from the geometry each time @@ -69,7 +69,7 @@ public final class SinglePositionDataPoints implements DataPoints { * {@inheritDoc} * * <p>The type is derived from the position, which carries its own sample system and data - * type, so that this sequence describes the single attribute it holds.</p> + * type, so that this {@code DataPoints} describes the single attribute it holds.</p> */ @Override public DataPointsType getType() { @@ -120,7 +120,7 @@ public final class SinglePositionDataPoints implements DataPoints { } /** - * Verifies that the given index is the only one this sequence has. + * Verifies that the given index is the only one this {@code DataPoints} has. */ private static void ensureValid(final int index) { if (index != 0) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/ParametricCurveSolid.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/ParametricCurveSolid.java index f55a8cbf4f..15aa333019 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/ParametricCurveSolid.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/ParametricCurveSolid.java @@ -146,7 +146,7 @@ public sealed interface ParametricCurveSolid extends Solid * * <p>Constraints:</p> * <ul> - * <li>The sequence holds {@link #getRows()} × {@link #getColumns()} × {@link #getFiles()} + * <li>The {@code DataPoints} holds {@link #getRows()} × {@link #getColumns()} × {@link #getFiles()} * positions, stored in row-major order.</li> * </ul> * diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/polyhedron/AbstractPolyhedron.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/polyhedron/AbstractPolyhedron.java index bacce0187a..39fde90bd4 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/polyhedron/AbstractPolyhedron.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/polyhedron/AbstractPolyhedron.java @@ -207,7 +207,7 @@ public abstract sealed class AbstractPolyhedron extends AbstractGeometry impleme /** * Unsupported: the vertices of these shapes are a constant shared by every instance, not * state of one of them. Returning them would either let one instance move the vertices of - * all the others, or hand out a sequence which refuses every write, so neither answers the + * all the others, or hand out a {@code DataPoints} which refuses every write, so neither answers the * contract of {@link org.apache.sis.geometries.Geometry#getDataPoints()}. * * @return never returns. diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java index 766eea1e45..766182019c 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java @@ -68,11 +68,11 @@ public final class Capsule extends AbstractGeometry{ /** * Creates a capsule whose capping spheres are centered on the two positions of the given - * sequence. The sequence is taken as-is, so the caller may give the capsule the attributes - * carried by that sequence. + * {@code DataPoints}. The {@code DataPoints} is taken as-is, so the caller may give the + * capsule the attributes carried by that {@code DataPoints}. * * @param points the centers of the bottom and top spheres, in that order. - * @throws IllegalArgumentException if the given sequence does not hold exactly two positions. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly two positions. */ public Capsule(DataPoints points) { if (points.size() != 2) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java index fbd53f28c8..f7355d8c04 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java @@ -73,12 +73,12 @@ public final class Cylinder extends AbstractGeometry{ } /** - * Creates a cylinder along the axis joining the two positions of the given sequence. - * The sequence is taken as-is, so the caller may give the cylinder the attributes - * carried by that sequence. + * Creates a cylinder along the axis joining the two positions of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the cylinder the attributes + * carried by that {@code DataPoints}. * * @param points the centers of the bottom and top circles, in that order. - * @throws IllegalArgumentException if the given sequence does not hold exactly two positions. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly two positions. */ public Cylinder(DataPoints points) { if (points.size() != 2) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Ellipsoid.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Ellipsoid.java index 4a87f4321e..c7b6f91670 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Ellipsoid.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Ellipsoid.java @@ -116,11 +116,12 @@ public final class Ellipsoid extends AbstractGeometry implements ParametricCurve } /** - * Creates an ellipsoid centered on the single position of the given sequence. The sequence is - * taken as-is, so the caller may give the ellipsoid the attributes carried by that sequence. + * Creates an ellipsoid centered on the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the ellipsoid the attributes + * carried by that {@code DataPoints}. * * @param points the center of the ellipsoid. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Ellipsoid(DataPoints points) { this.points = checkedPoints(points); @@ -129,12 +130,12 @@ public final class Ellipsoid extends AbstractGeometry implements ParametricCurve /** * Creates an ellipsoid of the given semi-axes centered on the single position of the given - * sequence. + * {@code DataPoints}. * * @param points the center of the ellipsoid. * @param semiAxes length of the semi-axis along each axis, one value per dimension. * Each of them must be positive. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position, + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position, * or if the number of semi-axes is not the number of dimensions. */ public Ellipsoid(DataPoints points, double... semiAxes) { @@ -143,7 +144,7 @@ public final class Ellipsoid extends AbstractGeometry implements ParametricCurve } /** - * Returns the given sequence if it holds the single position an ellipsoid is centered on. + * Returns the given {@code DataPoints} if it holds the single position an ellipsoid is centered on. */ private static DataPoints checkedPoints(final DataPoints points) { if (points.size() != 1) { @@ -360,7 +361,7 @@ public final class Ellipsoid extends AbstractGeometry implements ParametricCurve } /** - * Returns the center of this ellipsoid, as a sequence of one position. An ellipsoid is defined + * Returns the center of this ellipsoid, as a {@code DataPoints} of one position. An ellipsoid is defined * by that position and by its semi-axes, so the center is the only position it holds. */ @Override diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/ParametricCurveSurface.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/ParametricCurveSurface.java index 035db3fd45..5f7489dd08 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/ParametricCurveSurface.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/ParametricCurveSurface.java @@ -126,7 +126,7 @@ public sealed interface ParametricCurveSurface extends Surface, ReferenceSystem * * <p>Constraints:</p> * <ul> - * <li>The sequence holds {@link #getRows()} × {@link #getColumns()} positions, + * <li>The {@code DataPoints} holds {@link #getRows()} × {@link #getColumns()} positions, * stored in row-major order.</li> * </ul> * diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Sphere.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Sphere.java index 6049fd9bf3..3497d9f022 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Sphere.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Sphere.java @@ -112,11 +112,12 @@ public final class Sphere extends AbstractGeometry implements ParametricCurveSur } /** - * Creates a sphere centered on the single position of the given sequence. The sequence is - * taken as-is, so the caller may give the sphere the attributes carried by that sequence. + * Creates a sphere centered on the single position of the given {@code DataPoints}. + * The {@code DataPoints} is taken as-is, so the caller may give the sphere the attributes + * carried by that {@code DataPoints}. * * @param points the center of the sphere. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Sphere(DataPoints points) { if (points.size() != 1) { @@ -126,11 +127,11 @@ public final class Sphere extends AbstractGeometry implements ParametricCurveSur } /** - * Creates a sphere of the given radius centered on the single position of the given sequence. + * Creates a sphere of the given radius centered on the single position of the given {@code DataPoints}. * * @param points the center of the sphere. * @param radius new sphere radius, must be positive. - * @throws IllegalArgumentException if the given sequence does not hold exactly one position. + * @throws IllegalArgumentException if the given {@code DataPoints} does not hold exactly one position. */ public Sphere(DataPoints points, double radius) { this(points); @@ -288,7 +289,7 @@ public final class Sphere extends AbstractGeometry implements ParametricCurveSur } /** - * Returns the center of this sphere, as a sequence of one position. A sphere is defined by + * Returns the center of this sphere, as a {@code DataPoints} of one position. A sphere is defined by * that position and by its radius, so the center is the only position it holds. */ @Override diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/AbstractGMLWriter.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/AbstractGMLWriter.java index 10a5e41ed0..8dbb99f031 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/AbstractGMLWriter.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/AbstractGMLWriter.java @@ -254,7 +254,7 @@ abstract class AbstractGMLWriter implements GMLGeometryWriter { } /** - * Appends every tuple of the given sequence to the given buffer, all separated by spaces. + * Appends every tuple of the given {@code DataPoints} to the given buffer, all separated by spaces. */ protected static void appendSequence(final StringBuilder sb, final DataPoints points) { for (int i = 0, n = points.size(); i < n; i++) { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GML3Writer.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GML3Writer.java index 2c93ce32ee..18a1d315ce 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GML3Writer.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GML3Writer.java @@ -261,7 +261,7 @@ public final class GML3Writer extends AbstractGMLWriter { /** * Writes a {@code <gml:posList>} element containing the given coordinate tuples, with an - * explicit {@code srsDimension} attribute taken from the width of the sequence itself. + * explicit {@code srsDimension} attribute taken from the width of the {@code DataPoints} itself. */ private void writePosList(final DataPoints points) throws XMLStreamException { writer.writeStartElement(GML3Tags.POS_LIST); diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GMLCRS.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GMLCRS.java index 42ce2fff54..21746df5ba 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GMLCRS.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/GMLCRS.java @@ -171,7 +171,7 @@ final class GMLCRS { /** * Returns the local name of the GML element the given geometry was read from, or {@code null} * if unknown. Never throws: point views returned by - * {@link org.apache.sis.geometries.PointSequence#getPoint(int)} implement + * {@link org.apache.sis.geometries.DataPoints#getPoint(int)} implement * {@link org.apache.sis.geometries.Point} directly rather than through * {@code AbstractGeometry}, so their {@code userProperties()} is null. */ diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/PositionListBuilder.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/PositionListBuilder.java index e6dacaec37..9d1dcb3ebe 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/PositionListBuilder.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/gml/PositionListBuilder.java @@ -156,15 +156,15 @@ final class PositionListBuilder { } /** - * Builds the point sequence for the accumulated tuples. + * Builds the {@code DataPoints} for the accumulated tuples. * * <p>The coordinate reference system of the result is derived from {@code inScope} and from the * accumulated tuple width by {@link GMLCRS#forDimension GMLCRS.forDimension(…)}: the two must - * agree, because an Apache SIS point sequence reports one dimension only.</p> + * agree, because a {@code DataPoints} reports one dimension only.</p> * * @param inScope the CRS resolved for the enclosing GML element, or {@code null} if the * document declared none at any enclosing level. - * @return the point sequence, possibly empty. + * @return the {@code DataPoints}, possibly empty. * @throws DataStoreContentException if the accumulated tuple width contradicts {@code inScope}. * @throws DataStoreReferencingException if the CRS needed to reconcile the two cannot be created. */ @@ -172,7 +172,7 @@ final class PositionListBuilder { throws DataStoreContentException, DataStoreReferencingException { /* - * An empty sequence still needs a CRS, since `ArraySequence` rejects a null one. Two + * An empty `DataPoints` still needs a CRS, since `ArrayDataPoints` rejects a null one. Two * dimensions is the GML default, and is what `srsDimension` defaults to as well. */ if (count == 0) { diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java index 47e1754cee..f1f2a0f1a9 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java @@ -107,7 +107,7 @@ public class DataPointsTest { } /** - * Creates a sequence of the given positions, holding the given values in three attributes + * Creates a {@code DataPoints} of the given positions, holding the given values in three attributes * interpolated in the three possible ways. */ private static DataPoints createPoints(final double[] positions, final double[] values) { diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryTest.java index 0c68c094c5..8ec04d14cc 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryTest.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryTest.java @@ -16,7 +16,13 @@ */ package org.apache.sis.geometries; +import java.util.List; +import java.util.Map; import org.opengis.referencing.crs.CoordinateReferenceSystem; +import org.apache.sis.maths.DataType; +import org.apache.sis.maths.ReadOnly; +import org.apache.sis.maths.SampleSystem; +import org.apache.sis.maths.Vector; import org.apache.sis.referencing.CommonCRS; // Test dependencies @@ -50,6 +56,37 @@ public abstract class GeometryTest { protected GeometryTest() { } + /** + * Returns a view of the given {@code DataPoints} declaring the given attribute interpolations. + * Attributes absent from the map keep the interpolation declared by the {@code DataPoints}. + * + * @param points the {@code DataPoints} to wrap. + * @param methods interpolation of the attributes, by attribute name. + * @return a view of the {@code DataPoints} declaring the given interpolations. + */ + protected static DataPoints withInterpolations(final DataPoints points, final Map<String,AttributeInterpolation> methods) { + final DataPointsType base = points.getType(); + final DataPointsType type = new DataPointsType() { + @Override public List<String> getAttributeNames() {return base.getAttributeNames();} + @Override public SampleSystem getAttributeSystem(String name) {return base.getAttributeSystem(name);} + @Override public DataType getAttributeType(String name) {return base.getAttributeType(name);} + @Override public AttributeInterpolation getAttributeInterpolation(String name) { + return methods.getOrDefault(name, base.getAttributeInterpolation(name)); + } + }; + return new DataPoints() { + @Override public CoordinateReferenceSystem getCoordinateReferenceSystem() {return points.getCoordinateReferenceSystem();} + @Override public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs) {points.setCoordinateReferenceSystem(crs);} + @Override public DataPointsType getType() {return type;} + @Override public int size() {return points.size();} + @Override public Point getPoint(int index) {return points.getPoint(index);} + @Override public Vector<?> getPosition(int index) {return points.getPosition(index);} + @Override public void setPosition(int index, ReadOnly.Vector<?> value) {points.setPosition(index, value);} + @Override public Vector<?> getAttribute(int index, String name) {return points.getAttribute(index, name);} + @Override public void setAttribute(int index, String name, ReadOnly.Vector<?> value) {points.setAttribute(index, name, value);} + }; + } + /** * Asserts that the given position is the expected one. * diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2ReaderTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2ReaderTest.java index 57a6d76671..68d6297915 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2ReaderTest.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2ReaderTest.java @@ -86,7 +86,7 @@ public final class GML2ReaderTest { } /** - * Creates a point sequence in the {@link #wgs84} CRS from a flat list of ordinates. + * Creates a {@code DataPoints} in the {@link #wgs84} CRS from a flat list of ordinates. */ private DataPoints sequence(final double... ordinates) { return GeometryFactory.DEFAULT.createDataPoints(NDArrays.of(SampleSystem.of(wgs84), ordinates)); diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2WriterTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2WriterTest.java index 06d136a968..9761cecb9b 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2WriterTest.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML2WriterTest.java @@ -66,7 +66,7 @@ public final class GML2WriterTest extends TestCase { } /** - * Creates a point sequence in the {@link #wgs84} CRS from a flat list of ordinates. + * Creates a {@code DataPoints} in the {@link #wgs84} CRS from a flat list of ordinates. */ private DataPoints sequence(final double... ordinates) { return GeometryFactory.DEFAULT.createDataPoints(NDArrays.of(SampleSystem.of(wgs84), ordinates)); diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3ReaderTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3ReaderTest.java index d253c845cf..7c14acf633 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3ReaderTest.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3ReaderTest.java @@ -99,7 +99,7 @@ public final class GML3ReaderTest { } /** - * Creates a point sequence in the {@link #wgs84} CRS from a flat list of ordinates. + * Creates a {@code DataPoints} in the {@link #wgs84} CRS from a flat list of ordinates. */ private DataPoints sequence(final double... ordinates) { return GeometryFactory.DEFAULT.createDataPoints(NDArrays.of(SampleSystem.of(wgs84), ordinates)); diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3WriterTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3WriterTest.java index 6194d4995d..7c62dcb499 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3WriterTest.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GML3WriterTest.java @@ -71,7 +71,7 @@ public final class GML3WriterTest extends TestCase { } /** - * Creates a point sequence in the {@link #wgs84} CRS from a flat list of ordinates. + * Creates a {@code DataPoints} in the {@link #wgs84} CRS from a flat list of ordinates. */ private DataPoints sequence(final double... ordinates) { return GeometryFactory.DEFAULT.createDataPoints(NDArrays.of(SampleSystem.of(wgs84), ordinates)); diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GeometryAssert.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GeometryAssert.java index 5e710f6599..80a8dc4ee1 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GeometryAssert.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/GeometryAssert.java @@ -105,7 +105,7 @@ final class GeometryAssert { } /** - * Asserts that the two given point sequences have the same coordinates, within the given + * Asserts that the two given {@code DataPoints} have the same coordinates, within the given * tolerance. Delegates to {@code Array.equals(Array, double)}, which also compares the tuple * width and the sample system, and therefore the coordinate reference system. */ diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/JAXBGeometryAdapterTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/JAXBGeometryAdapterTest.java index 822dedaa0f..d38bdac8d0 100644 --- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/JAXBGeometryAdapterTest.java +++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/gml/JAXBGeometryAdapterTest.java @@ -122,7 +122,7 @@ public final class JAXBGeometryAdapterTest { } /** - * Creates a point sequence in the {@link #wgs84} CRS from a flat list of ordinates. + * Creates a {@code DataPoints} in the {@link #wgs84} CRS from a flat list of ordinates. */ private DataPoints sequence(final double... ordinates) { return GeometryFactory.DEFAULT.createDataPoints(NDArrays.of(SampleSystem.of(wgs84), ordinates));
