OpenLayers OpenLayers

Ticket #1543 (closed task: fixed)

Opened 2 years ago

Last modified 2 years ago

add support for writing spatial filters in an SLD document

Reported by: bartvde Assigned to: crschmidt
Priority: major Milestone: 2.7 Release
Component: Format.GML Version: 2.6
Keywords: Cc:
State: Complete

Description

I need support for using BBOX, Intersects and DWithin spatial filters in an SLD document, but OL currently does not support this.

I'll try and come up with a patch implementing this.

Attachments

ticket1543.patch (6.3 kB) - added by bartvde on 05/08/08 09:22:19.
patch implementing spatial filters and writing them in SLD
spatial.patch (15.1 kB) - added by sbenthall on 08/01/08 17:01:13.
GML format, Spatial filter, tests
patch-GML-1543-r7944-A0.diff (10.7 kB) - added by elemoine on 09/04/08 05:33:01.
patch-Spatial-1543-r7944-A0.diff (7.0 kB) - added by elemoine on 09/04/08 05:33:11.
gml.patch (4.7 kB) - added by tschaub on 09/04/08 16:34:57.
add support for gml.buildGeometryNode(bounds)

Change History

05/08/08 09:22:19 changed by bartvde

  • attachment ticket1543.patch added.

patch implementing spatial filters and writing them in SLD

05/08/08 09:23:36 changed by bartvde

  • keywords set to review.

The Trac view of the patch does not show all files affected (download in original format does).

Would be great if someone could review this sometime.

05/08/08 09:28:31 changed by bartvde

One thing I did not like is that I had to use an OpenLayers.Geometry.Rectangle (which is about to be deprecated) to represent a gml:Box. The comments state one should use a OpenLayers.Bounds.toGeometry() which will yield a Polygon, but in that case I think we would need a utility function on a Polygon to see if it is a rectangle or not, to represent it in its right GML form.

Also, is it necessary to create OpenLayers.Format.GML objects like I do now to serialize the geometries, or can we inherit Format.SLD from Format.GML?

05/14/08 06:51:01 changed by bartvde

  • keywords deleted.
  • state set to Review.

05/14/08 08:07:48 changed by bartvde

  • milestone set to 2.7 Release.

07/28/08 14:16:54 changed by euzuro

  • priority changed from minor to critical.

07/30/08 09:50:56 changed by euzuro

  • state changed from Review to Needs More Work.

07/30/08 09:59:53 changed by euzuro

  • priority changed from critical to major.

07/31/08 15:21:39 changed by tschaub

As suggested above, we should deal in OpenLayers.Bounds instead of OpenLayers.Geometry.Rectangle.

07/31/08 17:22:56 changed by sbenthall

  • owner changed from tschaub to sbenthall.

07/31/08 18:38:13 changed by tschaub

With r7651, filter parsing is handled by a filter format. The readers and writers associated with spatial filters should be put on the filter format.

08/01/08 09:17:53 changed by sbenthall

  • status changed from new to assigned.

08/01/08 17:01:13 changed by sbenthall

  • attachment spatial.patch added.

GML format, Spatial filter, tests

08/01/08 17:03:44 changed by sbenthall

  • owner changed from sbenthall to crschmidt.
  • status changed from assigned to new.
  • state changed from Needs More Work to Review.
  • component changed from Format.SLD to Format.GML.

Patch uses bounds and not rectangle. Has some tests.

The problem is that nobody has gotten around to implementing the Spatial filter's evaluate function yet. If we think we need that to make it worth bothering to include the Spatial filter in the trunk, then I guess this needs more work. Otherwise, it's good to go, as far as I know.

08/02/08 11:59:50 changed by crschmidt

  • state changed from Review to Needs More Work.

Patch doesn't work in Safari. It seems that the bounds/box reading/writing code never gets called. I don't know why.

08/26/08 02:58:36 changed by euzuro

  • milestone changed from 2.7 Release to 2.8 Release.

lack of activity

09/04/08 03:23:16 changed by elemoine

  • milestone changed from 2.8 Release to 2.7 Release.

the bbox strategy patch (#1648) depends on the spatial filter patch, moving this back to 2.7

09/04/08 05:33:01 changed by elemoine

  • attachment patch-GML-1543-r7944-A0.diff added.

09/04/08 05:33:11 changed by elemoine

  • attachment patch-Spatial-1543-r7944-A0.diff added.

09/04/08 05:38:01 changed by elemoine

  • state changed from Needs More Work to Review.

I splitted sbenthall's patch into two. See patch-GML-1543-r7944-A0.diff and patch-Spatial-1543-r7944-A0.diff. The formet is for the GML format, and the later for the spatial filter. The spatial filter patch now includes an evaluate method and corresponding tests. The GML format is sbenthall's, it's untouched. The spatial filter patch is ready for review, I'll let sbenthall judge about the state of the GML format patch.

09/04/08 15:25:34 changed by tschaub

See #1719 for the patch that adds OpenLayers.Filter.Spatial.

09/04/08 15:46:00 changed by tschaub

The writing part of this got in with r7651. This means that when #1719 is closed, spatial filters will get written by the filter format (which the sld format uses).

The missing piece is the change to the GML format that writes bounds.

09/04/08 16:34:57 changed by tschaub

  • attachment gml.patch added.

add support for gml.buildGeometryNode(bounds)

09/04/08 16:41:17 changed by tschaub

More details on this mess:

  • With r7651 we got an OpenLayers.Format.Filter with support for *writing* spatial filters.
  • With r7952 we got an OpenLayers.Filter.Spatial that gave us support for *creating* spatial filters.

With the above two changes, the GML format bombed when calling filter.write with a spatial filter - because gml.buildGeometryNode didn't work with bounds objects.

This latest patch is extracted from all of the above to add *just* support for writing bounds with gml.buildGeometryNode (the function that the filter format uses).

With this patch, the subject of this ticket is addressed: we get support for writing spatial filters in an SLD document.

Thanks Eric for teasing apart some of the above attachments.

09/04/08 16:42:09 changed by tschaub

Note that nothing here mentions *read* support.

09/04/08 16:44:52 changed by tschaub

  • status changed from new to closed.
  • state changed from Review to Complete.
  • resolution set to fixed.

(In [7955]) Adding support to the gml parser for serializing OpenLayers.Bounds as gml:Box. This gives the filter format (and the sld format) the ability to write spatial filters (that have bounds as a value). r=me (closes #1543)