# List of changes

## Changes from GeoAPI 1.0 to 2.0

> ### Changes in Metadata packages

> - Completed interfaces and code list derived from ISO 19115.

> - Replaced all `Set` references by `Collection`, except in the very few places where ISO 19115 defines explicitly the collection type.

> - Replaced all `URL` references by `URI`.

> ### Changes in Referencing packages

> - Added `SingleCRS` interface. This change reflect a part of ISO 19111 which was omitted in previous release.

> - Renamed `ObliqueCartesianCS` as `AffineCS`. This reflect a change in OGC Topic 2 voted in July 16, 2004.

> - Renamed `TemporalCS` as `TimeCS`. This reflect a change in OGC Topic 2 voted in July 16, 2004.

> - Renamed `Info` as `IdentifiedObject`. This reflect a change in OGC Topic 2 voted in July 16, 2004.

> - In `CRSFactory.createImageCRS(...)` method, changed the `cs` argument type from `CoordinateSystem` to `AffineCS`. This change is required for type safety and was forgotten in previous release.

> - In `CSFactory` interface, added methods for `UserDefinedCS` creation. This part was forgotten in previous release.

> - Added `toWKT()` method in `IdentifiedObject`.

> - Renamed `NoSuchClassificationException` as `NoSuchIdentifierException`.

> - Replaced all arrays by collections as the return type of the following methods: `IdentifiedObject.getIdentifiers()`, `IdentifiedObject.getAlias()` `CompoundCRS.getCoordinateReferenceSystems()`, `ConcatenatedOperation.getOperations()`, `CoordinateOperation.getPositionalAccuracy()`.

> - Removed the `org.opengis.referencing.quality` package. This package is now replaced by `org.opengis.metadata.quality`. This reflect a change in OGC Topic 2 voted in July 16, 2004.

> - Renamed all `OperationParameter` interfaces as `ParameterDescriptor`. This is because many users expect a parameter to contains a value. The `ParameterDescriptor` name make it clearer that this interface contains metadata about parameter, not the actual parameter value. It also consistent with usage in other Java libraries like Java Advanced Imaging.

> - In `OperationMethod`, changed the `GeneralParameterDescriptor[]` return type to `ParameterDescriptorGroup`. Generally speaking, this change was applied for most processing methods in GeoAPI returning parameters. This is a slight departure from specifications, which usually returns a sequence of parameter rather than a group.

> - For convenience method `getParameter(String)` in `ParameterDescriptorGroup` interface, changed the return type from `GeneralParameterDescriptor` to `ParameterDescriptor`. This change make the convenience method more... convenient.

> - For convenience method `getValue(String)` in `ParameterValueGroup` interface, changed the return type from `GeneralParameterValue` to `ParameterValue`. This change make the convenience method more... convenient. Also renamed the method as `parameter`, which avoid strange expression like `getValue("some_name").setValue(someValue)`. The idiom is now `parameter("some_name").setValue(someValue)` instead.

> - For all methods expecting a `Locale` argument, removed this argument and replaced the `String` return type by `InternationalString`. This change was done for consistency with the metadata package.

> - In `valueFile()` method, replaced the `URL` return type by `URI`.

> ### Changes in Geometry packages

> - Set `Position` as the super-interface for `DirectPosition` and `Point` interfaces instead of an union of them. The union type do no exists in Java and this change lead to a more object oriented approach. This change was done after a comment on the GeoAPI mailing list.

> - In `Envelope` interface, added convenience methods `getMinimum`, `getMaximum`, `getCenter` and `getLength`.

> - In `GenericCurve`, renamed the `getParam` and `getConstructiveParam` method as `forParam` and `forConstructiveParam` respectively. The former names was misleading since those methods do not return a constructive parameter; they expect it as argument instead.

> - In `Complex`, renamed the `getSuperComplexex` method as `getSuperComplexes`. The former was a typo.

> - Addition of more geometry interfaces from ISO 19107. The work is not finished however.

> ### Changes in Grid Coverage packages

> - In `SampleDimension` interface (methods `getDescription` and `getCategoryNames`) and in `Coverage` interface (method `getDimensionNames`), replaced the `String` returns type by `InternationalString`. This change is required for localization support and was forgotten in previous release.

> - In `Coverage` interface, changed the return type from `double[]` to `float[]` for the method `evaluate(DirectPosition, float[])`. Previous return type was wrong.

> - In `Coverage`, merged `getNumSources()` and `getSource(int)` methods into a single `getSources()` method.

> - In `GridRange`, renamed `getLower()` and `getUpper()` as `getLowers()` and `getUppers()`.

> - In `GridRange`, added `getLower(int)`, `getUpper(int)`, `getLength(int)` and `getDimension` convenience methods.

> - In `Operation`, changed the `GeneralParameterValue[]`, return type to `ParameterValueGroup`. Generally speaking, this change was applied for most processing methods in GeoAPI returning parameters. This is a slight departure from specifications, which usually returns a sequence of parameter values.

> - In `GridAnalysis`, renamed the `analyse` method as `analyze`. The former was a typo.