GeoAPI
  1. GeoAPI
  2. GEO-136

Rename getCenter as getMedian and getLength as getSpan

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2-M1
    • Component/s: geometry
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The following Envelope methods are GeoAPI extensions, not ISO 19107 methods:

      • getCenter(int), named "center" by analogy with Rectangle2D.getCenterX/Y() in standard Java library.
      • getLength(int).

      They are misnamed, especially getLength(int) which suggests some kind of linear unit (e.g. the length of some polygon border). The proposal is to rename them as:

      • getMedian(int)
      • getSpan(int)

      Note that "Span" is a name used in standard Java library for the same purpose than our intend: http://java.sun.com/javase/6/docs/api/javax/swing/text/BoxView.html#getSpan(int,%20int)

      Their javadoc should be improved in the process with a clear definition of what those methods are expected to compute.

        Activity

        Martin Desruisseaux logged work - 20/Jun/08 11:00 AM
        • Time Spent:
          2 hours
           
          Renamed methods and clarified the javadoc. Commited to trunk.
        Martin Desruisseaux made changes -
        Field Original Value New Value
        Remaining Estimate 2 hours [ 7200 ] 0 minutes [ 0 ]
        Time Spent 2 hours [ 7200 ]
        Martin Desruisseaux made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Martin Desruisseaux made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Martin Desruisseaux made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Fix Version/s 2.2-M1 [ 14472 ]
        Fix Version/s 2.2 [ 12386 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

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