COALA Back-end

POIs

Overview

The Points of Interest tab is where you can define all the specific real-world locations that you wish to appear or affect your world or app. It is important to note that unlike ProjectTags which are applied on Cells and therefore are defined in an area, POIs are a point in the real world and are only defined by their exact Longitude and Latitude values. For example, if your app has a map, you can define in this tab all the different types of locations you wish to be generated, such as bars, supermarkets, churches, etc. You can also define specific real-world contexts you wish to affect your generated POIs, such as weather conditions, Moon phases, or specific time windows. Should you require a Haunted Chapel to spawn near cemeteries, at night, during full moon and a thunderstorm, this is the place where you can configure this.

To define all these different POIs, no matter their complexity, you need to create POITags.

POITags

As explained above, POITags are practically specific points in the world defined by their coordinates and "become active" when their conditions are met. For example, creating a POITag with the condition "POITag_school" will create POIs wherever there is a school in the real world. Adding the condition "Weather: Rain" (with an AND logic, see below) to that same POITag will create the POIs at the same exact locations but only when it's raining. 

You can create as many POITags as you like and each POITag can have as many conditions as you deem necessary. 

All the existing POITags can be viewed in the list shown below. You can quickly find/filter the tags with keywords or sort them according to the method of your preference.

To visualize all the POITags you define in this section check out the Visualization tab.

Creating/Editing POITags - The Nodes Graph

Clicking on the + or any of the POITags will take you to the Nodes Graph where you can create new POITags or configure existing ones.

There are three major Node categories you can use on this Graph: 

Right-clicking anywhere inside the Nodes Graph will bring up the menu shown in the picture, through which you can add any type of new Node depending on how you wish to define the resulting POITag. 

To connect different Nodes simply draw/drag lines between Node Input/Output points as seen above.

All Nodes have a tooltip at their top-right corner which explains their functionality.

You can move round the screen by holding the left mouse button or zoom in/out using the mouse wheel. 

For organizational purposes, all of the Nodes can be freely moved around on this screen and you can group them by adding them in comment frames (from the right-click menu). 

To select multiple Nodes, hold the "Ctrl" key pressed down and click on the individual Nodes you wish to select. To remove Nodes, simply select them and press the "Delete" key on your keyboard.

Finally, can Undo and Redo from the buttons at the top-right corner of the screen and you can Save your changes and Return to the Contexts screen from the buttons at the top-left corner.

Layers

The Layer Nodes follow the Boolean Logic, meaning they return "True" to their Output only if their layering condition applies to the real-world context when a COALA request is made. So for example the Layer Node "Location: Water" will return "False" for every Cell that on land and the Layer Node "Time: 4:00 - 8:00" will only return "True" for COALA requests made between 4:00 and 8:00.

All POITags need at least one POI Layer Node in some way connected to the Result Node in order to have any functionality. This connection can be done directly from the Layer Node to the Result Node for simple POITags or through Operator Nodes if add more complexity is needed. 

Of course all of the Layer Nodes can only be used as Input, so they only have an Output point.

The different Layer types that can be added from the Right-click menu are:

Context and POI Layers

As seen in the picture above, all the layers related to some real-world context are colored orange, while the ones related to a POI are pink. In the POI Nodes Graph they have different functions: a POI layering condition is always needed for a POITag as this is how the GPS locations for all the desired POIs will be acquired (you can of course also use more than one POI Layer Node). If you use a context Layer Node as a condition for a POITag, then the resulting POIs will only "appear" when that context also applies. So for example, the POITag in the image on the right will only return the locations of Theater POIs that belong to Cells in a forest.

Operators

More complex POITags will have more than one Layer Nodes. In this case you need to combine these Layers and connect them to the Result Node through the Operator Nodes, which also follow the Boolean Logic. 

Each Operator Node has only one Output point which can be passed to other Operator Nodes or the POITag Result Node, but they can have as many Inputs as needed to create the desired logic.

The Nodes Graph offers four types of Operators to combine the different Layers:

The AND Node will return "True" to its output if all of its inputs have returned "True" while the NOT Node will return "True" if none of its inputs has returned "True".

The OR Node will return "True" to its output if at least one of its inputs has returned "True" while the XOR Node will return "True" if only one of its inputs has returned "True".

POITag Result

Each Nodes Graph can only have one POITag Result Node which cannot be deleted. In this Node you can select an existing POITag from the list, which will effectively update that POITag 's properties, or you can create a new POITag by manually typing a new entry. 

Naturally, this Node only has a single Input point. 

A POITag will only return the GPS locations of the resulting POIs when "True" is entered to its Input.

Merge Logic

There are many POIs which happen to cluster in certain areas (i.e. Restaurants) and you might want to automatically remove some of them in a given radius. You can achieve this using the “Merge Logic” feature, where you can set the rules according to which certain POIs will be ruled out.

By clicking on Define Merge Logic you can determine the radius in which you wish POIs to merged together.

In the image below, "POIs of the same type" practically means POIs with the same POITag (that you have defined in your project), while "POIs of any type" means any POIs regardless of POITag.

Checking the box under the column Ignore Merge next to a specific POITag will disable the defined merge logic for POIs produced by that POITag.

Custom POIs and Merge Logic

Custom POIs are not affected by merge logic by default. If you wish to use the merge logic for custom POIs, you can create a POITag using the custom POI Node in its graph so they are all grouped under that POITag. 

Please note that custom POIs used in this way will lose their payload.

Also note that if you group custom POIs in this way, you also want to disable custom data from your API request through the UE and Unity Plugins, otherwise those POIs will be included twice in the response.