MBXGeometry.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #import <Foundation/Foundation.h>
  2. // NOLINTNEXTLINE(modernize-use-using)
  3. typedef enum {
  4. MBXGeometryType_Empty NS_SWIFT_NAME(GeometryType_Empty),
  5. MBXGeometryType_Point NS_SWIFT_NAME(GeometryType_Point),
  6. MBXGeometryType_Line NS_SWIFT_NAME(GeometryType_Line),
  7. MBXGeometryType_Polygon NS_SWIFT_NAME(GeometryType_Polygon),
  8. MBXGeometryType_MultiPoint NS_SWIFT_NAME(GeometryType_MultiPoint),
  9. MBXGeometryType_MultiLine NS_SWIFT_NAME(GeometryType_MultiLine),
  10. MBXGeometryType_MultiPolygon NS_SWIFT_NAME(GeometryType_MultiPolygon),
  11. MBXGeometryType_GeometryCollection NS_SWIFT_NAME(GeometryType_GeometryCollection)
  12. } MBXGeometryType NS_SWIFT_NAME(GeometryType);
  13. NS_SWIFT_NAME(Geometry)
  14. __attribute__((visibility ("default")))
  15. @interface MBXGeometry: NSObject
  16. @property (readonly, assign) MBXGeometryType geometryType;
  17. @property (readonly, assign, nonnull) void *geometry;
  18. - (instancetype _Nonnull )initWithPoint:(NSValue* _Nonnull )location;
  19. - (instancetype _Nonnull )initWithLine:(NSArray<NSValue*>* _Nonnull )locations;
  20. - (instancetype _Nonnull )initWithPolygon:(NSArray<NSArray<NSValue*> *> *_Nonnull)locations;
  21. - (instancetype _Nonnull )initWithMultiPoint:(NSArray<NSValue*>* _Nonnull )locations;
  22. - (instancetype _Nonnull )initWithMultiLine:(NSArray<NSArray<NSValue*> *> *_Nonnull)locations;
  23. - (instancetype _Nonnull )initWithMultiPolygon:(NSArray<NSArray<NSArray<NSValue*> *> *> * _Nonnull )locations;
  24. - (instancetype _Nonnull )initWithGeometryCollection:(NSArray<MBXGeometry*> *_Nonnull)geometries;
  25. -(nullable NSValue* )extractLocations;
  26. -(nullable NSArray<NSValue*>* )extractLocationsArray;
  27. -(nullable NSArray<NSArray<NSValue*> *> *)extractLocations2DArray;
  28. -(nullable NSArray<NSArray<NSArray<NSValue*> *> *> *)extractLocations3DArray;
  29. -(nullable NSArray<MBXGeometry*> *)extractGeometriesArray;
  30. @end