Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make better use of ReferenceSystemType #63

Open
desruisseaux opened this issue Nov 11, 2020 · 1 comment
Open

Make better use of ReferenceSystemType #63

desruisseaux opened this issue Nov 11, 2020 · 1 comment

Comments

@desruisseaux
Copy link
Contributor

The src/main/asciidoc/informative/metadata/departures.adoc file said that MD_ReferenceSystemTypeCode is omitted because considered redundant with typing system of object-oriented languages. This is not true; that code list is present in GeoAPI 3.1 and is not fully redundant because of additional information such as the type of components in a CompoundCRS. We need to revisit that paragraph and also revisit the discussion about MD_ReferenceSystem in light of ISO 19111:2019 revision.

Consider also adding a ReferenceSystemType[] components() method in ReferenceSystemType code list, so for example COMPOUND_GEOGRAPHIC2D_TEMPORAL.components() would return {GEOGRAPHIC2D, TEMPORAL}.

Above proposal may require to change ReferenceSystemType.valueOf(String) with addition of a ReferenceSystemType... components argument. An IllegalArgumentException would be throw if the given code list name exists and is associated to a different array of components.

Above proposal may require to change the CodeList.valueOf(..., String nameIfNew) method signature in GeoAPI 3.1 (not yet released), replacing String nameIfNew by Supplier<T> creator. This change is desirable anyway for security reason, for avoiding call of private constructor by reflection.

Finally, AuthorityFactory.getAuthorityCodes(Class) could replace the Class argument by ReferenceSystemType. It would be both safer (avoid the possibility that users specify an implementation class instead than a neutral interface) and more accurate (make possible to specify the desired components of CompoundCRS).

@desruisseaux
Copy link
Contributor Author

This is partially duplicate of #50.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant