DK 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.
// Delphi type TGIS_IsochroneMap = class( TGIS_BaseObjectDisposable ) end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_IsochroneMap : public TGIS_BaseObjectDisposable { };
Name | Visibility | Description | |
---|---|---|---|
Create | public | Creates an instance. | |
Create(IGIS_Viewer) | public | Creates an instance. | |
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). | |
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:
// 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 ) ; begin if _shape.Layer.CS is TGIS_CSUnknownCoordinateSystem then _cost := _shape.Length else _cost := _shape.LengthCS ; _revcost := _cost ; end ; // coordinates of _pt parameter must be in a layer projection procedure TForm1.MakeIsochroneMap( const _pt : TGIS_Point ) ; var sp : TGIS_ShortestPath ; im : TGIS_IsochroneMap ; ls : TGIS_LayerVector ; lr : TGIS_LayerVector ; cst : Double ; begin // 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 ) ; try sp := TGIS_ShortestPath.Create( GIS ) ; try sp.LinkCostEvent := doLinkCostEvent ; // generate the isochrone map im.Generate( ls, sp, lr, TGIS_ShapeType.Arc, _pt, cst, 0 ) ; finally FreeObject( sp ) ; end ; finally FreeObject( im ) ; end ; // add the layer with the isochrone map to the viewer GIS.Add( lr ) ; // and update GIS.InvalidateWholeMap ; end ;