The identify utility

“GetFeatureInfo is a WMS standard that allows one to retrieve information about features and coverages displayed in a map”

By default, when no other tool or widgets are active, the "Identify" tool will be active on all GeoNode maps. This utility identifies a location at the cursor position and when a click event is triggered it identifies all features which intersect that location and returns the feature information in the information panel. Multiple features may be returned, and users may cycle through the available features using the next and previous buttons within the feature information panel.

The GeoNode map application makes use of the Get Feature Info (GFI) service to perform this action. This is an OGC standard operation and is handled by the backend service, GeoServer, which queries the requested data and returns a response. Maps are often composed of various layers, and GetFeatureInfo can be instructed to return tailored feature descriptions for each layer, which may be of different types.

GetFeatureInfo generates output in various formats, including:

  • GML2, plain text
  • GeoJSON
  • HTML

The structure of how the response is shown can be customized through the attribute table or through GeoServer Get Feature info templates. GeoNode makes it easy for users to edit the way this information is returned for each layer by including a Dataset Attributes section in the metadata wizard, where users can define which attributes they wish to be included in the response and how they should be displayed.

You try:

Goal: Customize the identify tool response for a layer

  • Upload the layer data from the supplied exercise data to GeoNode
  • View the layer in a map. Click on any spatial feature on the map. Review the identify panel and the relevant feature attributes
  • Take note of the structure and style of the data available from the identify panel
  • Return to the layer details page. Click on Editing Tools and select the metadata wizard
  • Navigate to the Dataset Attributes section of the metadata wizard which displays the layer attributes
  • Change the display type of some attributes to match the options outlined in the exercise table below
  • Click Update to save the changes for the layer configuration
  • View the layer in a map again. Click on a map feature as you did at the start of the exercise

Note that the identify utility functions from within the map frame available within the layer details page, however, the information panel is significantly larger when used within a GeoNode map.

Advanced users can further customize the look of the identify panel by writing an HTML template by using the custom template switch in the metadata wizard.

Name Expectation

descrip

Display type - URL

images

Display type - Image

video

Display type - Video (mp4)

descrip

Label - Station Link

video

Label - Police in Action

More about viewing layer attributes

An attribute is a discrete element of non-spatial information about a geographic feature. Attributes improve the understanding of the properties of a geographic feature and facilitate geodata visualization, analysis, and the definition of relationships between features and other data. The attributes are usually stored within a table and each row in the table is typically linked to the feature by a unique identifier. When creating spatial features, the avaliable data types that can be created are often dependent on the data provider used i.e. PostgreSQL, Geopackage, and Esri Shapefile.

The main field types for attribute data include:

  • String/ Text: Alphanumeric character data, often defined with a specific character encoding and maximum field length
  • Numeric data: Decimal (float) and Integer (real) numbers are typically explicitly defined based n the expected values
  • Datetime: Temporal data type specifically for the management of date and time information
  • Blob: Binary large object data, which is the raw data for another data type such as media files, like images or video

In GeoNode, a text attribute may contain a URL, or links to other available resources. When these links refer to supported media types like videos and images, users can define how they are represented when the identify utility is used, as long as the application can access the resource. The default behavior is to just represent the links as normal data (i.e. the text value of the resource), but by using the customization options the GeoNode provides the system may be configured to display the field in additional ways, such as configuring the value as an interactive hyperlink or retrieving the resource directly for display in a supported format.

This functionality allows users to select features from a map interface and directly preview it's associated media content like images and video from within the information panel, providing an interactive user experience and reducing the need for users to navigate between resources.

Check your knowledge:

  1. Is it possible to only show a subset of the attributes when identifying features:

    1. No
    2. Yes
  2. If I wanted to view the identify results as a table I would:

    1. Ask the administrator to write new function to do this
    2. Use the custom templates and write some custom HTML to achieve this
    3. It is not possible to do this in the GeoNode
  3. Why would a user want to give an attribute name a new label:

    1. To showcase the powers of GeoNode
    2. To give meaningful decsription for attribute columns.

Further reading:

Download the sample data for the lesson.