Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • If the controltype is listbox then a dataset must be provided. This dataset will provide the values to be displayed in the listbox.
  • If the listbox dataset only contains 1 column then that column will supply both the label and the value, if it contains two values then the first column will supply the label and the second the value.
  • If a parameter contains another parameter then you are defining a cascading parameter, where setting the first sub-parameter will enable, and filter, the second parameter, and setting the second parameter will do the same for the third, etc.
  • In a cascading parameter all sub-parameters must be of listbox type, and the dataset should be set in the outer parameter, not the sub parameters.
  • In a cascading parameter only one level of nesting should be used.
  • In a cascading parameter the dataset should supply the columns for all of the parameters, and valuecolumn properties should be set for each sub-parameter, and labelcolumn should be also set for all parameters if a different label is to be displayed to the user.

Spatial operation types

By default Weave will use a spatial intersection operation when performing the comparison between the source and target geometries.
This can be changed by specifying a "spatialOperation" option in the config, see the example below.
The available options for the spatial operation setting are:

  • intersect - The geometries have at least one point in common
  • contains - One geometry contains another
  • disjoint - The geometries have no points in common
  • crosses - The geometries do more than touch, they actually overlap edges
  • touches - The geometries only touch edges and do not overlap in any way
  • within - One geometry is completely within another (no touching edges)

Examples

Code Block
xml
xml
linenumberstrue
<data:datadefinition id="dd_wards">
	<datasourcedataconnection datasource="datasource.main" table="WARDS" prefix="DISTINCT">
		<parameter name="name" column="WARD_NAME"/>
		<parameter name="code" column="WARD_CODE"/>
	</datasourcedataconnection>
</data:datadefinition>

<search:spatial id="property.byward">
	<displayname>by Ward Boundary</displayname>
	<description>Locate a property or properties by ward</description>
	<entity>property</entity>
	<sourceentity>ward</sourceentity>
	<parameter id="ward">
		<dataset>dd_wards</dataset>
		<label>Road Name</label>
		<controltype>listbox</controltype>
		<column>CODE</column>
		<valuecolumn>code</valuecolumn>
		<labelcolumn>name</labelcolumn>
	</parameter>
</search:spatial>
Code Block
xml
xml
titleSearch with buffer
linenumberstrue
<search:spatial id="property.byward">
	<displayname>by Ward Boundary</displayname>
	<description>Locate a property or properties by ward</description>
	<entity>property</entity>
	<sourceentity>ward</sourceentity>
	<parameter id="ward">
		<dataset>dd_wards</dataset>
		<label>Road Name</label>
		<controltype>listbox</controltype>
		<column>CODE</column>
		<valuecolumn>code</valuecolumn>
		<labelcolumn>name</labelcolumn>
	</parameter>
	<options:options>
		<!-- version 1.4.105 of com.cohga.server.search.database and earlier -->
		<buffer:distance>-10</buffer:distance>
		<!-- version 1.5.105 of com.cohga.server.search.database and later -->
		<buffer>-10</buffer>
		<bufferUnits>m</bufferUnits>
	</options:options>
</search:spatial>
Code Block
xml
xml
titleChanging the spatial operation type
linenumberstrue

<search:spatial id="property.byward">
	<displayname>by Ward Boundary</displayname>
	<description>Locate a property or properties by ward</description>
	<entity>property</entity>
	<sourceentity>ward</sourceentity>
	<parameter id="ward">
		<dataset>dd_wards</dataset>
		<label>Road Name</label>
		<controltype>listbox</controltype>
		<column>CODE</column>
		<valuecolumn>code</valuecolumn>
		<labelcolumn>name</labelcolumn>
	</parameter>
	<options:options>
		<spatialOperation>within</spatialOperation>
	</options:options>
</search:spatial>