This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a change to branch geoapi-3.1
in repository https://gitbox.apache.org/repos/asf/sis.git.
from 3ae456a Merge branch 'geoapi-4.0' into geoapi-3.1.
add f8161e1 Skeleton of GeodeticCalculator, not yet functional. The idea is taken from
Geotk, but all formulas have been discarted and methods are rewritten. The initial version
will use only spherical formulas published on Wikipedia. The formulas to use for the ellipsoidal
versions will be determined later. More discussion on https://issues.apache.org/jira/browse/SIS-386
add a77e130 Complete (for now) GeodeticCalculator with spherical formulas. Ellipsoidal
formulas will need to be considered later.
add 23fbd3d Deprecate DistanceUtils, replaced by GeodeticCalculator. Current version
implements only spherical formulas, but DistanceUtils was using spherical formulas too. This
commit resolves https://issues.apache.org/jira/browse/SIS-385 The use of ellipsoidal formulas
instead than spherical will be a separated issue.
add d375961 Add tests for GeodeticCalculator.
add 76befaa Add Bézier curve calculation from two end-points, the mid-point and derivatives
at end-point. This will be used as an approximation of geodesic path.
add a585d7f Simplify the Bezier cubic curve to quadratic curve or straight line when
possible. This is especially important in the case of the straight line for avoiding a division
by zero.
add 776b64f Rename "fitCubicCurve" as "bezier" since the returned curve is not necessarily
cubic. Also remove the method from public API because its API may change again based on experience.
add 11a4781 Separated GeodeticCalculator.setDirection(double, double) in two methods:
setStartingAzimuth(double) and setGeodesicDistance(double). The name of the previous method
was vague, and it happens frequently in practice that we want to update only one of those
two properties.
add c16edc2 Approximate geodesic path by Bézier curve: https://issues.apache.org/jira/browse/SIS-454
Current implémentation builds a single linear, quadratic or cubic Bézier curve. It should
be improved in a future version by building a chain of Bézier curves.
add 00feca6 Add a package for visualization tools used for debugging purpose. For now
only show a java.awt.Shape. More may be added in the future.
add 6e8bbee When building a geodesic path, may need to add or remove 360° to the target
longitude depending on the heading.
add 321d86b Fix the case of straight line at equator and add more tests.
add 9a15749 Initial (and incomplete) implementation of loxodromic distance using spherical
formulas.
add d455bf6 Rename expOfNorthing as expΨ for stretching the relationship with isometric
latitude.
add cbcfab2 Replace the innacurate values hard-coded in `testOnParallel45()` by a dependency
to Charles Karney's GeographicLib. That library - https://geographiclib.sourceforge.io/ (MIT/X11
license) is taken as a reference implementation.
add a1d9fa9 Fix wrong CRS reported reported by getPositionCRS() and getGeographicCRS().
add f3f9bc3 Fix wrong coordinate reference system used for transforming the points returned
by GeodeticCalculator.
add 3f5a29f Provide a way to compute the number of fraction digits to show based on
the desired accuracy.
add 1021593 Better formatting of GeodeticCalculator, using the default accuracy (currently
1 cm).
add af89c09 Test GeodeticCalculator against the data set provided by Charles Karney
(2010): Test set for geodesics [Data set] - http://doi.org/10.5281/zenodo.32156 We have to
use a tolerance threshold of 1% of expected distance for now, because we do not yet implement
ellipsoidal formulas.
add cd6a0b4 Fix typo and improve message.
add 1fc1ebc GeodesicCalculator.toGeodesicPath2D() should build a chain of Bézier curves
when a single one is not sufficient for the desired precision.
add 3d2a248 Better map for determining if a cubic Bézier curve is an acceptable approximation
of the geodesic path. Previous implementation assumed that point at t=1/4 on the Bézier curve
was located at 1/4 of geodesic path. This is not true, because the t parameter in Bézier
equations does not vary at the same speed than distance. The relationship between `t` and
distance is too complicated for the needs of this method (it requires numerical integration
and iterative method since t [...]
add 09fa9bf Try harder to avoid unreasonably long chain of Bézier curves. First implementation
of createCircularRegion2D(…), not yet working because of infinite derivative values.
add 0f797b8 Replace α₀ and α₄ ratios by (dx₀,dy₀) and (dx₄,dy₄) vector
components in order to avoid divison by zero.
add f217fed Change method order. No significant code change except the setStartPoint(double,
double) and setEndPoint(double, double) methods which are more lenient on latitude values.
add 1ead312 Replace α₁ and α₂ angles in GeodeticCalculator by dφ₁/dλ₁ and
dφ₂/dλ₂ vector components. This is the complement of previous commit that applied similar
change in Bezier class. It resolves issues with infinities, which fix GeodeticCalculator.createCircularRegion2D(…).
add 831f789 Add link to SIS-455. This issue is not going to be fixed now.
add 17cdbf7 Rename GeodeticCalculator.setStart/EndPoint(double, double) as setStart/EndGeographicPoint(double,
double).
new 803ee36 Merge branch 'geoapi-4.0' into geoapi-3.1. This include the addition of
GeodesicCalculator.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/sis/console/TransformCommand.java | 2 +-
.../org/apache/sis/openoffice/Transformer.java | 2 +-
.../org/apache/sis/services/LocationServlet.java | 27 +-
.../sis/referencing/gazetteer/LocationFormat.java | 2 +-
.../sis/referencing/gazetteer/SimpleLocation.java | 2 +-
core/sis-referencing/pom.xml | 5 +
.../org/apache/sis/distance/DistanceUtils.java | 13 +-
.../org/apache/sis/distance/LatLonPointRadius.java | 64 +-
.../org/apache/sis/geometry/CoordinateFormat.java | 199 ++++-
.../java/org/apache/sis/geometry/Shapes2D.java | 2 +-
.../apache/sis/internal/referencing/Formulas.java | 43 +-
.../referencing/GeodeticObjectBuilder.java | 57 ++
.../internal/referencing/PositionTransformer.java | 268 ++++++
.../internal/referencing/ReferencingUtilities.java | 106 ++-
.../apache/sis/internal/referencing/Resources.java | 10 +
.../sis/internal/referencing/Resources.properties | 2 +
.../internal/referencing/Resources_fr.properties | 2 +
.../internal/referencing/ServicesForMetadata.java | 4 +-
.../sis/internal/referencing/j2d/Bezier.java | 469 ++++++++++
.../internal/referencing/j2d/ShapeUtilities.java | 15 +-
.../main/java/org/apache/sis/referencing/CRS.java | 4 +-
.../apache/sis/referencing/GeodeticCalculator.java | 973 +++++++++++++++++++++
.../factory/GeodeticAuthorityFactory.java | 8 +-
.../operation/projection/ConformalProjection.java | 51 +-
.../projection/LambertConicConformal.java | 23 +-
.../referencing/operation/projection/Mercator.java | 6 +-
.../operation/projection/ObliqueMercator.java | 10 +-
.../operation/projection/PolarStereographic.java | 6 +-
.../apache/sis/geometry/CoordinateFormatTest.java | 15 +
.../referencing/ReferencingUtilitiesTest.java | 6 +-
.../referencing/j2d/ShapeUtilitiesExt.java | 150 ++++
.../referencing/j2d/ShapeUtilitiesTest.java | 81 +-
.../referencing/j2d/ShapeUtilitiesViewer.java | 47 +-
.../sis/referencing/GeodeticCalculatorTest.java | 475 ++++++++++
.../projection/ConformalProjectionTest.java | 72 +-
.../projection/MercatorMethodComparison.java | 10 +-
.../sis/test/suite/ReferencingTestSuite.java | 3 +-
.../org/apache/sis/test/widget/ShapeViewer.java | 90 ++
.../apache/sis/test/widget/SwingAssertions.java | 80 ++
.../org/apache/sis/test/widget/VisualCheck.java | 81 ++
.../org/apache/sis/test/widget/package-info.java} | 33 +-
.../apache/sis/internal/system/DataDirectory.java | 18 +-
.../org/apache/sis/internal/util/Numerics.java | 15 +
.../java/org/apache/sis/measure/AngleFormat.java | 73 +-
.../org/apache/sis/util/resources/Vocabulary.java | 20 +
.../sis/util/resources/Vocabulary.properties | 4 +
.../sis/util/resources/Vocabulary_fr.properties | 4 +
.../org/apache/sis/measure/AngleFormatTest.java | 22 +-
.../src/test/java/org/apache/sis/test/Assert.java | 43 -
.../java/org/apache/sis/test/OptionalTestData.java | 126 +++
ide-project/NetBeans/nbproject/genfiles.properties | 2 +-
ide-project/NetBeans/nbproject/project.properties | 2 +
ide-project/NetBeans/nbproject/project.xml | 3 +
pom.xml | 6 +
.../java/org/apache/sis/index/tree/QuadTree.java | 30 +-
55 files changed, 3619 insertions(+), 267 deletions(-)
create mode 100644 core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionTransformer.java
create mode 100644 core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/Bezier.java
create mode 100644 core/sis-referencing/src/main/java/org/apache/sis/referencing/GeodeticCalculator.java
create mode 100644 core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesExt.java
create mode 100644 core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java
create mode 100644 core/sis-referencing/src/test/java/org/apache/sis/test/widget/ShapeViewer.java
create mode 100644 core/sis-referencing/src/test/java/org/apache/sis/test/widget/SwingAssertions.java
create mode 100644 core/sis-referencing/src/test/java/org/apache/sis/test/widget/VisualCheck.java
copy core/{sis-build-helper/src/main/java/org/apache/sis/internal/book/BookException.java
=> sis-referencing/src/test/java/org/apache/sis/test/widget/package-info.java} (53%)
create mode 100644 core/sis-utility/src/test/java/org/apache/sis/test/OptionalTestData.java
|