Dimension

Dimension

Gives the user the ability to filter data displayed in map and table view (only Wms dimension) based on time (Time) or other attributes (WMS dimension).

Time dimension

Allows the user to make the selection of a theme using a “slider” in the map. When the user activates an issue that has time dimension shows up a slider at the bottom of the map that the user can use to extract data from a specified time.

Time dimension is supported only for PostGIS based theme. The theme must have a date column that contains dates or times as it is about the user to make selections from.

Navn Description
Time dimension field column that contains date or time that indicates time. Date column must be of type date or timestamp without timezone (note that timestamp with timezone is not supported!).
Default value Here, but choose what time that will be default. This default value is used if the topic is presented without a date is set for the URL. In map client hour suffering is always last time used as default. This is suitable where there is a data set that dynamically receive new data.
Show timeslider One must check here that the topic should be controlled via time slider in Adaptive. If one wants to create a theme that supports dimension, but does not want to show time slider in adaptive client can do that by turning off the checkbox “showtime slider.” For example. applicable on the subject should be used in external WMS.
Automatic update By ticking here will unique values ​​for time updated by indexing theme. This will be appropriate where the underlying data update with new values ​​in the database.

Time slider in Adaptive map client allows the user to move the position by dragging the yellow time marker. In addition, you can zoom in slider by using the mouse scroll wheel. One also has the opportunity to “play” time in slider by making choices in the extended menu. There you can put ‘step’, how far one should jump in time displacement, and “interval”, how long to display data before moving to the next stage.

Wms dimension / filter

Allows the user to filter a theme by selecting which values one wishes to display a set of attributes. To control filters for a theme you must add the gadget “Layer dimension / filter” in the current GUI. When a theme is turned on, the possible filters for this when presented in this module so the user can filter the data. This filter will filter both what you see on the chart and what appears in table view (data view).

Limitations

Wms dimension is supported only for PostGIS based theme. As of today, supported columns of data type text or integer. When it comes to textual values then there are some characters that have special meaning to map the engine and therefore can not be used in values in a selected column.

This applies to the following:

  • , -A comma is used as a delimiter
  • / -Slash used as interval delimiters
  • & – Used as a delimiter between URL parameters and will also create trouble in XML from GetCapabilities
Tip

To avoid these special characters in a column that is to be used as a filter column one can modify the query for the theme.
If the query is on the form:

SELECT * FROM table

If there is a column “original_value” with special charachters one can use PostgreSQL’s “replace” function and create a new modified column.
Example:

  • replace ,:
    SELECT *, replace(original_value, ',', ' and ') as modified_value FROM table
  • replace /:
    SELECT *, replace(original_value, '/', ' or ') as modified_value FROM table
  • replace &:
    SELECT *, replace(original_value, '&', ' and ') as modified_value FROM table

Name Description
Show dimension filter One must check here that the theme filter to appear in the module “Layer dimension / filter” when it is turned on.
Dimension group name Here you add a common name for several topics that share one or more identical filter columns. If you turn on several topics in Adaptive client that has the same group name here, these are collected in a “filter control” so that choices made for filtering will apply to any theme with common group name. Topics that have common group name can still have unique filters, and these will only filter the topic that has the selected filter column. NB! Topics that are grouped in this way may not have columns with the same name but with different values.
Tabell med oversikt over filter kolonner Table of filter columns Displays a tabular listing of filters that are set on a theme. To add a filter, click on “+” button at the right side table. To edit a existing filter select the appropriate row. To delete a filter, click on “-” button for current row.
Edit grid items in this form Form to edit some column filters.
Column name (required) Here you select the column you want to filter. The column must have the data type “text” or “integer”.
Default value (Optional) You can enter a default value that will be used if the parameter is not put in a call to the topic. This value will also be the default selected in the filter drop down in the filter module (but the theme will not be filtered before you click “Insert filter”).
Extent (Required) This lists love values ​​that can be used as filters against selected Column name. Listed values, separated by commas.Special characters which can not be used as part of a value is the following:

  • , – A comma is used as a delimiter
  • / – Slash used as interval delimiters
  • & – Used as a delimiter between URL parameters and will also create trouble in XML from GetCapabilities

