Tutorial 1 : Explore Weave & a Weave Client

This first tutorial will take a look at an existing Weave implementation in action. You will be introduced to a simple Weave web client, and the Weave engines that sit behind it via use of the Weave Administration tools.

An Example Weave Client

In order to access the Weave system, and an example Weave client, Weave must first be started.

  • Start Weave by double clicking the following file, found within the the Weave file system** :
    c:\weave\startup.cmd
    This will start a command window, which will take a few moments to run through. You will know Weave has started when the command window resembles the following :

    • **Conversely, if you wish to shutdown the Weave system the
      shutdown.cmd file, found beneath the c:\weave directory may be used

  • Launch a Weave client by opening a browser and going to the following URL :
    http://localhost:8080/weave/WeaveClient.html
    This will display a Weave web client, with various controls, a table of contents listing of layers and a map :

  • Note the map navigation controls on the toolbar above the map :

  • Move the mouse over the controls and note the tool available tooltips which advise of the function of each tool.

  • Experiment with these controls by zooming in to the CBD area of Melbourne, and panning the display.

  • Note the table of contents on the left of the display :

  • The table of contents contains 3 listings of data available on the map :

    • Selections - for displaying selected features (Useful when there are selections in the map)

    • Vector Layers -which may be opened to show the available vector layers

    • OpenStreetMap - for displaying an Open Street Map basemap layer

  • Experiment by turning available layers on/off

    • Note : the Vector Layers listing needs to be opened by clicking the + to its left, in order to see the available vector layers : Properties, Drain Pipes, Trees, and Parking Bays

  • Use the Identify control to click on an property feature and return listed information :

Presently the Active Layer is set to Properties, therefore the Identify control returns information for the Properties layer. Switching the Active Layer to another layer, for example Drain Pipes, will allow you to return information about a clicked Drain Pipe, with the Identify control.


For the subject Weave client, the vector layers are stored within a GeoPackage file - a compressed file , that is able to store multiple spatial data layers. Whilst the OpenStreetMap layer is accessing the OpenStreetMap map service.

We will now use the Weave Administration Tools to check the map engines, spatial engines and data engines used by the subject Weave web client.

The Weave Administration Tool

The Weave Administration Tool is a web based application accessed via the URL :

<hostname or IP address>:<port>/weave/admin.html

Thus, for the training implementation, where Weave is running locally, the following URL is used :

The Administration (“Admin”) Tool, pictured below, contains various tools for reviewing the existing Weave implementation, and also reviewing and editing the configuration files that have been used to set up available Weave clients.

As you familiarise yourself with Weave, and develop skills in building a Weave web client, you will find the Weave Admin toolset useful. Below are a number of Admin tools that are of note when you are getting started understanding the Weave system

a) Map Engines, Spatial Engines and Data Sources

There are 3 separate tools used for listing properties of configured Map Engines, Spatial Engines and Data Engines :

  • Open the Map Engines Tool and observe the configured Map Engines - they are named mapengine.osm and vector

A “configured“ map engine is a map engine that has been defined with XML code, within a Weave web client. Map engines are configured in Tutorial 2.2 of this course.

  • Since the vector map engine has been configured to access data within the Geopackage file, clicking the vector reference will display the list of layers that have been defined for the vector map engine :

    Further, when a layer is clicked on in the Map Engines tool, the layer’s relevant properties are displayed:

  • Similarly, properties of both the configured Data Engines , and the configured Spatial Engines may be accessed via the Data Sources tool and the Spatial Engines tool, respectively.

    • Open each of these tools and observe the listed content.
      The Spatial Engines tool lists available layers in the defined spatial engines;
      The Data Sources tool lists the tables associated with each layer. Additionally, for standalone tables referenced by the configuration files, they would also be listed within the Data Sources tool.

Note : Listings must be clicked in order to display available information :

Information displayed in the Map Engines, Data Sources and Spatial Engines tool is useful when it comes to troubleshooting unexpected behaviour, or, to simply be able to visualise the content of the subject data being accessed.

b) Log Tool

The log tool is used to display Weave logging messages, as the system starts, and as Weave clients run. It is therefore useful for troubleshooting purposes as the reason behind any unexpected behaviour will likely be displayed in the log of messages.

It is possible to filter the type of log messages displayed in the log window, by using the checkboxes :
Error, Info Warnings and Debug.

  • Open the Log Tool and scroll up and down through the messages - Note, you will need to scroll to the bottom to see the most recently occurring messages.

  • Switch to the command window that was initiated when Weave started :

…. this window also displays Weave’s log messages, and, like the Log Tool window, is useful to quickly review Weave log output when troubleshooting.

Weave log information is only output to the console when Weave is started from the command prompt, as it was for this training; When Weave is running as a service, the log information is written to a file within the Weave file system : ….\weave\logs\weave.log

c) Support Tool

The Support Tool takes a snapshot of the subject Weave file system, including log file information, and writes it to a support.zip file, in the Downloads area of the file system.

It is useful to generate such a file if you are seeing unexpected behaviour in Weave, as the support.zip file provides a complete “picture“ of your Weave install, its configurations and settings.
- You could then lodge a Weave support request (at support.cohga.com), with the accompanying support.zip file attached.

d) Console Tool

The Console Tool opens a console window within which various Weave commands may be entered. From the perspective of configuring a Weave client, it is useful for generating XML that defines referenced data sources. - For example, it can be used to list tables within a database, and generate an XML representation of this.
The Console tool will be used at a number of points throughout this training course, to generate required XML.

e) File System Tool

The File System tool displays the file system in a similar fashion to Windows Explorer, however it uses the subject Weave installation as its top level in the available file hierarchy.

Double-clicking a file will cause that file to open. It will then be available to edit. Files may also be downloaded from, or uploaded to, the file system, using the controls along the lower boundary of the File System Tool window.

Documentation

There are various online help references available, ranging from a User Guide, to an Administrators guide. A helpful web page that provides a link to them all is here : https://cohgawiki.atlassian.net/wiki/spaces/LAN/pages/23560252

In terms, of the focus of this course, which is centred around configuring a Weave web client, the pages found beneath the Configuration Reference will be the most relevant, as this area of the help system documents the XML requirements for the various items* that you will define in your configuration files.

(*Item examples include Map Engines, Table of Contents, Data definitions, available toolsets (ie. “Client Actions”), Search definitions ….etc.)

Review Questions

Ans : Map Engine, Data Engine, Spatial Engine.

Ans : startup.cmd and shutdown.cmd; Each of these files are found beneath the top level weave directory.

Ans : To communicate with a nominated map server and source a map image

Ans : To communicate with a nominated relational database to return source data from nominated tables. These tables may be spatial or aspatial

Ans: False

Prepare to Build Your Own Weave Client

A basic Weave client is included within the Weave configuration files that were supplied as part of this training course. However, the tutorials that follow this first tutorial require you to build your own Weave configuration files, therefore the following list of Weave configuration files need to be deleted :

../platform/workspace/config.xml

../platform/workspace/config/client_main.xml

../platform/workspace/config/data.xml

../platform/workspace/config/datasource.xml

../platform/workspace/config/entity.xml

../platform/workspace/config/map_engine.xml

../platform/workspace/config/search.xml

../platform/workspace/config/spatial_engine.xml

../platform/workspace/config/toc.xml

 

Use the File System Tool to delete the above files, as demonstrated in the below screen recording :