GIS map generalization 

Because a map is smaller than the objects it represents, for a map to be readable its elements must be generalized (that is, simplified). Although the AnyLogic GIS map tile layer has such generalization built in, for some elements that you add to a map, such as routes or regions, you may need to manually configure their generalization settings. 

Depending on the generalization settings and how many points are used to display an object, when you run a model its GIS routes and the borders of its GIS regions may appear quite rough and jagged. Although increasing the number of points to display will bring an object closer to its real scale and make it appear smoother, this can also degrade the model’s performance speed.  

When you create routes or regions for a GIS map at design time, they have maximum precision. But just as it is not possible to display all the streets in every city when a map displays a country, at smaller map scales fewer points are displayed. If you zoom in on a map you will see that as more points are displayed a route or region becomes more detailed and less generalized. At design time, the generalization of routes and regions works the same way as the tile layer generalization.

The generalization settings for routes and regions are triggered when you run the model. Below you can see two figures displaying the same route with two different generalization settings. The first figure displays greater detail, but will slow down the model’s performance; moreover, agents following this route will rotate too often and make the animation look odd. The second figure provides a more acceptable level of detail.

An agent's travel time along a route does not depend on the generalization; rather, it depends only on the actual route length. Therefore, route generalization does not degrade accuracy in travel time. Generalization affects only the model’s animation and its performance.

Grasse-Toulon route created with generalization up to 100 meters 


The same route created with generalization up to 1000 meters

To select the generalization type

  1. Select the GIS map shape in the graphical editor and go to its Properties view.
  2. Expand the Advanced section. There you will find the parameter called Routes and regions generalization uses.
  3. You can choose one of the two modes: Current map scale or Absolute precision (meters).
  4. In case you leave Current map scale selected, the precision of routes and regions on the map will be defined by the current scale of the map. When you run a model the more detailed it is, the more detailed will be its routes and regions (i.e. they will contain more points). Vice versa, if your map's scale is smaller, the rendering of routes and regions will be less precise.
  5. If you choose the Absolute precision option as the generalization rule, then routes and regions will be rendered with the precision you enter in the edit box next to this option. The default precision is 1000 meters.

Related topics

 GIS Tutorial

Defining routes for GIS map

Finding locations on a GIS map