Clicking Update extent from unique values ​​will all unique values ​​that exist in selected Column name is entered as a comma separated list. This means that all these values ​​are legitimate filter values. If a Dictionary theme is set up to the unique values ​​from Key column from the selected dictionary.

 

Extent can be set up with the following syntax:

  • value – A single value (text or integer)
  • value1,value2,value3,… – A list of multiple values ​​(text or integer)
  • min/max – An interval defined by a from and to value (only integer)
  • min1/max1,min2/max2,min3/max3,… -A list of comma-separated interval (only integer)
Automatic update (Optional) By checking here will unique values ​​for Extent updated by indexing theme. This will be appropriate where the underlying data update with new values ​​in the database. NB! manually typed values ​​will be overwritten by indexing.
Update extent from unique values Click here to retrieve possible values ​​for Extent of underlying data. Clicking UPDATE extent from unique values ​​will all unique values ​​that exist in selected Column name is entered as a comma separated list. This means that all these values ​​are legitimate filter values. If a Dictionary theme is set up to the unique values ​​from Key column from the selected dictionary.

 

Update extent from unique values By making choices here will be able to use an existing theme / code list values ​​for a filter. This can be useful where there is an “id” field in a theme and you have another topic that contains the “id” and “name” so that users can relate to names instead of id by filtration.

Example of use:

One has a dataset with a column “Artside.” This field contains integer values ​​that says something about art. In order for a user to filter the art, it is useful to know which species are behind a “Artside.” If one then sets up a theme, eg “Species”, which reads data from a table that has both “Artside” and “species name” you can use this as dictionary with the following configuration:
Dictionary theme: Species
Key column: Artside (or other id field corresponding to “Artside” column in the topic you want to filter)
Value column:species name (or other text fields that have a description of the species in question)

Dictionary theme (Required only when dictionary in use) Here you can choose a PostGIS themes to be used as dictionary.
Key column (Required only if dictionary in use) Values ​​found in the Key column are the actual values ​​that will be used to filter a theme. Unique values ​​of Extent will also be collected from this column when using dictionary.
Value column (Påkrevd kun om dictionary er i bruk) values ​​contained in the Value column is the descriptive text / name presented to users who want to filter a theme.

 

 

Filter module shown in Adaptive client could look like. In all cases where there is a list of possible filter values, these are displayed in a dropdown list. Here you can choose to filters on one or more values. If the list is long, you can start writing the value for suggestions that one can choose from. To activate the filter, click on Insert filter and to remove the filter, click on Remove Filter. If one has set a default value will see a button labeled Set default values set selected values to what is set as default in admin.

Del filter lenke (Admin)

Administrator users will get an extra choices under each filter group: Share filter link

This creates a URL to the solution that will turn on the filter for topics in the filter group at the start of Adaptive. The themes will be filtered, but not enabled, then there are other URL parameters to turn on the theme.

Example URL parameter filter:
– http://[rot url]/[gui navn eller uuid]?av_filter=%5B%7B%22t%22%3A24%2C%22f%22%3A%5B%7B%22k%22%3A%22kommunenr%22%2C%22v%22%3A%5B%220101%22%2C%220104%22%2C%220105%22%5D%7D%5D%7D%5D

The filter is located in the URL parameter av_filter. Filter value is URL encoded to ensure that values are not able to create problems for the URL.

Decoded see the value like this:

[{"t":24,"f":[{"k":"kommunenr","v":["0101","0104","0105"]}]}]

URL parameter is an array of filters that are constructed with the following structure:

[
{
	"t": "themeid 1",
	"f": [
		{
			"k": "kolonnenavn",
			"v": ["filter verdi 1", "filter verdi 2", "filter verdi 3"]
		}
	]
},
{
	"t": "themeid 2",
	"f": [
		{
			"k": "kolonnenavn",
			"v": ["filter verdi 1", "filter verdi 2", "filter verdi 3"]
		}
	]
}
]
Category: