Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-121

AngleFormat should be able to optionally omit zero fields

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: 0.4
    • Component/s: Utilities
    • Labels:
      None

      Description

      AngleFormat currently formats the degrees, minutes and seconds field unconditionally. We should be able to omit the fields having a zero value, if desired, for more compact representation. Optional field can be identified by a question mark in the pattern. For example the 90° value:

      • Using DD°MM′SS″ pattern, is always formatted as 90°00′00″.
      • Using DD°?MM′?SS″? pattern, is formatted as 90° since the minutes and seconds fields are zero.

      The use of question mark is by analogy with regular expression, where ? means "zero or one occurrence of previous character".

        Attachments

          Activity

            People

            • Assignee:
              desruisseaux Martin Desruisseaux
              Reporter:
              desruisseaux Martin Desruisseaux
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: