/** * Copies all aliases and all identifiers except EPSG, but using the alias specified by the given authority * as the primary name. The old primary name (usually the EPSG name) is discarded. * * <p>This is a convenience method for defining the parameters of an ESRI-specific (or any other authority) * projection using the EPSG parameters as template.</p> * * @param template the parameter from which to copy the names. * @param authority the authority to use for the primary name. * @param builder an initially clean builder where to add the names. * @return the given {@code builder}, for method call chaining. * * @since 0.8 */ static ParameterBuilder alternativeAuthority(final ParameterDescriptor<Double> template, final Citation authority, final ParameterBuilder builder) { return copyAliases(template, authority, null, null, builder.addName(sameNameAs(authority, template))); }
/** * Copies all aliases and all identifiers except EPSG, but using the alias specified by the given authority * as the primary name. The old primary name (usually the EPSG name) is discarded. * * <p>This is a convenience method for defining the parameters of an ESRI-specific (or any other authority) * projection using the EPSG parameters as template.</p> * * @param template the parameter from which to copy the names. * @param authority the authority to use for the primary name. * @param builder an initially clean builder where to add the names. * @return the given {@code builder}, for method call chaining. * * @since 0.8 */ static ParameterBuilder alternativeAuthority(final ParameterDescriptor<Double> template, final Citation authority, final ParameterBuilder builder) { return copyAliases(template, authority, null, null, builder.addName(sameNameAs(authority, template))); }
/** * Copies name, aliases and identifiers of the given {@code template}, except the alias and identifiers of the * given authority which are replaced by the alias and identifiers of the same authority in {@code replacement}. * * @param template the parameter from which to copy names and identifiers. * @param toRename authority of the alias to rename. * @param replacement the parameter from which to get the new name for the alias to rename. * @param builder an initially clean builder where to add the names and identifiers. * @return the given {@code builder}, for method call chaining. * * @since 0.8 */ static ParameterBuilder renameAlias(final ParameterDescriptor<Double> template, final Citation toRename, final ParameterDescriptor<Double> replacement, final ParameterBuilder builder) { return copyAliases(template, toRename, sameNameAs(toRename, replacement), (ReferenceIdentifier) IdentifiedObjects.getIdentifier(replacement, toRename), builder.addName(template.getName())); }
/** * Copies name, aliases and identifiers of the given {@code template}, except the alias and identifiers of the * given authority which are replaced by the alias and identifiers of the same authority in {@code replacement}. * * @param template the parameter from which to copy names and identifiers. * @param toRename authority of the alias to rename. * @param replacement the parameter from which to get the new name for the alias to rename. * @param builder an initially clean builder where to add the names and identifiers. * @return the given {@code builder}, for method call chaining. * * @since 0.8 */ static ParameterBuilder renameAlias(final ParameterDescriptor<Double> template, final Citation toRename, final ParameterDescriptor<Double> replacement, final ParameterBuilder builder) { return copyAliases(template, toRename, sameNameAs(toRename, replacement), (ReferenceIdentifier) IdentifiedObjects.getIdentifier(replacement, toRename), builder.addName(template.getName())); }