Skip to end of metadata
Go to start of metadata

Motivation:

Fix the "URN factory not found" bug

Contact:

Martin Desruisseaux

Tracker:

http://jira.codehaus.org/browse/GEOT-1659

This proposal has been withdrawn

Icon

Implementation was attempted and we realized that it leads to confusion. It was not always obvious which ReferencingFactoryFinder instance should be used, STRICT or DEFAULT. The risk for greater confusion on user side was high. We selected an other approach which preserve backward compatibility, at the cost of being less explicit and more "magic".

Description

Initial investigation suggests that GEOT-1659 is caused by global (system-wide) hints. Sometime the referencing module really wants a factory for a specific set of hints, without merge with global hints.

The incompatible change proposal:

  • Turns every ReferencingFactoryFinder static methods into non-static methods.

Note that only ReferencingFactoryFinder (and maybe other FactoryFinders if we want to uniformize this approach) would be affected. The CRS convenience class would not be affected.

If this proposal is accepted, I can declare two ReferencingFactoryFinder instances: DEFAULT and STRICT. Users would need to replace every calls to:

by:

We can do that with a search-and-replace tool like we did for Logging (actually it is easier than Logging, since there is no import statement or class name to change).

Transition path

ReferencingFactoryFinder has been introduced on 2.4, which is not yet released. On the 2.4 branch, the deprecated FactoryFinder class would stay as-is: static methods delegating to ReferencingFactoryFinder.DEFAULT. So the "deprecate" cycle would be respected, but very late since it is so close to 2.4 release.

Status

This proposal is currently underconstruction:

Tasks

  1. Fix up ReferencingFactoryFinder with new methods.
  2. Writes a Ant task performing global search-and-replace. This is a very trivial and low-risk replacement.
  3. Update GeoTools library to use new methods using the Ant task.
  4. Update the Referencing User docs: 07 Referencing

API Change

BEFORE

Client code using global settings with ReferencingFactoryFinder:

GeoTools code using ReferencingFactoryFinder internally:

AFTER

Client code using global settings with ReferencingFactoryFinder:

GeoTools code using ReferencingFactoryFinder instance:

  • No labels