Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.00, 3.01
-
Fix Version/s: 3.02
-
Component/s: Referencing
-
Labels:
Description
Let's say I parse this line with PropertyAuthorityFactory
48000=PROJCS["bug", ... ,AUTHORITY["EPSG","48000"]]
PropertyAuthorityFactory uses WKTParsingAuthorityFactory. PROJCS element is parsed to Properties which are passed to NamedIdentifier. NamedIdentifier then uses the name as code. Resulting CRS is EPSG:bug instead of EPSG:48000.

I added more tests in PropertyAuthorityFactoryTest and got the result we would expect. Which method is returning "EPSG:bug" when "EPSG:48000' would be expected? Is it CoordinateReferenceSystem.getName().getCode()? If so, then "bug" would be the expected result (the "EPSG:" prefix is strange and would need investigation). In order to get "EPSG:48000", the method to use is CoordinateReferenceSystem.getIdentifiers(), or the CRS.toSRS(...) convenience method (fixed as of
GEOTK-21).I admit that getCode() may be a misleading method name for getting the string representation of the CRS name, but this is the way ISO 19111 and 19115 are written (unless I'm misunderstanding them) where the CRS name is considered itself as a kind of identifier...
GEOTK-21). I admit that getCode() may be a misleading method name for getting the string representation of the CRS name, but this is the way ISO 19111 and 19115 are written (unless I'm misunderstanding them) where the CRS name is considered itself as a kind of identifier...