GeoTools
  1. GeoTools
  2. GEOT-3470

Minimum circle and rectangle Filter Functions

    Details

    • Type: New Feature New Feature
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7-RC2
    • Fix Version/s: 2.7.0
    • Component/s: main
    • Labels:
      None
    • Environment:
      Mac 10.6.6, Java 1.6.0_24
    • Testcase included:
      yes

      Description

      JTS recently added algorithms for calculating minimum rectangles and minimum bounding circles. Let's add filter functions that do these calculations so we can use them in SLD geometry transformations.

      1. ff_mincircle_minrect_spi_tests.diff
        9 kB
        Jared Erickson
      2. filterfunction_min.diff
        15 kB
        Jared Erickson
      3. filterfunction_min2.diff
        15 kB
        Jared Erickson
      1. states_mincircle.png
        61 kB
      2. states_minrect.png
        41 kB

        Activity

        Hide
        Andrea Aime added a comment -
        Looks good! Don't have time to apply it right now but I noticed one little thing, the code is not null safe (if you get a null geometry it would NPE). We just recently tried to address that with the other functions
        Show
        Andrea Aime added a comment - Looks good! Don't have time to apply it right now but I noticed one little thing, the code is not null safe (if you get a null geometry it would NPE). We just recently tried to address that with the other functions
        Hide
        Jared Erickson added a comment -
        Thanks for the review Andrea, I am attaching a modified diff with null safeness and unit tests.
        Show
        Jared Erickson added a comment - Thanks for the review Andrea, I am attaching a modified diff with null safeness and unit tests.
        Hide
        Andrea Aime added a comment -
        Good work, hope to see more patches like this one coming down.

        Patch applied on 2.7.x and trunk
        Show
        Andrea Aime added a comment - Good work, hope to see more patches like this one coming down. Patch applied on 2.7.x and trunk
        Hide
        Andrea Aime added a comment -
        Mass closing all issues that have been in "resolved" state for more than one month without further comments
        Show
        Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for more than one month without further comments
        Hide
        Jared Erickson added a comment -
        The Service Provider Interface entry (src/main/resources/META-INF/services/org.opengis.filter.expression.Function) was not applied so these functions unfindable. Also, the unit tests in the previous patches are not in trunk or tag 2.7.4.
        Show
        Jared Erickson added a comment - The Service Provider Interface entry (src/main/resources/META-INF/services/org.opengis.filter.expression.Function) was not applied so these functions unfindable. Also, the unit tests in the previous patches are not in trunk or tag 2.7.4.
        Hide
        Jared Erickson added a comment -
        New patch with just SPI entry and unit tests.
        Show
        Jared Erickson added a comment - New patch with just SPI entry and unit tests.
        Hide
        Andrea Aime added a comment -
        Patch applied on 2.7.x and trunk
        Show
        Andrea Aime added a comment - Patch applied on 2.7.x and trunk

          People

          • Assignee:
            Andrea Aime
            Reporter:
            Jared Erickson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: