Geotoolkit

CRS.toSRS does not include authority code

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.00, 3.01, 3.02
  • Fix Version/s: 3.02
  • Component/s: Referencing
  • Labels:

Description

If I call CRS.toSRS(crs), I only get identifier code without authority code. My patched version which adds authority (end of method):

if (name != null) {
    Iterator<? extends Identifier> i= name.getAuthority().getIdentifiers().iterator();
    if(i.hasNext()) 
        return i.next().getCode() + ":" + name.toString();
    else
        return name.toString();            
}

Activity

Hide
Martin Desruisseaux added a comment - 16/Jul/2009 11:35

Actually the bug was a little bit deeper since NamedIdentifier.toString() was supposed to return the fully-qualified name in the first place (use NamedIdentifier.getCode() if only the non-qualified part is wanted). This fix implied a few minor changes in the test suite.

Show
Martin Desruisseaux added a comment - 16/Jul/2009 11:35 Actually the bug was a little bit deeper since NamedIdentifier.toString() was supposed to return the fully-qualified name in the first place (use NamedIdentifier.getCode() if only the non-qualified part is wanted). This fix implied a few minor changes in the test suite.

People

Vote (0)
Watch (0)

Dates

  • Created:
    08/Jul/2009 15:05
    Updated:
    13/Apr/2011 15:29
    Resolved:
    13/Apr/2011 15:29

Time Tracking

Estimated:
15m
Original Estimate - 15 minutes Original Estimate - 15 minutes
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
2h
Time Spent - 2 hours