Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-4449

FIWARE.Request.Tech.Data.CEP.Function Distance

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Thomas Cristanis sent a message using the contact form at
      http://catalogue.fiware.org/.

      Hi Dear,

      I wanted to know more details not provided by documentation relative the
      function distance. If you can use directly in the field condition of my
      Event?
      What kind of value returned? (meters, kilometers)?

      _______________________________________________
      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fiware.org
      https://lists.fiware.org/listinfo/fiware-tech-help-new

      [Created via e-mail received from: thomascristanis@gmail.com]

        Activity

        fw.ext.user FW External User created issue -
        mev Manuel Escriche made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        mev Manuel Escriche made changes -
        Assignee Tali Yatzkar Haham [ tali ]
        Hide
        TALI Fabiana Fournier added a comment -

        Dear Thomas,

        Distance:
        You need to provide 4 parameters, 2 for the first point and 2 for the second. These parameters are used as the (X,Y) coordinates of the 2 points you want to measure the distance between.
        The function calculate a geometric distance, sqrt((y2-y1)^2 + (x2-x1)^2), so the result will be in the same units as the input.
        To refer to attribute of an event use the following: <EventName>.<EventAttributeName> for example attribute x of event a: a.x
        So if event a has attributes x,y and event b has attributes x,y , you can refer to the distance between those two points by writing:
        distance(a.x,a.y,b.x,b.y)

        You can use this function directly in the condition of an input event assuming this event has the attributes of the two points.

        Best regards,
        Itai

        Show
        TALI Fabiana Fournier added a comment - Dear Thomas, Distance: You need to provide 4 parameters, 2 for the first point and 2 for the second. These parameters are used as the (X,Y) coordinates of the 2 points you want to measure the distance between. The function calculate a geometric distance, sqrt((y2-y1)^2 + (x2-x1)^2), so the result will be in the same units as the input. To refer to attribute of an event use the following: <EventName>.<EventAttributeName> for example attribute x of event a: a.x So if event a has attributes x,y and event b has attributes x,y , you can refer to the distance between those two points by writing: distance(a.x,a.y,b.x,b.y) You can use this function directly in the condition of an input event assuming this event has the attributes of the two points. Best regards, Itai
        TALI Fabiana Fournier made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        TALI Fabiana Fournier made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        TALI Fabiana Fournier made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        TALI Fabiana Fournier made changes -
        Summary [Fiware-tech-help] [Complex Event Processing (CEP) - Proactive Technology Online] Function Distance FIWARE.Request.Lab.Data.CEP.Function Distance
        mev Manuel Escriche made changes -
        Summary FIWARE.Request.Lab.Data.CEP.Function Distance FIWARE.Request.Tech.Data.CEP.Function Distance
        mev Manuel Escriche made changes -
        mev Manuel Escriche made changes -
        HD-Enabler CEP [ 10869 ]
        HD-Chapter Data [ 10838 ]
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2d 18h 54m 1 Fabiana Fournier 01/Oct/15 3:51 PM
        In Progress In Progress Answered Answered
        2s 1 Fabiana Fournier 01/Oct/15 3:51 PM
        Answered Answered Closed Closed
        1s 1 Fabiana Fournier 01/Oct/15 3:51 PM

          People

          • Assignee:
            TALI Fabiana Fournier
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: