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 cb2de8f34481f570cc29f68356f5ed0eae690fe2 Author: jsorel <[email protected]> AuthorDate: Thu Sep 10 14:39:44 2026 +0200 refactor(Geometry): remove unecessary public keyword on interfaces --- .../org/apache/sis/geometries/AttributesType.java | 20 +++++----- .../main/org/apache/sis/geometries/Empty.java | 2 +- .../main/org/apache/sis/geometries/Geometry.java | 46 +++++++++++----------- .../apache/sis/geometries/GeometryCollection.java | 8 ++-- .../main/org/apache/sis/geometries/Point.java | 20 +++++----- .../main/org/apache/sis/geometries/Prism.java | 6 +-- .../main/org/apache/sis/geometries/Solid.java | 2 +- .../apache/sis/geometries/curve/ArcByBulge.java | 6 +-- .../sis/geometries/curve/ArcByCenterPoint.java | 8 ++-- .../sis/geometries/curve/CircularString.java | 7 ++-- .../apache/sis/geometries/curve/CompoundCurve.java | 4 +- .../org/apache/sis/geometries/curve/Geodesic.java | 10 ++--- .../apache/sis/geometries/curve/LineString.java | 12 +++--- .../apache/sis/geometries/curve/LinearRing.java | 4 +- .../apache/sis/geometries/curve/MultiCurve.java | 4 +- .../sis/geometries/curve/MultiLineString.java | 4 +- .../org/apache/sis/geometries/curve/NurbCurve.java | 2 +- .../org/apache/sis/geometries/curve/Rhumb.java | 10 ++--- .../apache/sis/geometries/point/MultiPoint.java | 4 +- .../sis/geometries/solid/MultiPolyhedron.java | 4 +- .../apache/sis/geometries/solid/Polyhedron.java | 6 +-- .../sis/geometries/surface/CurvePolygon.java | 6 +-- .../sis/geometries/surface/MultiPolygon.java | 4 +- .../sis/geometries/surface/MultiSurface.java | 4 +- .../apache/sis/geometries/surface/NurbSurface.java | 2 +- .../org/apache/sis/geometries/surface/Polygon.java | 6 +-- .../sis/geometries/surface/PolyhedralSurface.java | 6 +-- .../apache/sis/geometries/surface/PreparedTIN.java | 4 +- .../org/apache/sis/geometries/surface/TIN.java | 4 +- .../apache/sis/geometries/surface/Triangle.java | 4 +- 30 files changed, 114 insertions(+), 115 deletions(-) diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/AttributesType.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/AttributesType.java index 2f143201c8..c5939bc4b9 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/AttributesType.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/AttributesType.java @@ -37,22 +37,22 @@ import org.apache.sis.maths.SampleSystem; */ public interface AttributesType { - public static final String ATT_POSITION = "POSITION"; - public static final String ATT_NORMAL = "NORMAL"; - public static final String ATT_TANGENT = "TANGENT"; - public static final String ATT_TEXCOORD_0 = "TEXCOORD_0"; + static final String ATT_POSITION = "POSITION"; + static final String ATT_NORMAL = "NORMAL"; + static final String ATT_TANGENT = "TANGENT"; + static final String ATT_TEXCOORD_0 = "TEXCOORD_0"; //indexed attributes - public static final String ATT_TEXCOORD = "TEXCOORD"; - public static final String ATT_COLOR = "COLOR"; - public static final String ATT_JOINTS = "JOINTS"; - public static final String ATT_WEIGHTS = "WEIGHTS"; + static final String ATT_TEXCOORD = "TEXCOORD"; + static final String ATT_COLOR = "COLOR"; + static final String ATT_JOINTS = "JOINTS"; + static final String ATT_WEIGHTS = "WEIGHTS"; /** * Attribute from OGC 3D Tiles. * To link primitives to features/batch tables. */ - public static final String ATT_BATCH_ID = "_BATCHID"; + static final String ATT_BATCH_ID = "_BATCHID"; /** * Returns attribute system for given name. @@ -99,7 +99,7 @@ public interface AttributesType { /** * Empty attributes type. */ - public static AttributesType EMPTY = new AttributesType() { + static AttributesType EMPTY = new AttributesType() { @Override public SampleSystem getAttributeSystem(String name) { return null; 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 fff7eafb37..eba8423068 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 @@ -55,7 +55,7 @@ public sealed interface Empty extends Geometry /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "EMPTY"; + static final String TYPE = "EMPTY"; /** * Returns {@code true} since this geometry is the empty set. 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 57a6d8422d..98ecb67f16 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 @@ -568,7 +568,7 @@ public sealed interface Geometry * * @see GeometryProcessor#buffer(org.apache.sis.geometries.Geometry, double) */ - public default Geometry buffer(double distance) throws OperationException { + default Geometry buffer(double distance) throws OperationException { return new GeometryProcessor().buffer(this, distance); } @@ -595,7 +595,7 @@ public sealed interface Geometry */ @UML(identifier="buffer", specification=ISO_19107) //@UML(identifier="3Dbuffer", specification=ISO_19107) - public default Geometry buffer(Length radius) throws OperationException { + default Geometry buffer(Length radius) throws OperationException { return new GeometryProcessor().buffer(this, radius); } @@ -618,7 +618,7 @@ public sealed interface Geometry */ @UML(identifier="convexHull", specification=ISO_19107) //@UML(identifier="3DconvexHull", specification=ISO_19107) - public default Geometry convexHull() throws OperationException { + default Geometry convexHull() throws OperationException { return new GeometryProcessor().convexHull(this); } @@ -641,7 +641,7 @@ public sealed interface Geometry */ @UML(identifier="difference", specification=ISO_19107) //@UML(identifier="3Ddifference", specification=ISO_19107) - public default Geometry difference(Geometry other) throws OperationException { + default Geometry difference(Geometry other) throws OperationException { return new GeometryProcessor().difference(this, other); } @@ -665,7 +665,7 @@ public sealed interface Geometry */ @UML(identifier="distance", specification=ISO_19107) //@UML(identifier="3Ddistance", specification=ISO_19107) - public default Length distance(Geometry other) throws OperationException { + default Length distance(Geometry other) throws OperationException { return new GeometryProcessor().distance(this, other); } @@ -688,7 +688,7 @@ public sealed interface Geometry */ @UML(identifier="intersection", specification=ISO_19107) //@UML(identifier="3Dintersection", specification=ISO_19107) - public default Geometry intersection(Geometry other) throws OperationException { + default Geometry intersection(Geometry other) throws OperationException { return new GeometryProcessor().intersection(this, other); } @@ -712,7 +712,7 @@ public sealed interface Geometry */ @UML(identifier="symDifference", specification=ISO_19107) //@UML(identifier="3DsymDifference", specification=ISO_19107) - public default Geometry symDifference(Geometry other) throws OperationException { + default Geometry symDifference(Geometry other) throws OperationException { return new GeometryProcessor().symDifference(this, other); } @@ -735,7 +735,7 @@ public sealed interface Geometry */ @UML(identifier="union", specification=ISO_19107) //@UML(identifier="3Dunion", specification=ISO_19107) - public default Geometry union(Geometry other) throws OperationException { + default Geometry union(Geometry other) throws OperationException { return new GeometryProcessor().union(this, other); } @@ -760,7 +760,7 @@ public sealed interface Geometry * @see ISO 19107:2019 - 6.4.4.28 */ @UML(identifier="transform", specification=ISO_19107) - public default Geometry transform(CoordinateReferenceSystem crs) { + default Geometry transform(CoordinateReferenceSystem crs) { return new GeometryProcessor().transform(this, crs, null); } @@ -778,7 +778,7 @@ public sealed interface Geometry */ @UML(identifier="contains", specification=ISO_19107) //@UML(identifier="3Dcontains", specification=ISO_19107) - public default boolean contains(DirectPosition element) throws OperationException { + default boolean contains(DirectPosition element) throws OperationException { return new GeometryProcessor().contains(this, element); } @@ -800,7 +800,7 @@ public sealed interface Geometry * @see ISO 19107:2019 - 6.4.4.30, 6.4.8.8, 10.8.6.3.2 */ @UML(identifier="contains", specification=ISO_19107) - public default boolean contains(Geometry other) throws OperationException { + default boolean contains(Geometry other) throws OperationException { return new GeometryProcessor().contains(this, other); } @@ -823,7 +823,7 @@ public sealed interface Geometry */ @UML(identifier="crosses", specification=ISO_19107) //@UML(identifier="3Dcrosses", specification=ISO_19107) - public default boolean crosses(Geometry other) throws OperationException { + default boolean crosses(Geometry other) throws OperationException { return new GeometryProcessor().crosses(this, other); } @@ -845,7 +845,7 @@ public sealed interface Geometry */ @UML(identifier="disjoint", specification=ISO_19107) //@UML(identifier="3Ddisjoint", specification=ISO_19107) - public default boolean disjoint(Geometry other) throws OperationException { + default boolean disjoint(Geometry other) throws OperationException { return new GeometryProcessor().disjoint(this, other); } @@ -871,7 +871,7 @@ public sealed interface Geometry */ @UML(identifier="equals", specification=ISO_19107) //@UML(identifier="3Dequals", specification=ISO_19107) - public default boolean equal(Geometry other) throws OperationException { + default boolean equal(Geometry other) throws OperationException { return new GeometryProcessor().equal(this, other); } @@ -893,7 +893,7 @@ public sealed interface Geometry */ @UML(identifier="intersects", specification=ISO_19107) //@UML(identifier="3Dintersects", specification=ISO_19107) - public default boolean intersects(Geometry other) throws OperationException { + default boolean intersects(Geometry other) throws OperationException { return new GeometryProcessor().intersects(this, other); } @@ -909,7 +909,7 @@ public sealed interface Geometry * * @see GeometryProcessor#locateAlong(org.apache.sis.geometries.Geometry, double) */ - public default Geometry locateAlong(double mValue) throws OperationException { + default Geometry locateAlong(double mValue) throws OperationException { return new GeometryProcessor().locateAlong(this, mValue); } @@ -926,7 +926,7 @@ public sealed interface Geometry * * @see GeometryProcessor#contains(org.apache.sis.geometries.Geometry, double, double) */ - public default Geometry locateBetween(double mStart, double mEnd) throws OperationException { + default Geometry locateBetween(double mStart, double mEnd) throws OperationException { return new GeometryProcessor().locateBetween(this, mStart, mEnd); } @@ -949,7 +949,7 @@ public sealed interface Geometry */ @UML(identifier="overlaps", specification=ISO_19107) //@UML(identifier="3Doverlaps", specification=ISO_19107) - public default boolean overlaps(Geometry other) throws OperationException { + default boolean overlaps(Geometry other) throws OperationException { return new GeometryProcessor().overlaps(this, other); } @@ -967,7 +967,7 @@ public sealed interface Geometry * * @see GeometryProcessor#relate(org.apache.sis.geometries.Geometry, org.apache.sis.geometries.Geometry, int) */ - public default boolean relate(Geometry other, int matrix) throws OperationException { + default boolean relate(Geometry other, int matrix) throws OperationException { return new GeometryProcessor().relate(this, other, matrix); } @@ -997,7 +997,7 @@ public sealed interface Geometry */ @UML(identifier="relate", specification=ISO_19107) //@UML(identifier="3Drelate", specification=ISO_19107) - public default boolean relate(Geometry other, String matrix) throws OperationException { + default boolean relate(Geometry other, String matrix) throws OperationException { return new GeometryProcessor().relate(this, other, matrix); } @@ -1020,7 +1020,7 @@ public sealed interface Geometry */ @UML(identifier="touches", specification=ISO_19107) //@UML(identifier="3Dtouches", specification=ISO_19107) - public default boolean touches(Geometry other) throws OperationException { + default boolean touches(Geometry other) throws OperationException { return new GeometryProcessor().touches(this, other); } @@ -1043,7 +1043,7 @@ public sealed interface Geometry */ @UML(identifier="within", specification=ISO_19107) //@UML(identifier="3Dwithin", specification=ISO_19107) - public default boolean within(Geometry other) throws OperationException { + default boolean within(Geometry other) throws OperationException { return new GeometryProcessor().within(this, other); } @@ -1065,7 +1065,7 @@ public sealed interface Geometry */ @UML(identifier="withinDistance", specification=ISO_19107) //@UML(identifier="3DwithinDistance", specification=ISO_19107) - public default boolean withinDistance(Geometry other, Length distance) throws OperationException { + default boolean withinDistance(Geometry other, Length distance) throws OperationException { return new GeometryProcessor().withinDistance(this, other, distance); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryCollection.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryCollection.java index 571e02ab12..9876ede51d 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryCollection.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/GeometryCollection.java @@ -70,7 +70,7 @@ public sealed interface GeometryCollection<T extends Geometry> extends Geometry /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "GEOMETRYCOLLECTION"; + static final String TYPE = "GEOMETRYCOLLECTION"; /** * Returns {@value #TYPE}. @@ -78,7 +78,7 @@ public sealed interface GeometryCollection<T extends Geometry> extends Geometry * @see ISO 19107:2019 - 6.4.4.23 */ @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -147,7 +147,7 @@ public sealed interface GeometryCollection<T extends Geometry> extends Geometry T getGeometryN(int n); @Override - public default Envelope getEnvelope() { + default Envelope getEnvelope() { GeneralEnvelope e = null; for (int i = 0, n = getNumGeometries(); i < n; i++) { T sn = getGeometryN(i); @@ -168,7 +168,7 @@ public sealed interface GeometryCollection<T extends Geometry> extends Geometry } @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { if (getNumGeometries() == 0) return null; return getGeometryN(0).getAttributesType(); } 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 961a446280..81f077e7b2 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 @@ -68,7 +68,7 @@ public sealed interface Point extends Primitive /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "POINT"; + static final String TYPE = "POINT"; /** * Location of this point in its reference system. @@ -78,7 +78,7 @@ public sealed interface Point extends Primitive * @see ISO 19107:2019 - 6.4.13.2 */ @UML(identifier="position", specification=ISO_19107) - Tuple getPosition(); + Tuple<?> getPosition(); /** * Returns tuple for given name. @@ -86,7 +86,7 @@ public sealed interface Point extends Primitive * @param name seached attribute name * @return attribute or null. */ - Tuple getAttribute(String name); + Tuple<?> getAttribute(String name); /** * Sets the value of the attribute of the given name. @@ -94,7 +94,7 @@ public sealed interface Point extends Primitive * @param name name of the attribute to set. * @param tuple new attribute value. */ - void setAttribute(String name, Tuple tuple); + void setAttribute(String name, Tuple<?> tuple); /** * View this point as a single point sequence @@ -131,7 +131,7 @@ public sealed interface Point extends Primitive } @Override - public void setPosition(int index, Tuple value) { + public void setPosition(int index, Tuple<?> value) { if (index != 0) throw new IndexOutOfBoundsException(); Point.this.getPosition().set(value); } @@ -143,7 +143,7 @@ public sealed interface Point extends Primitive } @Override - public void setAttribute(int index, String name, Tuple value) { + public void setAttribute(int index, String name, Tuple<?> value) { if (index != 0) throw new IndexOutOfBoundsException(); Point.this.setAttribute(name, value); } @@ -156,13 +156,13 @@ public sealed interface Point extends Primitive } @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @Override default Envelope getEnvelope() { - final Tuple first = getPosition(); + final Tuple<?> first = getPosition(); final BBox env = new BBox(first, first); env.setCoordinateReferenceSystem(getCoordinateReferenceSystem()); return env; @@ -187,7 +187,7 @@ public sealed interface Point extends Primitive * @see ISO 19107:2019 - 6.4.13.4 */ @UML(identifier="vectorToPoint", specification=ISO_19107) - default Vector vectorToPoint(DirectPosition toPoint) { + default Vector<?> vectorToPoint(DirectPosition toPoint) { //TODO throw new UnsupportedOperationException(); } @@ -218,7 +218,7 @@ public sealed interface Point extends Primitive * @see ISO 19107:2019 - 6.4.13.6 */ @UML(identifier="pointAtDistance", specification=ISO_19107) - default DirectPosition pointAtDistance(Vector bearing){ + default DirectPosition pointAtDistance(Vector<?> bearing){ //TODO throw new UnsupportedOperationException(); } 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 a8251953fc..3ed022d992 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 @@ -28,15 +28,15 @@ import org.apache.sis.measure.NumberRange; */ public non-sealed interface Prism extends Geometry { - public static final String TYPE = "PRISM"; + static final String TYPE = "PRISM"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { return getBase().getAttributesType(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Solid.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Solid.java index e922560591..8b200d8fbd 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Solid.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Solid.java @@ -67,7 +67,7 @@ public sealed interface Solid extends Primitive * @see ISO 19107:2019 - 6.4.4.22 */ @Override - public default int getTopologicDimension() { + default int getTopologicDimension() { return 3; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByBulge.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByBulge.java index 54402c1391..7ebc030107 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByBulge.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByBulge.java @@ -44,10 +44,10 @@ public sealed interface ArcByBulge extends Curve permits DefaultArcByBulge { - public static final String TYPE = "ARCBYBULGE"; + static final String TYPE = "ARCBYBULGE"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -80,7 +80,7 @@ public sealed interface ArcByBulge extends Curve * @return null, a ArcByBulge has no control points */ @Override - public default Array getControlPoints() { + default Array getControlPoints() { return null; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByCenterPoint.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByCenterPoint.java index e6711cb7c4..901daa1db9 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByCenterPoint.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/ArcByCenterPoint.java @@ -47,10 +47,10 @@ public sealed interface ArcByCenterPoint extends Curve permits DefaultArcByCenterPoint { - public static final String TYPE = "ARCBYCENTERPOINT"; + static final String TYPE = "ARCBYCENTERPOINT"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -106,7 +106,7 @@ public sealed interface ArcByCenterPoint extends Curve } @Override - public default DataPoints getDataPoints() { + default DataPoints getDataPoints() { throw new UnsupportedOperationException("Not supported yet"); } @@ -114,7 +114,7 @@ public sealed interface ArcByCenterPoint extends Curve * @return null, a ArcByCenterPoint has no control points */ @Override - public default Array getControlPoints() { + default Array getControlPoints() { return null; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CircularString.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CircularString.java index 10b4954056..d5dd382aa5 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CircularString.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CircularString.java @@ -20,7 +20,6 @@ import org.apache.sis.geometries.AttributesType; import org.apache.sis.geometries.Curve; import org.apache.sis.geometries.CurveInterpolation; import org.apache.sis.geometries.DataPoints; -import org.apache.sis.geometries.Point; import org.apache.sis.geometries.internal.shared.DefaultCircularString; import org.apache.sis.maths.Array; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -40,10 +39,10 @@ public sealed interface CircularString extends Curve permits DefaultCircularString { - public static final String TYPE = "CIRCULARSTRING"; + static final String TYPE = "CIRCULARSTRING"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -76,7 +75,7 @@ public sealed interface CircularString extends Curve * @return null, a CircularString has no control points */ @Override - public default Array getControlPoints() { + default Array getControlPoints() { return null; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CompoundCurve.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CompoundCurve.java index 3d0dbe0bae..aae8df5e70 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CompoundCurve.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/CompoundCurve.java @@ -38,10 +38,10 @@ public sealed interface CompoundCurve extends Curve permits DefaultCompoundCurve { - public static final String TYPE = "COMPOUNDCURVE"; + static final String TYPE = "COMPOUNDCURVE"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Geodesic.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Geodesic.java index 966844baad..42575abe8c 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Geodesic.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Geodesic.java @@ -59,7 +59,7 @@ public sealed interface Geodesic extends Curve /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "GEODESIC"; + static final String TYPE = "GEODESIC"; /** * Returns {@value #TYPE}. @@ -67,7 +67,7 @@ public sealed interface Geodesic extends Curve * @see ISO 19107:2019 - 6.4.4.23 */ @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -80,7 +80,7 @@ public sealed interface Geodesic extends Curve */ @UML(identifier="interpolation", specification=ISO_19107) @Override - public default CurveInterpolation getInterpolation() { + default CurveInterpolation getInterpolation() { return CurveInterpolation.GEODESIC; } @@ -110,7 +110,7 @@ public sealed interface Geodesic extends Curve * @see ISO 19107:2019 - 6.4.18.2 */ @Override - public default Array getControlPoints() { + default Array getControlPoints() { return null; } @@ -125,7 +125,7 @@ public sealed interface Geodesic extends Curve } @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { return getDataPoints().getAttributesType(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LineString.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LineString.java index 32c2b5d216..02388c94bd 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LineString.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LineString.java @@ -66,7 +66,7 @@ public sealed interface LineString extends Curve /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "LINESTRING"; + static final String TYPE = "LINESTRING"; /** * Returns {@value #TYPE}. @@ -74,7 +74,7 @@ public sealed interface LineString extends Curve * @see ISO 19107:2019 - 6.4.4.23 */ @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -85,7 +85,7 @@ public sealed interface LineString extends Curve */ @UML(identifier="interpolation", specification=ISO_19107) @Override - public default CurveInterpolation getInterpolation() { + default CurveInterpolation getInterpolation() { return CurveInterpolation.LINEAR; } @@ -95,7 +95,7 @@ public sealed interface LineString extends Curve * @see ISO 19107:2019 - 6.4.18.17 */ @Override - public default LineString asLine(Length spacing, Length offset) { + default LineString asLine(Length spacing, Length offset) { return this; } @@ -125,7 +125,7 @@ public sealed interface LineString extends Curve * @see ISO 19107:2019 - 6.4.18.2 */ @Override - public default Array getControlPoints() { + default Array getControlPoints() { return null; } @@ -140,7 +140,7 @@ public sealed interface LineString extends Curve } @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { return getDataPoints().getAttributesType(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LinearRing.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LinearRing.java index 1d5b9e0f12..7677dd0446 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LinearRing.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/LinearRing.java @@ -31,10 +31,10 @@ public sealed interface LinearRing extends LineString permits DefaultLinearRing { - public static final String TYPE = "LINEARRING"; + static final String TYPE = "LINEARRING"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiCurve.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiCurve.java index bdbd19b9cd..39883fc653 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiCurve.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiCurve.java @@ -50,10 +50,10 @@ public sealed interface MultiCurve<T extends Curve> extends GeometryCollection<T DefaultMultiCurve { - public static final String TYPE = "MULTICURVE"; + static final String TYPE = "MULTICURVE"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiLineString.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiLineString.java index 7910a58539..de80212aa2 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiLineString.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/MultiLineString.java @@ -33,10 +33,10 @@ public sealed interface MultiLineString extends MultiCurve<LineString> MeshPrimitive.Lines { - public static final String TYPE = "MULTILINESTRING"; + static final String TYPE = "MULTILINESTRING"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/NurbCurve.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/NurbCurve.java index a2853cbcbc..a0519d288f 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/NurbCurve.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/NurbCurve.java @@ -54,7 +54,7 @@ public sealed interface NurbCurve extends BSplineCurve /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "NURBS"; + static final String TYPE = "NURBS"; /** * Returns {@value #TYPE}. diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Rhumb.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Rhumb.java index 5cb3428e77..958b55d612 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Rhumb.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/curve/Rhumb.java @@ -59,7 +59,7 @@ public sealed interface Rhumb extends Curve /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "RHUMB"; + static final String TYPE = "RHUMB"; /** * Returns {@value #TYPE}. @@ -67,7 +67,7 @@ public sealed interface Rhumb extends Curve * @see ISO 19107:2019 - 6.4.4.23 */ @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -78,7 +78,7 @@ public sealed interface Rhumb extends Curve */ @UML(identifier="interpolation", specification=ISO_19107) @Override - public default CurveInterpolation getInterpolation() { + default CurveInterpolation getInterpolation() { return CurveInterpolation.RHUMB; } @@ -120,7 +120,7 @@ public sealed interface Rhumb extends Curve * @see ISO 19107:2019 - 6.4.18.2 */ @Override - public default Array getControlPoints() { + default Array getControlPoints() { return null; } @@ -135,7 +135,7 @@ public sealed interface Rhumb extends Curve } @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { return getDataPoints().getAttributesType(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/point/MultiPoint.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/point/MultiPoint.java index 0672976710..3318bc56a9 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/point/MultiPoint.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/point/MultiPoint.java @@ -44,10 +44,10 @@ public sealed interface MultiPoint<T extends Point> extends GeometryCollection<T MeshPrimitive.Points { - public static final String TYPE = "MULTIPOINT"; + static final String TYPE = "MULTIPOINT"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/MultiPolyhedron.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/MultiPolyhedron.java index 2b77a2ec7d..75a8f5e811 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/MultiPolyhedron.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/MultiPolyhedron.java @@ -32,10 +32,10 @@ public sealed interface MultiPolyhedron extends GeometryCollection<Polyhedron> permits DefaultMultiPolyhedron { - public static final String TYPE = "MULTIPOLYHEDRON"; + static final String TYPE = "MULTIPOLYHEDRON"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Polyhedron.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Polyhedron.java index 12c5153c94..d1d5711e69 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Polyhedron.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Polyhedron.java @@ -43,15 +43,15 @@ public sealed interface Polyhedron extends Solid DefaultPolyhedron { - public static final String TYPE = "POLYHEDRON"; + static final String TYPE = "POLYHEDRON"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { return getExteriorShell().getAttributesType(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/CurvePolygon.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/CurvePolygon.java index e16ea3e9ee..9b5151bc55 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/CurvePolygon.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/CurvePolygon.java @@ -59,7 +59,7 @@ public sealed interface CurvePolygon extends Surface /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "CURVEPOLYGON"; + static final String TYPE = "CURVEPOLYGON"; /** * Returns {@value #TYPE}. @@ -67,7 +67,7 @@ public sealed interface CurvePolygon extends Surface * @see ISO 19107:2019 - 6.4.4.23 */ @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -75,7 +75,7 @@ public sealed interface CurvePolygon extends Surface * Returns the attributes of the exterior ring, which are the attributes of this surface. */ @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { return getExteriorRing().getAttributesType(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiPolygon.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiPolygon.java index 7133f767ca..a295a895d5 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiPolygon.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiPolygon.java @@ -39,10 +39,10 @@ public sealed interface MultiPolygon extends MultiSurface<Polygon> permits DefaultMultiPolygon { - public static final String TYPE = "MULTIPOLYGON"; + static final String TYPE = "MULTIPOLYGON"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiSurface.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiSurface.java index f5718adb2b..4563f9bb21 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiSurface.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/MultiSurface.java @@ -47,10 +47,10 @@ public sealed interface MultiSurface<T extends Surface> extends GeometryCollecti DefaultMultiSurface { - public static final String TYPE = "MULTISURFACE"; + static final String TYPE = "MULTISURFACE"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/NurbSurface.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/NurbSurface.java index cb9c681ff9..fad2377b05 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/NurbSurface.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/NurbSurface.java @@ -28,7 +28,7 @@ public sealed interface NurbSurface extends BSplineSurface permits DefaultNurbSurface { - public static final String TYPE = "NURBSSURFACE"; + static final String TYPE = "NURBSSURFACE"; @Override default String getGeometryType() { diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Polygon.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Polygon.java index ecb32ef5eb..3c5ec90384 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Polygon.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Polygon.java @@ -67,7 +67,7 @@ public sealed interface Polygon extends Surface /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "POLYGON"; + static final String TYPE = "POLYGON"; /** * Returns {@value #TYPE}. @@ -75,7 +75,7 @@ public sealed interface Polygon extends Surface * @see ISO 19107:2019 - 6.4.4.23 */ @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -83,7 +83,7 @@ public sealed interface Polygon extends Surface * Returns the attributes of the exterior ring, which are the attributes of this polygon. */ @Override - public default AttributesType getAttributesType() { + default AttributesType getAttributesType() { return getExteriorRing().getAttributesType(); } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PolyhedralSurface.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PolyhedralSurface.java index c8d405692d..6c1110c07d 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PolyhedralSurface.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PolyhedralSurface.java @@ -67,7 +67,7 @@ public sealed interface PolyhedralSurface<T extends Polygon> extends /*GeometryC /** * Well-known text keyword of this geometry type. */ - public static final String TYPE = "POLYHEDRALSURFACE"; + static final String TYPE = "POLYHEDRALSURFACE"; /** * Returns {@value #TYPE}. @@ -75,7 +75,7 @@ public sealed interface PolyhedralSurface<T extends Polygon> extends /*GeometryC * @see ISO 19107:2019 - 6.4.4.23 */ @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } @@ -117,7 +117,7 @@ public sealed interface PolyhedralSurface<T extends Polygon> extends /*GeometryC * @see ISO 19107:2019 - 6.4.25.7 */ @Override - public default Area getArea() { + default Area getArea() { final int n = getNumPatches(); if (n == 0) { return Quantities.create(0, Units.SQUARE_METRE); diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PreparedTIN.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PreparedTIN.java index 208a0fc361..9db95bfd89 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PreparedTIN.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/PreparedTIN.java @@ -60,11 +60,11 @@ public sealed interface PreparedTIN extends TIN */ Stream<Triangle> getPatches(org.opengis.geometry.Envelope env) throws TransformException; - public static PreparedTIN create(Collection<TIN> tin) { + static PreparedTIN create(Collection<TIN> tin) { return create(tin.toArray(TIN[]::new)); } - public static PreparedTIN create(TIN... tin) { + static PreparedTIN create(TIN... tin) { if (tin.length == 0) throw new IllegalArgumentException("At least one TIN must be provided"); if (tin.length == 1) return new Single(tin[0]); final Single[] singles = new Single[tin.length]; diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/TIN.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/TIN.java index d45eeba935..3960f8c540 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/TIN.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/TIN.java @@ -36,10 +36,10 @@ public sealed interface TIN extends TriangulatedSurface<Triangle> MeshPrimitive.TriangleStrip { - public static final String TYPE = "TIN"; + static final String TYPE = "TIN"; @Override - public default String getGeometryType() { + default String getGeometryType() { return TYPE; } diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Triangle.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Triangle.java index f965d45715..7465fe162f 100644 --- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Triangle.java +++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Triangle.java @@ -183,7 +183,7 @@ public sealed interface Triangle extends Polygon * @param nullIfOutside return null if point is outside the triangle * @return [a,b,c] weights */ - public static double[] getBarycentricValue2D(double x1, double y1, double x2, double y2, double x3, double y3, double x, double y, double epsilon, boolean nullIfOutside) { + static double[] getBarycentricValue2D(double x1, double y1, double x2, double y2, double x3, double y3, double x, double y, double epsilon, boolean nullIfOutside) { if (nullIfOutside) { if (!Maths.isPointInTriangle_BoundingBox(x1, y1, x2, y2, x3, y3, x, y, epsilon)) { return null; @@ -229,7 +229,7 @@ public sealed interface Triangle extends Polygon } } - public static Double interpolate2D(Vector3D.Double a, Vector3D.Double b, Vector3D.Double c, Vector2D.Double p){ + static Double interpolate2D(Vector3D.Double a, Vector3D.Double b, Vector3D.Double c, Vector2D.Double p){ final double v0x = b.x-a.x; final double v0y = b.y-a.y; final double v1x = c.x-a.x;
