M.App Enterprise Tutorials

Not sure on how to get started or looking for a workflow to get M.App Enterprise up and running. Tutorials provide step by instruction on some of the most common configurations and workflows to get M.App Enterprise configured up and running quickly.
Showing results for 
Search instead for 
Do you mean 

Build a Browser App to run a spatial Recipe

by ‎09-14-2018 06:47 AM - edited ‎02-07-2019 06:42 AM (6,639 Views)

Table of Contents:


This tutorial describes how to build a Browser Application with 2 panels:

  1. the first one to run a Spatial model using a Recipe Panel 
  2. the second one to see the result on a Map Panel

This implementation requires the new M.App Enterprise 2018 (16.5) release. The new release comes with an additional setup for the geoprocessing engine that must be installed on a dedicated server.


Geoprocessing server installation

The Geoprocessing engine must be installed on a Web Server that can communicate with the M.App Enterprise server. In particular we have two types of interactions:

  1. on the client side Applications must be able to call the Geoprocessing server to get the list of available Recipes, the list of operators, to store new Recipes and to run models. Thus, the client must be able to browse (over http/https) the Geoprocessing server.
  2. on the server side the Geoprocessing server must be able to reach the Warehouse folder to get and store inputs and outputs for the Recipes. Thus, the warehouse folder must be configured in M.App Enterprise as UNC path and the Geoprocessing server must be configured using a dedicated account who is able to browse that path.

 There are some software prerequisites that must be installed before proceeding with the setup:

  1. Java Runtime Environment: it is recommended the installation of the latest Java 8 64 bit release from Oracle download website.
  2. Windows Roles and Features (confirm any prerequisite needed for the following features):
    1. Role: Web Server
    2. Features: 
      1. selected by default
      2. Performance -> Dynamic Content Compression 
      3. Application Development -> .NET Extensibility 4.5, ASP.NET 4.5

When you have installed the prerequisite you can run the Geoprocessing 2018 setup what will list the packages you are going to install:



At the end of the installation you will be asked to run the configuration wizard in which you can keep the default settings (or refer to the installation document for more details and possibility of changes). The only step where to change the default settings is summarized below:



NOTE: At the end of the installation and configuration you MUST RESTART the server, even if the setup does not notify it..


For additional references and more detailed descriptions refer to the documents provided in the Release Information section.


Application server configuration


On the application server side you get now an additional step in the wizard to configure the Geoprocessing server endpoint. You should configure it like in the following picture:




Use case description

 The use case we are going to implement is an App to identify changes over time. We will use a model that takes 2 images (multispectral, 3 bands) as input from the 2 different periods of time. The Recipe will analyze the inputs and will create a new image as output that will then be displayed on the map for user inspection. The output is indeed a thematic raster with a specific color associated to the probability of change in the corresponding area (high probability of change is associated to a RED based range of colors).

As you can see from the preview below we have an area with construction sites, where the model is able to associate, with a good confidence, there have been changes over time.




Application preparation

In this section we will only mention the steps related to this specific type of Apps. If you need additional details on how to configure an App please refer to the main documentation or to more generic tutorials.

For this specific use case you will have to prepare a Legend with a couple of images ("before" and "after" Image; it is not mandatory to add them to the legend, we will use them just to compare the output of the process with those inputs) and OSM and a Map View with the following properties:

  • Legend: what you have already configured
  • EPSG: 3857
  • BBOX: overlaps the area of the 2 input images

The first step is to create a Browser App with 2 panels. The left panel will contain a Recipe template, the right one a Map panel (for the map you will also need a Legend and a MapView). The App configuration will look like this (drag&drop the panel templates to the corresponding sections):



For the Map panel you can click and select the existing MapView that contains the needed layers.

Clicking on the Recipe panel you will have the possibility to select an existing recipe or to create a new one (if it is the first time you use this panel template in your tenant you will have only the possibility of creating a new one).


select recipe.PNG


Click on "Create new" and you will get redirected to the Spatial Workshop user interface. 


Recipe definition

A Spatial Recipe is a model of interconnected operators that perform geospatial processing. 

The definition of the Recipe to analyze inputs and create information as output is done through the Spatial Workshop application. If you are familiar with ERDAS Imagine or GeoMedia, this is the transposition to the web of the Spatial Model Editor user interface. Spatial Workshop is an editing environment for creating algorithms by dragging and dropping spatial operators from the Operators list.

To get additional information about this application you can click on the Help button on the top right corner of the App.


In this particular case you can simply click on the Import button on the top bar and load the model definition attached to this article. You should get a result like the following:


spatial workshop.PNG


You can change the name or keep the existing one and then save it. The Recipe will be saved in your Tenant configuration and will then be available to be selected for any Application defined with Studio (in particular using the Recipe Panel template).

Looking at the model definition we can see 4 ports:

  • Input Before Image
  • Input After Image
  • Color Scheme (this is an optional parameter that can be used to transform the color scheme of the output raster)
  • Output Image

We will need the name Output Image in the app configuration to automate the display of the output raster on the map.


Finalizing the App

Going back to the App configuration we can click again on the Recipe Panel and now we are able to select the newly created Recipe and clicking Next on the top right corner we can define the details for the Recipe configuration.


select existing recipe recipe details


For each input you can already specify values (existing images, the color scheme and the folder for the output). If you check the Bound setting the user will not be able to change the port value (the port will be hidden running the App), otherwise, even if you preselect the values, the user will get the possibility of changing them.


NOTE: input and output files for Recipes will be contained in the M.App Enterprise Warehouse folder on the server side. They will be segregated by Tenant, so a Recipe in the Tenant 'A' will be able to use only files from the Tenant 'A' Warehouse. 


You can click on OK and you will get redirected on the main App configuration. Now we have to click on Customization (third tab of the left menu). The goal is to automatically add the output of the Spatial Recipe to the legend of the Map panel. To do this we have to add some Javascript code to both the Recipe Panel and the Map Panel.

Click on JS button for the Recipe Panel and in the left menu click on Code Examples, scroll down, find the Recipe Panel customization and drag&drop it in the central text area (JS of the Recipe). In the code itself you have to modify the OUTPUT_PORT_NAME text with the actual name of the port for the output image (in our case Output Image).

 recipe customization


For the Map Panel you have to drag&drop the Add WMS layer to the legend sample in the JS source code (no changes to the source code are required).


map customization.PNG


The App configuration is over.


Testing the App

In order to test the App you have to open the My Apps page for the tenant you have used so far and run the App. You can set as input parameters the 2 images that you have uploaded already to your M.App Enterprise Warehouse folder (for this specific tenant) and the same folder or a subfolder to store the output together with a desired name (the extension can be selected from the dropdown). You should get something similar to the following:


Change Detection App


You can now execute the model 


Model execution


end at the end you should get the output image added automatically to the legend and the map zoomed to its bbox:


Application Results


You can play with the resulting image in the legend switching it on/off to compare it with the original images (if you have added them to the legend in Studio) or changing the transparency. 

on ‎10-03-2018 09:12 AM

Hi, is it win2016 OS supported for geoprocessing server? (is it plan to support it soon?)


(I tried to install it on the machine, where M.App Enterprise (not any geoprocessing pre-release) 16.1 was installed correctly, and get IIS Version 7.0 or greater is required to install Microsoft WebFarm Framework;

IIS isinstalled on that machine)


Many thanks


on ‎10-03-2018 12:03 PM

Hi Jan,


as per system requirements only Windows 2012 R2 is currently supported. We will introduce support to Windows 2016 in a future release. The OS itself is already viable, but the Web Farm Framework is now part of ARR so we need to adapt the setup and wizard.




‎10-23-2018 06:27 AM - edited ‎10-23-2018 06:29 AM

Hey Stafano,


I testen the above workflow and it working good. However I created a new model where the output of the model are 2 shapefiles. How can I visualize those 2 shapefiles or at least can download the output of my model?


PS. The shapefile are created on the server, therefor the model is working properly.


Best Regards,


on ‎10-24-2018 12:55 AM

Hi Wim,


this is not currently supported out of the box. You can achieve something using a BIMap, there is a thread about this here.

Another possibility is to store the shapefile in the DB and use a WMS already prepared on the specific table.




on ‎12-05-2018 03:31 AM

Hi Stefano,


I tried the tutorial but in the step of "Create new recipe", it opens a new page but greyed as you see below,

Is there a way to debug?