GeoTools
  1. GeoTools
  2. GEOT-2305

Patch: Support for DIMENSION and EXTEND in WMSCapabilities

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.6.3, 2.7-M0
    • Component/s: main
    • Labels:
      None
    • Environment:
      Patch created with Eclipse 3.4.1 and Subclipse (SVN Team Provide Core) 1.4.7 plugin

      Description

      Extended support of Geotools Main to be able to parse a WMS capabilities document that includes Dimension and Extent elements. Two new classes: Dimension and Extent in package org.geotools.data.wms.xml. org.geotools.data.ows.Layer is extended with two new HashMaps, one for Dimension objects and one for Extent objects - both uses the name of the dimension as key.

      Extended handling in org.geotools.data.wms.xml.WMSComplexTypes to be able to handle Dimension and Extent elements in parsing of WMS capabilities document.

        Activity

        Hide
        Per Engstrom added a comment -
        Minor bugfixes regarding default values for attributes nearestValue and multipleValues (both are set to false according to WMS specification 1.1.1 and 1.3.0)
        Show
        Per Engstrom added a comment - Minor bugfixes regarding default values for attributes nearestValue and multipleValues (both are set to false according to WMS specification 1.1.1 and 1.3.0)
        Hide
        Björn Harrtell added a comment - - edited
        Updated against trunk GeoTools 2.7-SNAPSHOT version and fixed broken test.

        This patch also works without modification on the current 2.6.x branch.
        Show
        Björn Harrtell added a comment - - edited Updated against trunk GeoTools 2.7-SNAPSHOT version and fixed broken test. This patch also works without modification on the current 2.6.x branch.
        Hide
        Björn Harrtell added a comment -
        Updated patch to include tests

        Fixed issue with extents not being parsed into layer
        Show
        Björn Harrtell added a comment - Updated patch to include tests Fixed issue with extents not being parsed into layer
        Hide
        Jody Garnett added a comment -
        Thanks Björn - going to accept this patch as provided (so you are not kept waiting). WMS 1.3.0 has just Dimension (ie Dimension now includes the values that were previously in Extent). I actually like that model a bit better since you can not really get by with only one.

        As you pointed out the JPL server already combines them (as if it was WMS 1.3.0) even though it is only saying it is a 1.1.1 capabilities document. So chances are we need to work on the parser a bit allowing it to account for reality.
        Show
        Jody Garnett added a comment - Thanks Björn - going to accept this patch as provided (so you are not kept waiting). WMS 1.3.0 has just Dimension (ie Dimension now includes the values that were previously in Extent). I actually like that model a bit better since you can not really get by with only one. As you pointed out the JPL server already combines them (as if it was WMS 1.3.0) even though it is only saying it is a 1.1.1 capabilities document. So chances are we need to work on the parser a bit allowing it to account for reality.
        Hide
        Jody Garnett added a comment -
        Marked as resolved; close if the fix will do for now; reopen if you would like to work on extent.
        Show
        Jody Garnett added a comment - Marked as resolved; close if the fix will do for now; reopen if you would like to work on extent.
        Hide
        Jody Garnett added a comment -
        Patches applied to trunk and 2.6.x -r35070 and -r35071
        Show
        Jody Garnett added a comment - Patches applied to trunk and 2.6.x -r35070 and -r35071
        Hide
        Björn Harrtell added a comment -
        Thanks Jody. It seems I cannot close the issue? Perhaps because I'm not the reporter? Anyhow I'm fine with closing it. If more work is to be done I can create a new ticket.

        PS. I took a chance and contacted the guy that was named in the JPL capabilities and pointed out the error. He fixed it within a couple of hours. :)
        Show
        Björn Harrtell added a comment - Thanks Jody. It seems I cannot close the issue? Perhaps because I'm not the reporter? Anyhow I'm fine with closing it. If more work is to be done I can create a new ticket. PS. I took a chance and contacted the guy that was named in the JPL capabilities and pointed out the error. He fixed it within a couple of hours. :)
        Hide
        Per Engstrom added a comment -
        Cool! First patch in trunk! Thank Björn for fixing tests and updating it. Thanks also to Per-Olof Noren who Did the work with me. Must try this out now!
        Show
        Per Engstrom added a comment - Cool! First patch in trunk! Thank Björn for fixing tests and updating it. Thanks also to Per-Olof Noren who Did the work with me. Must try this out now!
        Hide
        Jody Garnett added a comment -
        Indeed - thanks for the patch. I have just done my own QA run and committing now. My motivation was API breakage with resepct to Envelope vs CRSEnvelope?
        You will find I went over the caching code with an eye to treating it all in a consistent manner:
        - getLayerExtents() returns the extends defined by this layer (which I changed internally to be a simple list)
        - getExtents() populates a a cache using any dimension extents (changed your test case to account for this WMS 1.3.0 case) along with any extents contributed by any parent
        - went over the children array and converted it to a list; and added the pack pointer maintence so that child.getParent() and children.contains( child ) are symetric

        All in all a good time...
        - committed to 2.6.x as of r35073
        - committed to trunk as of -r35074

        Still that is a very positive first patch :-) This is an unsupported module (in that we lack resources to respond quickly to everything) but it is used and depended on by the uDig project that I work on. If any of you would like to join me in kicking this code in to shape please give me a shout :-)
        Show
        Jody Garnett added a comment - Indeed - thanks for the patch. I have just done my own QA run and committing now. My motivation was API breakage with resepct to Envelope vs CRSEnvelope? You will find I went over the caching code with an eye to treating it all in a consistent manner: - getLayerExtents() returns the extends defined by this layer (which I changed internally to be a simple list) - getExtents() populates a a cache using any dimension extents (changed your test case to account for this WMS 1.3.0 case) along with any extents contributed by any parent - went over the children array and converted it to a list; and added the pack pointer maintence so that child.getParent() and children.contains( child ) are symetric All in all a good time... - committed to 2.6.x as of r35073 - committed to trunk as of -r35074 Still that is a very positive first patch :-) This is an unsupported module (in that we lack resources to respond quickly to everything) but it is used and depended on by the uDig project that I work on. If any of you would like to join me in kicking this code in to shape please give me a shout :-)

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Per Engstrom
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: