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

        There are no comments yet on this issue.

          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