GeoTools
  1. GeoTools
  2. GEOT-3001

Interpolate function as per Symbology Encoding 1.1

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.4, 2.7-M0
    • Component/s: None
    • Labels:
      None
    • Testcase included:
      yes

      Description

      The attached patch is a first go at implementing the Interpolate function for numeric and colour interpolation. Please review it carefully as I expect many changes and improvements will be required. The patch also has a new version of the unit tests for the Categorize function but more work is required for them (and probably that function).

      Some design issues:
      The SE 1.1 spec defines two optional parameters for this function: method ("numeric" or "color") and mode ("linear", "cosine" or "cubic"). Surely these terms are the wrong way round

      The cubic algorithm used was chosen for its simplicity and, hopefully, speed relative to more complex cubic spline algorithms, but I've only assessed its performance briefly and qualitatively.

      The cubic algorithm requires at least 4 interpolation points. If less than 4 are provided the function falls back to cosine interpolation - is this reasonable ?

      1. se_functions_2.patch
        52 kB
        Michael Bedward
      2. se_functions_3.patch
        53 kB
        Michael Bedward
      3. se_functions.patch
        47 kB
        Michael Bedward

        Activity

        Hide
        Andrea Aime added a comment -
        Just tried out the latest patch, works fine for me too. Btw, it does not contain the example code anymore? I grabbed it from the previous patch.
        Show
        Andrea Aime added a comment - Just tried out the latest patch, works fine for me too. Btw, it does not contain the example code anymore? I grabbed it from the previous patch.
        Hide
        Michael Bedward added a comment -
        Ah sorry, forgot that I'd moved the example code into the org.geotools.demo.filter package. Would you like a new patch ?
        Show
        Michael Bedward added a comment - Ah sorry, forgot that I'd moved the example code into the org.geotools.demo.filter package. Would you like a new patch ?
        Hide
        Andrea Aime added a comment -
        Nope, go ahead :-)
        Show
        Andrea Aime added a comment - Nope, go ahead :-)
        Hide
        Michael Bedward added a comment -
        committed to trunk r35471 and 2.6.x branch r35473
        Show
        Michael Bedward added a comment - committed to trunk r35471 and 2.6.x branch r35473
        Hide
        Andrea Aime added a comment -
        Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
        Show
        Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

          People

          • Assignee:
            Andrea Aime
            Reporter:
            Michael Bedward
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: