orbisgis / cts

Projection library in Java
GNU Lesser General Public License v3.0
50 stars 16 forks source link

Authority name and key should be case insensitive #78

Closed mukoki closed 7 years ago

mukoki commented 7 years ago

In CRSHelper#createCoordinateReferenceSystem(), we use the following test : if (identifier.getCode().equals("EPSG:3857")) {} and registry name like that EPSGRegistry.getRegistryName() {return "epsg";}

I suggest 1 - to always use uppercase registry names in the code (e.g. in EPSGRegistry, ESRIRegistry, IGNFRegistry) 2 - to make all comparison of authorityName and authorityId case insensitive, and in particular in CRSHelper#createCoordinateReferenceSystem Identifier#equals, Identifier#hashCode IdentifiableComponent#equals, IdentifiableComponent#hashcode etc.

ebocher commented 7 years ago

Thanks a lot @mukoki I have a preference for the second option. It will be more comfortable for users or developers.

ebocher commented 7 years ago

I will start to merge the @mukoki PR into CTS.