hale»studio: Making Best Use of Advanced Functions

hale»studio: Making Best Use of Advanced Functions

General Interest hale»studio Tutorial

After last week's focus on Groovy, today we will take a closer look on other advanced functions and functionalities of hale»studio that often get overlooked but provide great value.
Making good use of these functionalities can help you on your way to becoming a more efficient hale»studio power user.

For the remainder of this article it's assumed that you have working knowledge of hale studio and are familiar with its terminology.
For a primer on hale studio concepts, please refer to the online help.

Synchronize Schema Explorer and Alignment View

In large and complex source and/or target schemas, it can become difficult to find a specific source type or attribute.
If you have the type or attribute relation open in the Alignment view, the button "Synchronise with cell selection" (highlighted in the screenshot below) can simplify navigation.
When active, hale studio will jump to the source and target types or attributes of the selected mapping in the Schema Explorer.

hale»studio button synchronise with cell selection

Spatial Join

An advanced feature of hale studio is its ability to join objects of your source dataset based on the spatial relationship of their geometries with the Spatial Join transformation function.
In contrast, the regular Join is limited to the equality of textual attributes.
For the comparison of geometries, Spatial Join supports all modes of the Dimensionally Extended nine-Intersection Model: contains, covered by, covers, crosses, equals, intersects, overlaps, touches, and within.

hale»studio Spatial Join example

Internally, Spatial Join is powered by a spatial index that is built when hale studio imports the source data.
You can leverage the spatial index in your own Groovy scripts via the helper functions _.geom.spatialIndexQuery and _.geom.boundaryCovers.
Make sure to check out our previous post on the subject if you would like to learn more about using the spatial index in Groovy scripts!

Filtering Data with Contexts

In hale studio, a context on a schema element can be used to restrict the element to certain instances or property values.
After setting a context on a schema element, the effect of mapping cells defined on that element is limited to the instances or property values that match the context condition.

A special type of context is the index context that can be used in cases where the order of elements in the source instance conveys a special meaning.
In the example below, the information on the language of a name is given implicitly through the order in which the names appear.
The first name is in German, the second name is in English, and the third one is in Italian.

hale»studio index context example

More information about contexts is available in the hale studio help.
There you can also find a tutorial on how to create contexts.

Make the Most of the Map View

The Map view of hale studio provides you with a cartographic representation of both source and transformed data.
Both can be displayed alongside each other, with different layouts to choose from.
An often overlooked feature of the Map view is that you can select geometries by clicking on them and then inspect the properties of the corresponding object in the data view.
You can also select multiple instances, just hold the Ctrl key when you click.
Selected instances are highlighted in red, as can be seen in the screenshot below.

hale»studio Map view with geometry selected and highlighted

You can find the data views for source and transformed instances directly beneath the map.
To show the properties of the objects selected in the map, activate the Use instances selected in the application mode in the upper left corner of the data view.

Vice versa you can also filter the data view and highlight the geometries of the filtered instances in the map.
To do that, first activate the Random/filtered source data instances mode in the data view (upper left corner), then enter the desired filter expression and finally activate the globe button in the upper right corner of the data view.
In the screenshot below, the source objects were filtered for a specific value of the bodenart property.
The geometries of the filtered objects are highlighted in red in the map.

hale»studio Map view with the geometries of filtered objects highlighted

Happy transforming!