MapInfo Pro

 View Only

MapInfo Monday: Relating Incidents to Fire Stations

  • 1.  MapInfo Monday: Relating Incidents to Fire Stations

    Employee
    Posted 06-16-2025 03:00

    This is the second article based on our talk with Trevor Baldwin from Yorkshire Ambulance Service NHS Trust. In the first article, we looked into loading and mapping incident data.

    In this article, we will investigate one way to split the area that the ambulance service covers between the various locations of their service vehicles. This can be used for other use cases where you have some known locations and a catchment area.

    You can split your area into districts using Voronoi polygons to get a rough division. This will give you an overview of what area lies closest to which location – using a straight-line analysis. That's the method we will use in the article today.

    In a later article, we will use a more precise drivetime analysis to calculate drivetime zones around the locations.

    We start with the map below where you can see the area of interest, the locations, and the incidents for a given period.

    Note that the incident points are dummies and don't relate to real-life incidents.

    I use the term 'fire stations' to refer to the locations where emergency teams are based. You could also refer to these as emergency medical service (EMS) stations.
    Happy #MapInfoMonday!

    Create Voronoi Polygons around the Fire Stations

    Let's start by creating some rough areas for the individual fire stations. As mentioned above, we do this using Voronoi polygons.

    I start by making my layer Area of Interest editable. I then select the single polygon in that layer and set it as the target via the Set Target control on the Spatial tab. You can also use the shortcut Ctrl + T.

    This will make the Voronoi polygons we are about to create align with this polygon as the outer boundary and ensure the Voronoi polygons will cover the entire area. If I didn't set this polygon as the target, the Voronoi polygons would only cover an area equal to the minimum boundary rectangle of the ambulance locations.
    I initiate the Voronoi process from the Regions dropdown on the Spatial tab by clicking on the Voronoi (Table) control.

    In the Table Voronoi dialog, I select the Fire Stations table as my locations, and I set Store results in table: to <New>.

    In the New Table dialog, I select Add to Current Mapper and select to base the table structure of the new table on the Fire Stations table.

    In the New Table Structure dialog, I keep the columns from the Fire Stations table. I could remove some columns and also add additional columns. I could add a column to hold the number of incidents, as an example.
    And I give my table a name, Fire Station Voronoi, and I place it in the same folder as my Fire Station table.
    And finally, I specify how to move the data from the source table to the destination table. If you keep your existing table structure, MapInfo Pro will, by default, move the values to the new table. But check to ensure it looks fine.
    After a bit of processing, MapInfo Pro shows the Voronoi polygons on the original map.
    In the areas with many fire stations, the Voronoi polygons are smaller. In the less populated areas with fewer fire stations, the Voronoi polygons are bigger.
    As I wrote above, this gives you a rough estimate of the area for the individual fire stations, purely based on straight distances.
    You can read more about Voronoi polygons in this article: MapInfo Monday: Creating Voronoi Polygons from Points.

    Number of Incidents in the Voronoi Polygons

    As a final step today, we will analyze and visualize the count of incidents inside each of these Voronoi polygons. This will give us an idea of how busy the fire stations are.

    We will do this through a thematic map.

    From the Map tab, I click on Add Theme.

    In the Create Thematic Map – Step 1 of 3 dialog, I select Ranges as Thematic Type. I must now select a thematic template. Make sure that you select a template for regions.
    I click on the Next > button to continue.
    In the Create Thematic Map – Step 2 of 3 dialog, I select the table with the Voronoi polygons from the Table list, and from the Field list, I select the Join… option. This will allow me to join my Voronoi polygons with my incident data to count the number of incidents.
    In the Update Column for Thematic dialog, I start by selecting the table with incidents in the Get Value from Table list. In the Calculate list, I select Count as this will count the number of points for each polygon.
    Finally, I click the Join… button to ensure the join has been set correctly. In this case, we want the incidents to be within the Voronoi polygons

    Back in the Create Thematic Map – Step 2 of 3 dialog, you will now see a new temporary column in the Field list. The column will be named CountOf<some table name>, indicating that the values in this column have been calculated based on a different table.

    You can also add a new column to your table and update this column with the count before initiating the Add Theme process.

    In the dialog, I also check the Ignore Zeroes and Blanks option. This will keep the polygons with a value of zero out of the final thematic map.
    The Create Thematic Map – Step 3 of 3 dialog gives me a look at the result. I'll accept this without making any adjustments.
    The resulting map looks as you can see below. The darker the color, the more incidents.
    I can select the thematic layer and, via the Style tab, make it translucent so that I can better identify the areas with a high number of incidents.
    The map above shows an unweighted view of the incidents. You may consider weighting this by some scale. That can be the size of the stations, the size of the area, or even the population of the area.
    Let's weigh the incidents by the size of the Voronoi polygons.
    From the Theme tab, click on the Field dropdown and then select Expression… from this list. In the shown Expression dialog, change the existing expression to this:
    CountOfIncidents_2024_06/Area(Object, "sq km")
    You can use a different area unit than "sq km", like "sq mi", "Hectare" and more.
    The resulting map now shows the number of incidents per area unit in each of the Voronoi polygons.
    In this article, we looked at visualizing incidents related to very rough station areas created as Voronoi polygons around the stations. This gives some indications on the capacity needed for the individual stations.
    Next time, we will inspect how we create a more granular visualization of the incidents. We will analyze where the hot spots are for our incidents.
    Stay tuned for more!


    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------