sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Add Orthographic projection in the list of projections centered on mouse click.
Date Fri, 09 Oct 2020 16:55:23 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 325d23f  Add Orthographic projection in the list of projections centered on mouse
click.
325d23f is described below

commit 325d23fa92e4b998cb68040d39881735442a3eca
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Fri Oct 9 16:00:26 2020 +0200

    Add Orthographic projection in the list of projections centered on mouse click.
---
 .../sis/gui/referencing/PositionableProjection.java   | 19 +++++++++++++++++++
 .../java/org/apache/sis/internal/gui/Resources.java   |  5 +++++
 .../org/apache/sis/internal/gui/Resources.properties  |  1 +
 .../apache/sis/internal/gui/Resources_fr.properties   |  1 +
 4 files changed, 26 insertions(+)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/PositionableProjection.java
b/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/PositionableProjection.java
index ed4353f..ed66f71 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/PositionableProjection.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/PositionableProjection.java
@@ -59,6 +59,25 @@ public abstract class PositionableProjection extends CodeList<PositionableProjec
     private static final List<PositionableProjection> VALUES = new ArrayList<>(1);
 
     /**
+     * Provides <cite>Orthographic</cite> projection centered on a point of interest.
+     *
+     * @see org.apache.sis.referencing.operation.projection.Orthographic
+     */
+    public static final PositionableProjection ORTHOGRAPHIC =
+            new PositionableProjection("ORTHOGRAPHIC", Resources.Keys.Orthographic)
+    {
+        @Override protected ProjectedCRS createProjectedCRS(final GeographicCRS baseCRS,
+                final double latitude, final double longitude) throws FactoryException
+        {
+            return newBuilder(latitude, longitude)
+                    .setConversionMethod("Orthographic")
+                    .setParameter("Latitude of natural origin",  latitude,  Units.DEGREE)
+                    .setParameter("Longitude of natural origin", longitude, Units.DEGREE)
+                    .createProjectedCRS(baseCRS, null);
+        }
+    };
+
+    /**
      * Provides <cite>Azimuthal Equidistant</cite> projection centered on a point
of interest.
      * For projection on the ellipsoid, this is valid only under 800 km of the point of interest.
      *
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.java
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.java
index 4d4fb96..f043ef9 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.java
@@ -256,6 +256,11 @@ public final class Resources extends IndexedResourceBundle {
         public static final short OpenDataFile = 29;
 
         /**
+         * Orthographic
+         */
+        public static final short Orthographic = 52;
+
+        /**
          * Select a coordinate reference system
          */
         public static final short SelectCRS = 30;
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.properties
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.properties
index 0c63818..2b67622 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.properties
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources.properties
@@ -60,6 +60,7 @@ NewWindow              = New window
 NoFeatureTypeInfo      = No feature type information.
 Open                   = Open\u2026
 OpenDataFile           = Open data file
+Orthographic           = Orthographic
 SelectCRS              = Select a coordinate reference system
 SelectCrsByContextMenu = For changing the projection, use contextual menu on the map.
 SendTo                 = Send to
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources_fr.properties
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources_fr.properties
index cade986..48e5587 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources_fr.properties
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/Resources_fr.properties
@@ -65,6 +65,7 @@ NewWindow              = Nouvelle fen\u00eatre
 NoFeatureTypeInfo      = Pas d\u2019information sur le type d\u2019entit\u00e9.
 Open                   = Ouvrir\u2026
 OpenDataFile           = Ouvrir un fichier de donn\u00e9es
+Orthographic           = Orthographique
 SelectCRS              = Choisir un syst\u00e8me de r\u00e9f\u00e9rence des coordonn\u00e9es
 SelectCrsByContextMenu = Pour changer la projection, utilisez le menu contextuel sur la carte.
 SendTo                 = Envoyer vers


Mime
View raw message