How To Create simulations in Mapify
Mapify Simulations is one of Mapify’s standout features, enabling you to simulate data that would typically arrive in Mapify through sensors or APIs. This feature allows you to thoroughly test your solutions in advance.
We have a Data Feed ready to receive simulated data about a vehicle's position along a pre-designed path. We’re going to create a geofencing use case, cross-referencing the vehicle's position on the map with geofenced areas.
The Data Feed can receive data via MQTT or Mapify’s API, and the schema is already defined. This means we know the expected format of the messages. For example, vehicle_id, vehicle_type, speed, and location.
Now, let’s head over to the Simulations tab to start our geofencing simulation. Create a new one named “simulate-vehicle,” select the corresponding Data Feed, and set up when it should stop receiving messages.
Next, we have access to the schema, and we can now define specific values for each property. Click the plus button to create a new variable named “sim_speed” with an interval between 0 and 55 KM/H.
To use the simulated variable, we use this specific annotation. Click “Show Sample” to test a random sample of the speed value between 0 and 55. We got 49, so it’s okay.
Now we’re missing the coordinates, so we will create a new variable for that as well. Create a variable named “Sim_coordinates,” select the geometry field type, and since we want to simulate the vehicle along a path, choose “along line.”
For our geofencing scenario, load the layer “Geofencing - Restricted Zones.” Finally, click the button to draw and draw the desired path for the simulation. Replace the expression yet again and test a sample. Now, we’re ready to proceed with the simulation.
Click “Start Simulation” and pay attention to all the messages being sent. On the Mapify App, observe the vehicle moving along the simulated path.
Try Mapify now for free, and start building your own location intelligence apps today 👉 Try now