DJI Mobile SDK Documentation

      class FlyZoneInformation

      @EXClassNullAway
      final class FlyZoneInformation
      Package:dji.common.flightcontroller.flyzone
      Description:

      This class contains information about a fly zone. getFlyZoneType should be used to understand the type of fly zone to know which information in this class is valid.

      Class Members:
      Information
      method
      method getFlyZoneType
      FlyZoneType getFlyZoneType()
      Package:dji.common.flightcontroller.flyzone
      Description:

      Returns the type fly zone.

      Return:
      FlyZoneTypeThe type of fly zone.
      method getFlyZoneID
      int getFlyZoneID()
      Package:dji.common.flightcontroller.flyzone
      Description:

      Returns the fly zone's ID. This is required if unlocking a fly zone.

      Return:
      intAn int value.
      method
      method getName
      String getName()
      Package:dji.common.flightcontroller.flyzone
      Description:

      Returns the name of the fly zone.

      Return:
      StringA string instance of the name of the fly zone.
      method
      method getReason
      FlyZoneReason getReason()
      Package:dji.common.flightcontroller.flyzone
      Description:

      Returns the reason of the fly zone FlyZoneReason.

      Return:
      FlyZoneReasonAn enum value of FlyZoneReason.
      Location
      method
      method getCoordinate
      LocationCoordinate2D getCoordinate()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The coordinate of the fly zone's center. Only used for GEO and NFZ fly zones.

      Return:
      LocationCoordinate2DCoordinate of fly zone center.
      Geometry
      method
      method getRadius
      double getRadius()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The radius of the fly zone in meters. If the fly zone is a truncated cone, then the radius is the bottom of the cone. Only used for GEO and NFZ fly zones.

      Return:
      doubleA double value of the radius of the fly zone in meters.
      method
      method getShape
      FlyZoneShape getShape()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The shape of the fly zone. This shape is only used for GEO (always cylinder) and NFZ fly zones.

      Return:
      FlyZoneShapeAn enum value of FlyZoneShape.
      GEO Fly Zone Category
      method
      method getCategory
      FlyZoneCategory getCategory()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The category of the fly zone.

      Return:
      FlyZoneCategoryAn enum value of FlyZoneCategory.
      Sub Fly Zones
      method
      method getSubFlyZones
      SubFlyZoneInformation[] getSubFlyZones()
      Package:dji.common.flightcontroller.flyzone
      Description:

      Information about the Sub fly zones. If empty, then the fly zone is a circle fly zone. If populated, this fly zone is a Poly fly zone and the sub fly zone information will take precedence over information in FlyZoneInformation. FlyZoneInformation should only be used for fly zone identifying information.

      Return:
      SubFlyZoneInformation[]An array of SubFlyZoneInformation objects.
      Unlocking Enabled
      method
      method setUnlockingEnabled
      void setUnlockingEnabled(final boolean enabled, CompletionCallback callback)
      Package:dji.common.flightcontroller.flyzone
      Description:

      Disables the unlocked fly zones. This is useful if the aircraft is shared between users. It is not supported by Inspire 1 series or Phantom 3 series. For the other products, it is supported when isCustomUnlockZoneSupported is true.

      Input Parameters:
      final boolean enabledtrue to enable the unlocked fly zone.
      CompletionCallback callbackcompletion callback to receive the result.
      method getUnlockingEnabled
      void getUnlockingEnabled(final CompletionCallbackWith<Boolean> callback)
      Package:dji.common.flightcontroller.flyzone
      Description:

      true if the unlocked fly zone is enabled. It is not supported by Inspire 1 series or Phantom 3 series. For the other products, it is supported when isCustomUnlockZoneSupported is true.

      Input Parameters:
      final CompletionCallbackWith<Boolean> callbackCompletion callback that receives the execution result.
      Time
      method
      method getStartTime
      String getStartTime()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The timestamp of when the flight warning or flight restriction begins, formatted in UTC (yyyy-MM-dd HH:mm:ss). This is used for temporary flight restrictions.

      Return:
      StringAn instance of String.
      method getEndTime
      String getEndTime()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The timestamp of when the flight warning or flight restriction ends, formatted in UTC (YYYY-MM-DD hh:mm:ss).

      Return:
      StringA string instance of the timestamp when the flight warning or flight restriction ends.
      Unlock Time
      method
      method getUnlockStartTime
      String getUnlockStartTime()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The timestamp when the fly zone is unlocked, formatted in UTC (YYYY-MM-DD hh:mm:ss).

      Return:
      StringA string instance of the timestamp when the fly zone is unlocked.
      method getUnlockEndTime
      String getUnlockEndTime()
      Package:dji.common.flightcontroller.flyzone
      Description:

      The timestamp the unlocked zone expires, formatted in UTC (YYYY-MM-DD hh:mm:ss).

      Return:
      StringA string instance of the timestamp when the unlocked zone expires.
      enum FlyZoneType
      @EXClassNullAway
      enum FlyZoneType
      Package:dji.common.flightcontroller.flyzone
      Description:

      There are three types of fly zones, NFZ, GEO and Poly.

      Enum Members:
      CIRCLEThe circle fly zone is a cylinder or truncated cone volume (see getShape) with one of the four restriction levels (see getCategory). Some restrictions can be unlocked while others cannot. Some fly zones also have a 4km buffer around them where flight height is restricted to 120m.
      POLYThe Poly fly zone consists of one or more sub fly zones that are cylinders or complex volumes with different height limitations. A height limitation of 0m means flight is completely restricted. This is used by Mavic, Phantom 4 Pro, Inspire 2 and Phantom 4.
      UNKNOWNThe fly zone is of unknown type.
      Class Members:
      enum FlyZoneCategory
      @EXClassNullAway
      enum FlyZoneCategory
      Package:dji.common.flightcontroller.flyzone
      Description:

      An enum class represents the category of fly zone.

      Enum Members:
      WARNINGWarning zones do not restrict flight and are informational to alert the user. In a warning zone, users should be prompted with a warning message describing the zone.
      AUTHORIZATIONAuthorization zones restrict flight by default, but can be unlocked by a GEO authorized user.
      RESTRICTEDRestricted zones restrict flight by default and cannot be unlocked by a GEO authorized user. Users should contact flysafe@dji.com if they have authorization to fly in a restricted zone.
      ENHANCED_WARNINGEnhanced warning zones do not restrict flight but are highly recommended to be informational to alert the user. In an enhanced warning zone, users should be prompted with a warning message describing the zone.
      UNKNOWNUnknown.
      Class Members:
      enum FlyZoneReason
      @EXClassNullAway
      enum FlyZoneReason
      Package:dji.common.flightcontroller.flyzone
      Description:

      An enum class contains the reason for the fly zone.

      Enum Members:
      AIRPORTAirport that cannot be unlocked using GEO system.
      MILITARYMilitary authorized zone. This cannot be unlocked using the GEO system.
      SPECIALSpecial Zone. This cannot be unlocked using the GEO system.
      COMMERCIAL_AIRPORTSCommercial airport.
      PRIVATE_COMMERCIAL_AIRPORTSPrivate commercial airport.
      RECREATIONAL_AIRPORTSRecreational airport.
      NATIONAL_PARKSNational park.
      NOAAThe National Oceanic and Atmospheric Administration.
      PARCELParcel.
      POWER_PLANTPower plant.
      PRISONPrison.
      SCHOOLSchool.
      STADIUMStadium.
      PROHIBITED_SPECIAL_USEProhibited special use.
      RESTRICTED_SPECIAL_USERestriction special use.
      TEMPORARY_FLIGHT_RESTRICTIONSTemporary flight restriction.
      CLASS_B_AIR_SPACEClass B controlled airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      CLASS_C_AIR_SPACEClass C controlled airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      CLASS_D_AIR_SPACEClass D controlled airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      CLASS_E_AIR_SPACEClass E Controlled Airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      UNPAVED_AIRPORTAirport with unpaved runway.
      HELIPORTHeliport.
      UNKNOWNUnknown.
      Class Members:
      enum FlyZoneShape
      @EXClassNullAway
      enum FlyZoneShape
      Package:dji.common.flightcontroller.flyzone
      Description:

      An enum class containing the shape of the fly zone.

      Enum Members:
      CYLINDERCylinder.
      CONETruncated cone that has a smaller radius on the ground and larger radius in the air.
      UNKNOWNUnknown.
      Class Members:
      enum FlyZoneReturnToHomeState
      @EXClassNullAway
      enum FlyZoneReturnToHomeState
      Package:dji.common.flightcontroller.flyzone
      SDK Key:FlightControllerKey.RETURN_TO_HOME_STATE
      Description:

      This enum describes whether the aircraft's route when returning to home is clear of, near, or passes through a fly zone.

      Enum Members:
      CLEARThe aircraft's return to home route is clear of restricted areas.
      NEAR_NO_FLY_ZONEThe aircraft's return to home route is near an authorization or restricted zone.
      CROSS_NO_FLY_ZONEThe aircraft's return to home route passes through an authorization or restricted zone.
      UNKNOWNUnknown.
      Class Members: