Skip to content

/AWS1/IF_GER=>CALCULATEISOLINES()

About CalculateIsolines

Calculates areas that can be reached within specified time or distance thresholds from a given point. For example, you can use this operation to determine the area within a 30-minute drive of a store location, find neighborhoods within walking distance of a school, or identify delivery zones based on drive time.

Isolines (also known as isochrones for time-based calculations) are useful for various applications including:

  • Service area visualization - Show customers the area you can serve within promised delivery times

  • Site selection - Analyze potential business locations based on population within travel distance

  • Site selection - Determine areas that can be reached within specified response times

Route preferences such as avoiding toll roads or ferries are treated as preferences rather than absolute restrictions. If a viable route cannot be calculated while honoring all preferences, some may be ignored.

For more information, see Calculate isolines in the Amazon Location Service Developer Guide.

Method Signature

METHODS /AWS1/IF_GER~CALCULATEISOLINES
  IMPORTING
    !IO_ALLOW TYPE REF TO /AWS1/CL_GERISOLINEALLOWOPTS OPTIONAL
    !IV_ARRIVALTIME TYPE /AWS1/GERTSMPWITHTIMEZONEOFF OPTIONAL
    !IO_AVOID TYPE REF TO /AWS1/CL_GERISOLINEAVOIDANCE00 OPTIONAL
    !IV_DEPARTNOW TYPE /AWS1/GERSENSITIVEBOOLEAN OPTIONAL
    !IV_DEPARTURETIME TYPE /AWS1/GERTSMPWITHTIMEZONEOFF OPTIONAL
    !IT_DESTINATION TYPE /AWS1/CL_GERPOSITION_W=>TT_POSITION OPTIONAL
    !IO_DESTINATIONOPTIONS TYPE REF TO /AWS1/CL_GERISOLINEDSTOPTIONS OPTIONAL
    !IV_ISOLINEGEOMETRYFORMAT TYPE /AWS1/GERGEOMETRYFORMAT OPTIONAL
    !IO_ISOLINEGRANULARITY TYPE REF TO /AWS1/CL_GERISOLINEGRANULARI00 OPTIONAL
    !IV_KEY TYPE /AWS1/GERAPIKEY OPTIONAL
    !IV_OPTIMIZEISOLINEFOR TYPE /AWS1/GERISOLINEOPTIMIZATION00 OPTIONAL
    !IV_OPTIMIZEROUTINGFOR TYPE /AWS1/GERROUTINGOBJECTIVE OPTIONAL
    !IT_ORIGIN TYPE /AWS1/CL_GERPOSITION_W=>TT_POSITION OPTIONAL
    !IO_ORIGINOPTIONS TYPE REF TO /AWS1/CL_GERISOLINEORIGINOPTS OPTIONAL
    !IO_THRESHOLDS TYPE REF TO /AWS1/CL_GERISOLINETHRESHOLDS OPTIONAL
    !IO_TRAFFIC TYPE REF TO /AWS1/CL_GERISOLINETRAFFICOPTS OPTIONAL
    !IV_TRAVELMODE TYPE /AWS1/GERISOLINETRAVELMODE OPTIONAL
    !IO_TRAVELMODEOPTIONS TYPE REF TO /AWS1/CL_GERISOLINETRAVELMDE00 OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gercalculateisoline01
  RAISING
    /AWS1/CX_GERACCESSDENIEDEX
    /AWS1/CX_GERINTERNALSERVEREX
    /AWS1/CX_GERTHROTTLINGEX
    /AWS1/CX_GERVALIDATIONEX
    /AWS1/CX_GERCLIENTEXC
    /AWS1/CX_GERSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

io_thresholds TYPE REF TO /AWS1/CL_GERISOLINETHRESHOLDS /AWS1/CL_GERISOLINETHRESHOLDS

The distance or time thresholds used to determine reachable areas. You can specify up to five thresholds (which all must be the same type) to calculate multiple isolines in a single request. For example, to determine the areas that are reachable within 10 and 20 minutes of the origin, specify time thresholds of 600 and 1200 seconds.

You incur a calculation charge for each threshold. Using a large number of thresholds in a request can lead to unexpected charges. For more information, see Routes pricing in the Amazon Location Service Developer Guide.

Optional arguments:

io_allow TYPE REF TO /AWS1/CL_GERISOLINEALLOWOPTS /AWS1/CL_GERISOLINEALLOWOPTS

Enables special road types or features that should be considered for routing even if they might be restricted by default for the selected travel mode. These include high-occupancy vehicle and toll lanes.

iv_arrivaltime TYPE /AWS1/GERTSMPWITHTIMEZONEOFF /AWS1/GERTSMPWITHTIMEZONEOFF

Determine areas from which Destination can be reached by this time, taking into account predicted traffic conditions and working backward to account for congestion patterns. This attribute cannot be used together with DepartureTime or DepartNow. Specified as an ISO-8601 timestamp with timezone offset.

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

io_avoid TYPE REF TO /AWS1/CL_GERISOLINEAVOIDANCE00 /AWS1/CL_GERISOLINEAVOIDANCE00

Specifies road types, features, or areas to avoid (if possible) when calculating reachable areas. These are treated as preferences rather than strict constraints—if a route cannot be calculated without using an avoided feature, that avoidance preference may be ignored.

iv_departnow TYPE /AWS1/GERSENSITIVEBOOLEAN /AWS1/GERSENSITIVEBOOLEAN

When true, uses the current time as the departure time and takes current traffic conditions into account. This attribute cannot be used together with DepartureTime or ArrivalTime.

iv_departuretime TYPE /AWS1/GERTSMPWITHTIMEZONEOFF /AWS1/GERTSMPWITHTIMEZONEOFF

Determine areas that can be reached when departing at this time, taking into account predicted traffic conditions. This attribute cannot be used together with ArrivalTime or DepartNow. Specified as an ISO-8601 timestamp with timezone offset.

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm

Examples:

2020-04-22T17:57:24Z

2020-04-22T17:57:24+02:00

it_destination TYPE /AWS1/CL_GERPOSITION_W=>TT_POSITION TT_POSITION

An optional destination point, specified as [longitude, latitude] coordinates. When provided, the service calculates areas from which this destination can be reached within the specified thresholds. This reverses the usual isoline calculation to show areas that could reach your location, rather than areas you could reach from your location. Either Origin or Destination must be provided.

io_destinationoptions TYPE REF TO /AWS1/CL_GERISOLINEDSTOPTIONS /AWS1/CL_GERISOLINEDSTOPTIONS

Options that control how the destination point is matched to the road network and how routes can approach it. These options help improve travel time accuracy by accounting for real-world access to the destination.

iv_isolinegeometryformat TYPE /AWS1/GERGEOMETRYFORMAT /AWS1/GERGEOMETRYFORMAT

The format of the returned IsolineGeometry.

Default value:FlexiblePolyline

io_isolinegranularity TYPE REF TO /AWS1/CL_GERISOLINEGRANULARI00 /AWS1/CL_GERISOLINEGRANULARI00

Controls the detail level of the generated isolines. Higher granularity produces smoother shapes but requires more processing time and results in larger responses.

iv_key TYPE /AWS1/GERAPIKEY /AWS1/GERAPIKEY

An Amazon Location Service API Key with access to this action. If omitted, the request must be signed using Signature Version 4.

iv_optimizeisolinefor TYPE /AWS1/GERISOLINEOPTIMIZATION00 /AWS1/GERISOLINEOPTIMIZATION00

Controls the trade-off between calculation speed and isoline precision. Choose FastCalculation for quicker results with less detail, AccurateCalculation for more precise results, or BalancedCalculation for a middle ground.

Default value: BalancedCalculation

iv_optimizeroutingfor TYPE /AWS1/GERROUTINGOBJECTIVE /AWS1/GERROUTINGOBJECTIVE

Determines whether routes prioritize shortest travel time (FastestRoute) or shortest physical distance (ShortestRoute) when calculating reachable areas.

Default value: FastestRoute

it_origin TYPE /AWS1/CL_GERPOSITION_W=>TT_POSITION TT_POSITION

The starting point for isoline calculations, specified as [longitude, latitude] coordinates. For example, this could be a store location, service center, or any point from which you want to calculate reachable areas. Either Origin or Destination must be provided.

io_originoptions TYPE REF TO /AWS1/CL_GERISOLINEORIGINOPTS /AWS1/CL_GERISOLINEORIGINOPTS

Options that control how the origin point is matched to the road network and how routes can depart from it. These options help improve travel time accuracy by accounting for real-world access from the origin.

