You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2022/01/31 12:11:24 UTC
[sis] 02/02: Add parameter names derived from ISO 19162 WKT example for `PoleRotation` operation method. We use SIS namespace for now, but may change to OGC later if those names are adopted by OGC.
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
commit d564ace57ae03c6688b3d5ea228c99a6b50c38ca
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Mon Jan 31 12:29:07 2022 +0100
Add parameter names derived from ISO 19162 WKT example for `PoleRotation` operation method.
We use SIS namespace for now, but may change to OGC later if those names are adopted by OGC.
---
.../referencing/provider/NorthPoleRotation.java | 36 ++++++++++++++--------
.../referencing/provider/SouthPoleRotation.java | 34 ++++++++++++--------
2 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NorthPoleRotation.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NorthPoleRotation.java
index 53efb43..12e7f7d 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NorthPoleRotation.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NorthPoleRotation.java
@@ -45,7 +45,7 @@ import org.apache.sis.measure.Units;
* @author Martin Desruisseaux (Geomatys)
* @version 1.2
*
- * @see <a href="https://cfconventions.org/cf-conventions/cf-conventions.html#_rotated_pole">Rotated pole in CF-conversions</a>
+ * @see <a href="https://cfconventions.org/cf-conventions/cf-conventions.html#_rotated_pole">Rotated pole in CF-conventions</a>
*
* @since 1.2
* @module
@@ -63,6 +63,7 @@ public final class NorthPoleRotation extends AbstractProvider {
* <!-- Generated by ParameterNameTableGenerator -->
* <table class="sis">
* <caption>Parameter names</caption>
+ * <tr><td> SIS: </td><td> Latitude of rotated pole </td></tr>
* <tr><td> NetCDF: </td><td> grid_north_pole_latitude </td></tr>
* </table>
* <b>Notes:</b>
@@ -70,7 +71,7 @@ public final class NorthPoleRotation extends AbstractProvider {
* <li>No default value</li>
* </ul>
*/
- private static final ParameterDescriptor<Double> GRID_POLE_LATITUDE;
+ private static final ParameterDescriptor<Double> POLE_LATITUDE;
/**
* The operation parameter descriptor for the <cite>grid north pole longitude</cite> parameter value.
@@ -78,6 +79,7 @@ public final class NorthPoleRotation extends AbstractProvider {
* <!-- Generated by ParameterNameTableGenerator -->
* <table class="sis">
* <caption>Parameter names</caption>
+ * <tr><td> SIS: </td><td> Longitude of rotated pole </td></tr>
* <tr><td> NetCDF: </td><td> grid_north_pole_longitude </td></tr>
* </table>
* <b>Notes:</b>
@@ -85,7 +87,7 @@ public final class NorthPoleRotation extends AbstractProvider {
* <li>No default value</li>
* </ul>
*/
- private static final ParameterDescriptor<Double> GRID_POLE_LONGITUDE;
+ private static final ParameterDescriptor<Double> POLE_LONGITUDE;
/**
* The operation parameter descriptor for the <cite>north_pole_grid_longitude</cite> parameter value.
@@ -94,6 +96,7 @@ public final class NorthPoleRotation extends AbstractProvider {
* <!-- Generated by ParameterNameTableGenerator -->
* <table class="sis">
* <caption>Parameter names</caption>
+ * <tr><td> SIS: </td><td> Axis rotation </td></tr>
* <tr><td> NetCDF: </td><td> north_pole_grid_longitude </td></tr>
* </table>
* <b>Notes:</b>
@@ -102,7 +105,7 @@ public final class NorthPoleRotation extends AbstractProvider {
* <li>Optional</li>
* </ul>
*/
- private static final ParameterDescriptor<Double> GRID_POLE_ANGLE;
+ private static final ParameterDescriptor<Double> AXIS_ANGLE;
/**
* The group of all parameters expected by this coordinate operation.
@@ -111,20 +114,27 @@ public final class NorthPoleRotation extends AbstractProvider {
static {
final ParameterBuilder builder = new ParameterBuilder().setCodeSpace(Citations.NETCDF, "NetCDF").setRequired(true);
- GRID_POLE_LATITUDE = builder.addName("grid_north_pole_latitude")
+ POLE_LATITUDE = builder
+ .addNameAndIdentifier(Citations.SIS, SouthPoleRotation.POLE_LATITUDE)
+ .addName("grid_north_pole_latitude")
.createBounded(Latitude.MIN_VALUE, Latitude.MAX_VALUE, Double.NaN, Units.DEGREE);
- GRID_POLE_LONGITUDE = builder.addName("grid_north_pole_longitude")
+ POLE_LONGITUDE = builder
+ .addNameAndIdentifier(Citations.SIS, SouthPoleRotation.POLE_LONGITUDE)
+ .addName("grid_north_pole_longitude")
.createBounded(Longitude.MIN_VALUE, Longitude.MAX_VALUE, Double.NaN, Units.DEGREE);
- GRID_POLE_ANGLE = builder.setRequired(false).addName("north_pole_grid_longitude")
+ AXIS_ANGLE = builder.setRequired(false)
+ .addNameAndIdentifier(Citations.SIS, SouthPoleRotation.AXIS_ANGLE)
+ .addName("north_pole_grid_longitude")
.createBounded(Longitude.MIN_VALUE, Longitude.MAX_VALUE, 0, Units.DEGREE);
PARAMETERS = builder.setRequired(true)
+ .addName(Citations.SIS, "North pole rotation")
.addName("rotated_latitude_longitude")
- .createGroup(GRID_POLE_LATITUDE, // Note: `PoleRotation` implementation depends on this parameter order.
- GRID_POLE_LONGITUDE,
- GRID_POLE_ANGLE);
+ .createGroup(POLE_LATITUDE, // Note: `PoleRotation` implementation depends on this parameter order.
+ POLE_LONGITUDE,
+ AXIS_ANGLE);
}
/**
@@ -148,8 +158,8 @@ public final class NorthPoleRotation extends AbstractProvider {
{
final Parameters p = Parameters.castOrWrap(parameters);
return PoleRotation.rotateNorthPole(factory,
- p.getValue(GRID_POLE_LATITUDE),
- p.getValue(GRID_POLE_LONGITUDE),
- p.getValue(GRID_POLE_ANGLE));
+ p.getValue(POLE_LATITUDE),
+ p.getValue(POLE_LONGITUDE),
+ p.getValue(AXIS_ANGLE));
}
}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SouthPoleRotation.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SouthPoleRotation.java
index 37c57b3..6e3fc84 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SouthPoleRotation.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SouthPoleRotation.java
@@ -60,6 +60,7 @@ public final class SouthPoleRotation extends AbstractProvider {
* <!-- Generated by ParameterNameTableGenerator -->
* <table class="sis">
* <caption>Parameter names</caption>
+ * <tr><td> SIS: </td><td> Latitude of rotated pole </td></tr>
* <tr><td> NetCDF: </td><td> grid_south_pole_latitude </td></tr>
* </table>
* <b>Notes:</b>
@@ -67,7 +68,7 @@ public final class SouthPoleRotation extends AbstractProvider {
* <li>No default value</li>
* </ul>
*/
- private static final ParameterDescriptor<Double> GRID_POLE_LATITUDE;
+ static final ParameterDescriptor<Double> POLE_LATITUDE;
/**
* The operation parameter descriptor for the <cite>grid south pole longitude</cite> parameter value.
@@ -77,6 +78,7 @@ public final class SouthPoleRotation extends AbstractProvider {
* <!-- Generated by ParameterNameTableGenerator -->
* <table class="sis">
* <caption>Parameter names</caption>
+ * <tr><td> SIS: </td><td> Longitude of rotated pole </td></tr>
* <tr><td> NetCDF: </td><td> grid_south_pole_longitude </td></tr>
* </table>
* <b>Notes:</b>
@@ -84,7 +86,7 @@ public final class SouthPoleRotation extends AbstractProvider {
* <li>No default value</li>
* </ul>
*/
- private static final ParameterDescriptor<Double> GRID_POLE_LONGITUDE;
+ static final ParameterDescriptor<Double> POLE_LONGITUDE;
/**
* The operation parameter descriptor for the <cite>grid_south_pole_angle</cite> parameter value (optional).
@@ -96,6 +98,7 @@ public final class SouthPoleRotation extends AbstractProvider {
* <!-- Generated by ParameterNameTableGenerator -->
* <table class="sis">
* <caption>Parameter names</caption>
+ * <tr><td> SIS: </td><td> Axis rotation </td></tr>
* <tr><td> NetCDF: </td><td> grid_south_pole_angle </td></tr>
* </table>
* <b>Notes:</b>
@@ -104,7 +107,7 @@ public final class SouthPoleRotation extends AbstractProvider {
* <li>Optional</li>
* </ul>
*/
- private static final ParameterDescriptor<Double> GRID_POLE_ANGLE;
+ static final ParameterDescriptor<Double> AXIS_ANGLE;
/**
* The group of all parameters expected by this coordinate operation.
@@ -113,21 +116,28 @@ public final class SouthPoleRotation extends AbstractProvider {
static {
final ParameterBuilder builder = new ParameterBuilder().setCodeSpace(Citations.NETCDF, "NetCDF").setRequired(true);
- GRID_POLE_LATITUDE = builder.addName("grid_south_pole_latitude")
+ POLE_LATITUDE = builder
+ .addName(Citations.SIS, "Latitude of rotated pole")
+ .addName("grid_south_pole_latitude")
.createBounded(Latitude.MIN_VALUE, Latitude.MAX_VALUE, Double.NaN, Units.DEGREE);
- GRID_POLE_LONGITUDE = builder.addName("grid_south_pole_longitude")
+ POLE_LONGITUDE = builder
+ .addName(Citations.SIS, "Longitude of rotated pole")
+ .addName("grid_south_pole_longitude")
.createBounded(Longitude.MIN_VALUE, Longitude.MAX_VALUE, Double.NaN, Units.DEGREE);
- GRID_POLE_ANGLE = builder.setRequired(false).addName("grid_south_pole_angle")
+ AXIS_ANGLE = builder.setRequired(false)
+ .addName(Citations.SIS, "Axis rotation")
+ .addName("grid_south_pole_angle")
.createBounded(Longitude.MIN_VALUE, Longitude.MAX_VALUE, 0, Units.DEGREE);
PARAMETERS = builder.setRequired(true)
+ .addName(Citations.SIS, "South pole rotation")
.addName(Citations.WMO, "Rotated Latitude/longitude")
.addName("rotated_latlon_grib")
- .createGroup(GRID_POLE_LATITUDE, // Note: `PoleRotation` implementation depends on this parameter order.
- GRID_POLE_LONGITUDE,
- GRID_POLE_ANGLE);
+ .createGroup(POLE_LATITUDE, // Note: `PoleRotation` implementation depends on this parameter order.
+ POLE_LONGITUDE,
+ AXIS_ANGLE);
}
/**
@@ -151,8 +161,8 @@ public final class SouthPoleRotation extends AbstractProvider {
{
final Parameters p = Parameters.castOrWrap(parameters);
return PoleRotation.rotateSouthPole(factory,
- p.getValue(GRID_POLE_LATITUDE),
- p.getValue(GRID_POLE_LONGITUDE),
- p.getValue(GRID_POLE_ANGLE));
+ p.getValue(POLE_LATITUDE),
+ p.getValue(POLE_LONGITUDE),
+ p.getValue(AXIS_ANGLE));
}
}