Uploaded image for project: 'Help-Coaches-Desk'
  1. Help-Coaches-Desk
  2. HELC-852

FIWARE.Request.Coach.CreatiFI.POI Data Provider improvment

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: CreatiFI
    • Labels:
      None

      Description

      Dear FIWARE coach,
      we forward you a support request received from a CreatiFI applicant we are
      not able to solve.
      Please let us know if you need direct contact with the submitter.
      Thanks.

      ****************************

      Hi,

      We are using POI Data Provider GE in order to handle pois in our
      application and CreatiFI OC1 is finishing.

      Related to the API (
      http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/POI_Data_Provider_Open_API_Specification)
      we need some clarifications:

      1)which order is adopted to return pois in "radial_search" method? (by
      distance from the center ? any other?)

      2)is it possible to extend response json structure in order to return also
      the distance from the center?

      thanks in advance

      Stefano

      ****************************

      _______________________________________________
      Fiware-creatifi-coaching mailing list
      Fiware-creatifi-coaching@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-creatifi-coaching

      [Created via e-mail received from: Andrea Maestrini <amaestrini@create-net.org>]

        Issue Links

          Activity

          Hide
          silviocretti Silvio Cretti added a comment -

          CreatiFI phase 1 finishes in few days.
          The developer needs an answer asap.
          Could you provide some hints?
          Thanks in advance.
          silvio

          Show
          silviocretti Silvio Cretti added a comment - CreatiFI phase 1 finishes in few days. The developer needs an answer asap. Could you provide some hints? Thanks in advance. silvio
          Hide
          ariokkon Ari Okkonen added a comment - - edited
          • Data from searches are provided in no particuar order.
          • About distance: Distance is not an attribute of a POI. It is about the relation of the POI and the query parameters. The distance can be calculated by the haversine formula https://en.wikipedia.org/wiki/Great-circle_distance in the client application. Calculation of distance in the server is not planned.
          • You may sort the POIs in the client by the distance, if needed. E.g.:
            • Encapsulate the POI UUIDs with distances to an array (JavaScript example):
              [{distance: 738.5, uuid: "ac98fcf7-5280-44d1-bb25-c4627387c86c"}, ... ]
              
            • Sort the array
              distances_and_uuids.sort(function(a, b){return a.distance - b.distance});
              
          Show
          ariokkon Ari Okkonen added a comment - - edited Data from searches are provided in no particuar order. About distance: Distance is not an attribute of a POI. It is about the relation of the POI and the query parameters. The distance can be calculated by the haversine formula https://en.wikipedia.org/wiki/Great-circle_distance in the client application. Calculation of distance in the server is not planned. You may sort the POIs in the client by the distance, if needed. E.g.: Encapsulate the POI UUIDs with distances to an array (JavaScript example): [{distance: 738.5, uuid: "ac98fcf7-5280-44d1-bb25-c4627387c86c" }, ... ] Sort the array distances_and_uuids.sort(function(a, b){ return a.distance - b.distance});
          Hide
          ariokkon Ari Okkonen added a comment -

          The needed operations are recommended to be done in the client application.

          Show
          ariokkon Ari Okkonen added a comment - The needed operations are recommended to be done in the client application.

            People

            • Assignee:
              silviocretti Silvio Cretti
              Reporter:
              fw.ext.user FW External User
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: