MBNNRoadObjectMatcher.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. @class MBNNCacheHandle;
  4. @class MBNNMatchableGeometry;
  5. @class MBNNMatchableOpenLr;
  6. @class MBNNMatchablePoint;
  7. @class MBNNMatchingOptions;
  8. @protocol MBNNRoadObjectMatcherListener;
  9. /**
  10. * The class allows to obtain matched to the road graph RoadObjects.
  11. *
  12. * Matching preforms asyncroniously, so before to start matching you should
  13. * setListener to get matching results. It is possible to match such kinds of
  14. * objects:
  15. *
  16. * - Point. Might be matched from encoded OpenLR or by one coordinate. Matched
  17. * to only one edge of the road graph. It means that matched point will be
  18. * tracked by electronic horizon by only one direction of riding. You may set
  19. * direction during encoding OpenLR or make sure that projection of the point
  20. * to the closet road would be placed from the needed side.
  21. *
  22. * - Gantry. Might be matched by two coordinates. It is the line which crosses
  23. * a road, is tracked from both directions.
  24. *
  25. * - Polygon. Might be matched by three or more coordinates. Complex polygons
  26. * (with inner and outer rings) are not supported for now. Polygon is tracked
  27. * by intersections of its edges and road graph edges.
  28. *
  29. * - Polyline. Might be matched from encoded OpenLR or by two or more
  30. * coordinates. Line is tracked in one direction, the direction might be set
  31. * in OpenLR or by the order of coordinates. Polyline is the only object type
  32. * which might be matched partially (see 'MatchingOptions'). It makes sense
  33. * only if the polyline is represented with coordinates and has total length
  34. * more than 10 km.
  35. *
  36. * Cancel leads to `onCancel` callback for each `id`, even if there is no
  37. * scheduled object with such `id`. Only matching transactions with
  38. * `MatchingOptions#useOnlyPreloadedTiles=false` could be cancelled.
  39. */
  40. NS_SWIFT_NAME(RoadObjectMatcher)
  41. __attribute__((visibility ("default")))
  42. @interface MBNNRoadObjectMatcher : NSObject
  43. // This class provides custom init which should be called
  44. - (nonnull instancetype)init NS_UNAVAILABLE;
  45. // This class provides custom init which should be called
  46. + (nonnull instancetype)new NS_UNAVAILABLE;
  47. - (nonnull instancetype)initWithCache:(nonnull MBNNCacheHandle *)cache;
  48. /**
  49. * Schedules a batch of OpenLRs to match. Supported references:
  50. * - TPEG: only line location
  51. * - TomTom: line, point along line, polygon
  52. */
  53. - (void)matchOpenLRsForOpenLrs:(nonnull NSArray<MBNNMatchableOpenLr *> *)openLrs
  54. options:(nonnull MBNNMatchingOptions *)options;
  55. /** Schedules a batch of polylines to match. */
  56. - (void)matchPolylinesForPolylines:(nonnull NSArray<MBNNMatchableGeometry *> *)polylines
  57. options:(nonnull MBNNMatchingOptions *)options;
  58. /** Schedules a batch of polygons to match. */
  59. - (void)matchPolygonsForPolygons:(nonnull NSArray<MBNNMatchableGeometry *> *)polygons
  60. options:(nonnull MBNNMatchingOptions *)options;
  61. /** Schedules a batch of gantries to match. */
  62. - (void)matchGantriesForGantries:(nonnull NSArray<MBNNMatchableGeometry *> *)gantries
  63. options:(nonnull MBNNMatchingOptions *)options;
  64. /** Schedules a batch of points to match. */
  65. - (void)matchPointsForPoints:(nonnull NSArray<MBNNMatchablePoint *> *)points
  66. options:(nonnull MBNNMatchingOptions *)options;
  67. /** Cancels a batch of previously scheduled objects matching. */
  68. - (void)cancelForIds:(nonnull NSArray<NSString *> *)ids;
  69. /** Cancels all scheduled matchings. */
  70. - (void)cancelAll;
  71. @end