@@ -189,6 +189,10 @@ default CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS,
189189 * The source coordinate reference system of the first step and the target coordinate reference system of the
190190 * last step are the source and target coordinate reference system associated with the concatenated operation.
191191 *
192+ * @deprecated Replaced by {@linkplain #createConcatenatedOperation(Map, CoordinateReferenceSystem,
193+ * CoordinateReferenceSystem, CoordinateOperation...) a method with explicit CRS arguments} because
194+ * of potential swapping of source/target <abbr>CRS</abbr>.
195+ *
192196 * @param properties name and other properties to give to the new object.
193197 * Available properties are {@linkplain ObjectFactory listed there}.
194198 * @param operations the sequence of operations.
@@ -199,10 +203,11 @@ default CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS,
199203 * This method has been added because OGC 01-009 does not define a factory
200204 * method for creating concatenated operations.
201205 */
206+ @ Deprecated (since = "3.1" )
202207 default CoordinateOperation createConcatenatedOperation (Map <String , ?> properties ,
203208 CoordinateOperation ... operations ) throws FactoryException
204209 {
205- throw new UnimplementedServiceException ( this , ConcatenatedOperation . class );
210+ return createConcatenatedOperation ( properties , null , null , operations );
206211 }
207212
208213 /**
@@ -273,4 +278,36 @@ default OperationMethod createOperationMethod(Map<String,?> properties,
273278 {
274279 throw new UnimplementedServiceException (this , OperationMethod .class );
275280 }
281+
282+ /**
283+ * Creates an ordered sequence of two or more single coordinate operations.
284+ * The sequence of operations is constrained by the requirement that the source coordinate reference system
285+ * of step (<var>n</var>+1) must be the same as the target coordinate reference system of step (<var>n</var>).
286+ * The source coordinate reference system of the first step and the target coordinate reference system of the
287+ * last step are the source and target coordinate reference system associated with the concatenated operation.
288+ *
289+ * <p>As an exception to the above-cited constraint, a step can swap its source and target <abbr>CRS</abbr>.
290+ * In such case, the effectively executed operation will be the inverse of that step. The {@code sourceCRS}
291+ * and {@code targetCRS} arguments of this method are needed for detecting whether such swapping occurred
292+ * in the first step or in the last step. Those optional arguments can be {@code null} if the caller did
293+ * not swapped any <abbr>CRS</abbr>.</p>
294+ *
295+ * @param properties name and other properties to give to the new object.
296+ * Available properties are {@linkplain ObjectFactory listed there}.
297+ * @param sourceCRS the source <abbr>CRS</abbr>, or {@code null} for the source of the first step.
298+ * @param targetCRS the target <abbr>CRS</abbr>, or {@code null} for the target of the last effective step.
299+ * @param operations the sequence of operations. Should contain at least two operations.
300+ * @return the concatenated operation created from the given arguments.
301+ * @throws FactoryException if the object creation failed.
302+ *
303+ * @since 3.1
304+ */
305+ default CoordinateOperation createConcatenatedOperation (
306+ Map <String ,?> properties ,
307+ CoordinateReferenceSystem sourceCRS ,
308+ CoordinateReferenceSystem targetCRS ,
309+ CoordinateOperation ... operations ) throws FactoryException
310+ {
311+ throw new UnimplementedServiceException (this , ConcatenatedOperation .class );
312+ }
276313}
0 commit comments