io_traffic TYPE REF TO /AWS1/CL_GERISOLINETRAFFICOPTS /AWS1/CL_GERISOLINETRAFFICOPTS

Configures how real-time and historical traffic data affects isoline calculations. Traffic patterns can significantly impact reachable areas, especially during peak hours.

iv_travelmode TYPE /AWS1/GERISOLINETRAVELMODE /AWS1/GERISOLINETRAVELMODE

The mode of transportation to use for calculations. This affects which road types or features can be used, estimated speed, and the traffic levels that are applied.

  • Car—Standard passenger vehicle routing using roads accessible to cars

  • Pedestrian—Walking routes using pedestrian paths, sidewalks, and crossings

  • Scooter—Light two-wheeled vehicle routing using roads and paths accessible to scooters

  • Truck—Commercial truck routing considering vehicle dimensions, weight restrictions, and hazardous material regulations

The mode Scooter also applies to motorcycles; set this to Scooter when calculating isolines for motorcycles.

Default value: Car

io_travelmodeoptions TYPE REF TO /AWS1/CL_GERISOLINETRAVELMDE00 /AWS1/CL_GERISOLINETRAVELMDE00

Additional attributes that refine how reachable areas are calculated based on specific vehicle characteristics. These options help produce more accurate results by accounting for real-world constraints and capabilities.

For example:

  • For trucks (Truck), specify dimensions, weight limits, and hazardous cargo restrictions to ensure isolines only include roads that can physically and legally accommodate the vehicle

  • For cars (Car), set maximum speed capabilities or indicate high-occupancy vehicle eligibility to better estimate reachable areas

  • For scooters (Scooter), specify engine type and speed limitations to more accurately model their travel capabilities

Without these options, calculations use default assumptions that may not match your specific use case.

RETURNING

oo_output TYPE REF TO /aws1/cl_gercalculateisoline01 /AWS1/CL_GERCALCULATEISOLINE01

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->calculateisolines(
  io_allow = new /aws1/cl_gerisolineallowopts(
    iv_hot = ABAP_TRUE
    iv_hov = ABAP_TRUE
  )
  io_avoid = new /aws1/cl_gerisolineavoidance00(
    it_areas = VALUE /aws1/cl_gerisolineavoidance01=>tt_isolineavoidancearealist(
      (
        new /aws1/cl_gerisolineavoidance01(
          io_geometry = new /aws1/cl_gerisolineavoidance02(
            io_corridor = new /aws1/cl_gercorridor(
              it_linestring = VALUE /aws1/cl_gerposition_w=>tt_linestring(
                (
                  VALUE /aws1/cl_gerposition_w=>tt_position(
                    ( new /aws1/cl_gerposition_w( |0.1| ) )
                  )
                )
              )
              iv_radius = 123
            )
            io_polylinecorridor = new /aws1/cl_gerpolylinecorridor(
              iv_polyline = |string|
              iv_radius = 123
            )
            it_boundingbox = VALUE /aws1/cl_gerboundingbox_w=>tt_boundingbox(
              ( new /aws1/cl_gerboundingbox_w( |0.1| ) )
            )
            it_polygon = VALUE /aws1/cl_gerposition_w=>tt_linearrings(
              (
                VALUE /aws1/cl_gerposition_w=>tt_linearring(
                  (
                    VALUE /aws1/cl_gerposition_w=>tt_position(
                      ( new /aws1/cl_gerposition_w( |0.1| ) )
                    )
                  )
                )
              )
            )
            it_polylinepolygon = VALUE /aws1/cl_gerpolylineringlist_w=>tt_polylineringlist(
              ( new /aws1/cl_gerpolylineringlist_w( |string| ) )
            )
          )
          it_except = VALUE /aws1/cl_gerisolineavoidance02=>tt_isolineavoidanceareageome00(
            (
              new /aws1/cl_gerisolineavoidance02(
                io_corridor = new /aws1/cl_gercorridor(
                  it_linestring = VALUE /aws1/cl_gerposition_w=>tt_linestring(
                    (
                      VALUE /aws1/cl_gerposition_w=>tt_position(
                        ( new /aws1/cl_gerposition_w( |0.1| ) )
                      )
                    )
                  )
                  iv_radius = 123
                )
                io_polylinecorridor = new /aws1/cl_gerpolylinecorridor(
                  iv_polyline = |string|
                  iv_radius = 123
                )
                it_boundingbox = VALUE /aws1/cl_gerboundingbox_w=>tt_boundingbox(
                  ( new /aws1/cl_gerboundingbox_w( |0.1| ) )
                )
                it_polygon = VALUE /aws1/cl_gerposition_w=>tt_linearrings(
                  (
                    VALUE /aws1/cl_gerposition_w=>tt_linearring(
                      (
                        VALUE /aws1/cl_gerposition_w=>tt_position(
                          ( new /aws1/cl_gerposition_w( |0.1| ) )
                        )
                      )
                    )
                  )
                )
                it_polylinepolygon = VALUE /aws1/cl_gerpolylineringlist_w=>tt_polylineringlist(
                  ( new /aws1/cl_gerpolylineringlist_w( |string| ) )
                )
              )
            )
          )
        )
      )
    )
    it_truckroadtypes = VALUE /aws1/cl_gertruckroadtypelst_w=>tt_truckroadtypelist(
      ( new /aws1/cl_gertruckroadtypelst_w( |string| ) )
    )
    it_zonecategories = VALUE /aws1/cl_gerisolineavoidance03=>tt_isolineavoidancezonecatlist(
      ( new /aws1/cl_gerisolineavoidance03( |string| ) )
    )
    iv_carshuttletrains = ABAP_TRUE
    iv_controlledaccesshighways = ABAP_TRUE
    iv_dirtroads = ABAP_TRUE
    iv_ferries = ABAP_TRUE
    iv_seasonalclosure = ABAP_TRUE
    iv_tollroads = ABAP_TRUE
    iv_tolltransponders = ABAP_TRUE
    iv_tunnels = ABAP_TRUE
    iv_uturns = ABAP_TRUE
  )
  io_destinationoptions = new /aws1/cl_gerisolinedstoptions(
    io_matching = new /aws1/cl_gerisolinematchingo00(
      iv_namehint = |string|
      iv_onroadthreshold = 123
      iv_radius = 123
      iv_strategy = |string|
    )
    io_sideofstreet = new /aws1/cl_gerisolinesideofstr00(
      it_position = VALUE /aws1/cl_gerposition_w=>tt_position(
        ( new /aws1/cl_gerposition_w( |0.1| ) )
      )
      iv_usewith = |string|
    )
    iv_avoidactionsfordistance = 123
    iv_heading = '0.1'
  )
  io_isolinegranularity = new /aws1/cl_gerisolinegranulari00(
    iv_maxpoints = 123
    iv_maxresolution = 123
  )
  io_originoptions = new /aws1/cl_gerisolineoriginopts(
    io_matching = new /aws1/cl_gerisolinematchingo00(
      iv_namehint = |string|
      iv_onroadthreshold = 123
      iv_radius = 123
      iv_strategy = |string|
    )
    io_sideofstreet = new /aws1/cl_gerisolinesideofstr00(
      it_position = VALUE /aws1/cl_gerposition_w=>tt_position(
        ( new /aws1/cl_gerposition_w( |0.1| ) )
      )
      iv_usewith = |string|
    )
    iv_avoidactionsfordistance = 123
    iv_heading = '0.1'
  )
  io_thresholds = new /aws1/cl_gerisolinethresholds(
    it_distance = VALUE /aws1/cl_gerdistancethrshlst_w=>tt_distancethresholdlist(
      ( new /aws1/cl_gerdistancethrshlst_w( 123 ) )
    )
    it_time = VALUE /aws1/cl_gertimethreshlist_w=>tt_timethresholdlist(
      ( new /aws1/cl_gertimethreshlist_w( 123 ) )
    )
  )
  io_traffic = new /aws1/cl_gerisolinetrafficopts(
    iv_floweventthreshoverride = 123
    iv_usage = |string|
  )
  io_travelmodeoptions = new /aws1/cl_gerisolinetravelmde00(
    io_car = new /aws1/cl_gerisolinecaroptions(
      io_licenseplate = new /aws1/cl_gerisolinevehicleli00( |string| )
      iv_enginetype = |string|
      iv_maxspeed = '0.1'
      iv_occupancy = 123
    )
    io_scooter = new /aws1/cl_gerisolinescooteropts(
      io_licenseplate = new /aws1/cl_gerisolinevehicleli00( |string| )
      iv_enginetype = |string|
      iv_maxspeed = '0.1'
      iv_occupancy = 123
    )
    io_truck = new /aws1/cl_gerisolinetruckopts(
      io_licenseplate = new /aws1/cl_gerisolinevehicleli00( |string| )
      io_trailer = new /aws1/cl_gerisolinetraileropts(
        iv_axlecount = 123
        iv_trailercount = 123
      )
      io_weightperaxlegroup = new /aws1/cl_gerweightperaxlegroup(
        iv_quad = 123
        iv_quint = 123
        iv_single = 123
        iv_tandem = 123
        iv_triple = 123
      )
      it_hazardouscargos = VALUE /aws1/cl_gerisolinehazardous00=>tt_isolinehazardouscargotype00(
        ( new /aws1/cl_gerisolinehazardous00( |string| ) )
      )
      iv_axlecount = 123
      iv_enginetype = |string|
      iv_grossweight = 123
      iv_height = 123
      iv_heightabovefirstaxle = 123
      iv_kpralength = 123
      iv_length = 123
      iv_maxspeed = '0.1'
      iv_occupancy = 123
      iv_payloadcapacity = 123
      iv_tirecount = 123
      iv_trucktype = |string|
      iv_tunnelrestrictioncode = |string|
      iv_weightperaxle = 123
      iv_width = 123
    )
  )
  it_destination = VALUE /aws1/cl_gerposition_w=>tt_position(
    ( new /aws1/cl_gerposition_w( |0.1| ) )
  )
  it_origin = VALUE /aws1/cl_gerposition_w=>tt_position(
    ( new /aws1/cl_gerposition_w( |0.1| ) )
  )
  iv_arrivaltime = |string|
  iv_departnow = ABAP_TRUE
  iv_departuretime = |string|
  iv_isolinegeometryformat = |string|
  iv_key = |string|
  iv_optimizeisolinefor = |string|
  iv_optimizeroutingfor = |string|
  iv_travelmode = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_timestampwithtimezoneof = lo_result->get_arrivaltime( ).
  lv_timestampwithtimezoneof = lo_result->get_departuretime( ).
  lv_geometryformat = lo_result->get_isolinegeometryformat( ).
  LOOP AT lo_result->get_isolines( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      LOOP AT lo_row_1->get_connections( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_integer = lo_row_3->get_frompolygonindex( ).
          lo_isolineconnectiongeomet = lo_row_3->get_geometry( ).
          IF lo_isolineconnectiongeomet IS NOT INITIAL.
            LOOP AT lo_isolineconnectiongeomet->get_linestring( ) into lt_row_4.
              LOOP AT lt_row_4 into lo_row_5.
                lo_row_6 = lo_row_5.
                IF lo_row_6 IS NOT INITIAL.
                  lv_double = lo_row_6->get_value( ).
                ENDIF.
              ENDLOOP.
            ENDLOOP.
            lv_polyline = lo_isolineconnectiongeomet->get_polyline( ).
          ENDIF.
          lv_integer = lo_row_3->get_topolygonindex( ).
        ENDIF.
      ENDLOOP.
      lv_distancemeters = lo_row_1->get_distancethreshold( ).
      LOOP AT lo_row_1->get_geometries( ) into lo_row_7.
        lo_row_8 = lo_row_7.
        IF lo_row_8 IS NOT INITIAL.
          LOOP AT lo_row_8->get_polygon( ) into lt_row_9.
            LOOP AT lt_row_9 into lt_row_4.
              LOOP AT lt_row_4 into lo_row_5.
                lo_row_6 = lo_row_5.
                IF lo_row_6 IS NOT INITIAL.
                  lv_double = lo_row_6->get_value( ).
                ENDIF.
              ENDLOOP.
            ENDLOOP.
          ENDLOOP.
          LOOP AT lo_row_8->get_polylinepolygon( ) into lo_row_10.
            lo_row_11 = lo_row_10.
            IF lo_row_11 IS NOT INITIAL.
              lv_polylinering = lo_row_11->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
      lv_durationseconds = lo_row_1->get_timethreshold( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_pricingbucket( ).
  LOOP AT lo_result->get_snappeddestination( ) into lo_row_5.
    lo_row_6 = lo_row_5.
    IF lo_row_6 IS NOT INITIAL.
      lv_double = lo_row_6->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_snappedorigin( ) into lo_row_5.
    lo_row_6 = lo_row_5.
    IF lo_row_6 IS NOT INITIAL.
      lv_double = lo_row_6->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.