User Tools

Site Tools


TGIS_IsochroneMap class

DK11 for Delphi | GisIsochroneMap.TGIS_IsochroneMap | Classes | Constructors | Methods | Properties

Network analysis tool for creating isochrone maps - for a given point finds the network area reachable within a given maximum network traversing cost.

Available also on: .NET | Java | ActiveX.


// Delphi
  TGIS_IsochroneMap = class( TGIS_BaseObjectDisposable )
// C++ Builder
class PASCALIMPLEMENTATION TGIS_IsochroneMap : public TGIS_BaseObjectDisposable


→ TObject → TGIS_BaseObjectDisposable


Inherited Overrides Protected
Name Visibility Description
Create public Creates an instance.
Create(IGIS_Viewer) public Creates an instance.


Inherited Overrides Protected
Name Visibility Description
Generate public Finds the network area reachable within a given cost and outputs the result to the destination layer as shape(s).


Inherited Protected
Name Visibility Description
OutputCostFieldName public Specifies the name of the attribute field which will be added to the destination layer.


For general information about isochrone maps see this article on Wikipedia.

TGIS_IsochroneMap uses topological network (TGIS_Network) for calculations (the same as TGIS_ShortestPath). If the network is not available for the analyzed layer then it will be created automatically. Depending on the size of the layer it may be a prolonged operation. Once created the network is saved into a set of files and can be reused.

The creation of an isochrone map can also be a time consuming operation for large and complicated networks and/or relatively big traversing cost.

Sample results from isochrone analyses:

Points Arcs Polygons Interpolation (splines)

Steps to achieve:

  • Points
    1. Use Generate() with TGIS_ShapePoint as the output type
    2. Colorize the layer by the cost field (GIS_COST by default)
  • Arcs
    1. Use Generate() with TGIS_ShapeArc as the output type
    2. Colorize the layer by the cost field (GIS_COST by default)
  • Polygons
    1. Use Generate() with TGIS_ShapePolygon as the output type
    2. Repeat above desired number of times decreasing the cost each time
    3. Colorize the layer by the cost field (GIS_COST by default)
  • Interpolation
    1. Use Generate() with TGIS_ShapePoint as an output type
    2. Use TGIS_InterpolationSplines to generate interpolated grid layer
    3. Colorize the grid layer



// GIS is TGIS_ViewerWnd
// simple LinkCostEvent handler which uses shape length as the network cost
// used during network creation process
procedure TForm1.doLinkCostEvent(
      _sender  : TObject ;
      _shape   : TGIS_ShapeArc ;
  var _cost    : Double ;
  var _revcost : Double
) ;
  if _shape.Layer.CS is TGIS_CSUnknownCoordinateSystem then
    _cost := _shape.Length
    _cost := _shape.LengthCS ;
  _revcost := _cost ;
end ;
// coordinates of _pt parameter must be in a layer projection
procedure TForm1.MakeIsochroneMap(
  const _pt : TGIS_Point
) ;
  sp  : TGIS_ShortestPath ;
  im  : TGIS_IsochroneMap ;
  ls  : TGIS_LayerVector ;
  lr  : TGIS_LayerVector ;
  cst : Double ;
  // get a layer for which an isochrone map will be created
  ls := TGIS_LayerVector( GIS.Get( 'Roads' ) ) ;
  // create a layer to store the isochrone map on
  lr := TGIS_LayerVector.Create ;
  lr.Name := 'Isochrone map for Roads' ;
  lr.CS := ls.CS ;
  lr.Open ;
  // maximum traversing cost for the isochrone map
  cst := 10.0 ;  
  im := TGIS_IsochroneMap.Create( GIS ) ;
    sp := TGIS_ShortestPath.Create( GIS ) ;
      sp.LinkCostEvent := doLinkCostEvent ;
      // generate the isochrone map
      im.Generate( ls, sp, lr, TGIS_ShapeType.Arc, _pt, cst, 0 ) ;
      FreeObject( sp ) ;
    end ;
    FreeObject( im ) ;
  end ;
  // add the layer with the isochrone map to the viewer
  GIS.Add( lr ) ;  
  // and update
  GIS.InvalidateWholeMap ;
end ;


2020/05/08 01:10

Page Tools