Class Boundary

All Implemented Interfaces:
com.azure.json.JsonSerializable<GeoJsonObject>

public final class Boundary extends GeoJsonFeature
`GeoJSON GeocodingFeature` object that describe the boundaries of a geographical area. Geometry of the feature is described with `GeoJSON GeometryCollection`. Please note, the service typically returns a GeometryCollection with Polygon or MultiPolygon sub-types.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Boundary class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Boundary
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Boundary from the JsonReader.
    Get the copyright property: The copyright string.
    Get the copyrightURL property: A URL that lists many of the data providers for Azure Maps and their related copyright information.
    List<com.azure.maps.search.implementation.models.GeometryCopyright>
    Get the geometriesCopyright property: A collection of copyright information for each geometry of the Boundary object in the same order they appear.
    Get the name property: The name associated with the geographical area.
    Get the type property: Specifies the `GeoJSON` type.
    setBbox(com.azure.core.models.GeoBoundingBox bbox)
    /** Sets the bounding box of this feature using a GeoBoundingBox.
    setCopyright(String copyright)
    Set the copyright property: The copyright string.
    setCopyrightUrl(String copyrightURL)
    Set the copyrightURL property: A URL that lists many of the data providers for Azure Maps and their related copyright information.
    setFeatureType(String featureType)
    Set the featureType property: The type of the feature.
    setGeometriesCopyright(List<com.azure.maps.search.implementation.models.GeometryCopyright> geometriesCopyright)
    Set the geometriesCopyright property: A collection of copyright information for each geometry of the Boundary object in the same order they appear.
    Set the geometry property: A valid `GeoJSON` geometry object.
    Set the id property: Identifier for the feature.
    Set the name property: The name associated with the geographical area.
    setProperties(Object properties)
    Set the properties property: Properties can contain any additional metadata about the `Feature`.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class com.azure.maps.search.models.GeoJsonFeature

    getFeatureType, getGeometry, getId, getProperties, setBbox

    Methods inherited from class com.azure.maps.search.models.GeoJsonObject

    getBbox

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • Boundary

      public Boundary()
      Creates an instance of Boundary class.
  • Method Details

    • getType

      public GeoJsonObjectType getType()
      Get the type property: Specifies the `GeoJSON` type. Must be one of the nine valid GeoJSON object types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature and FeatureCollection.
      Overrides:
      getType in class GeoJsonFeature
      Returns:
      the type value.
    • getName

      public String getName()
      Get the name property: The name associated with the geographical area.
      Returns:
      the name value.
    • setName

      public Boundary setName(String name)
      Set the name property: The name associated with the geographical area.
      Parameters:
      name - the name value to set.
      Returns:
      the Boundary object itself.
    • getCopyright

      public String getCopyright()
      Get the copyright property: The copyright string.
      Returns:
      the copyright value.
    • setCopyright

      public Boundary setCopyright(String copyright)
      Set the copyright property: The copyright string.
      Parameters:
      copyright - the copyright value to set.
      Returns:
      the Boundary object itself.
    • getCopyrightUrl

      public String getCopyrightUrl()
      Get the copyrightURL property: A URL that lists many of the data providers for Azure Maps and their related copyright information.
      Returns:
      the copyrightURL value.
    • setCopyrightUrl

      public Boundary setCopyrightUrl(String copyrightURL)
      Set the copyrightURL property: A URL that lists many of the data providers for Azure Maps and their related copyright information.
      Parameters:
      copyrightURL - the copyrightURL value to set.
      Returns:
      the Boundary object itself.
    • getGeometriesCopyright

      public List<com.azure.maps.search.implementation.models.GeometryCopyright> getGeometriesCopyright()
      Get the geometriesCopyright property: A collection of copyright information for each geometry of the Boundary object in the same order they appear.
      Returns:
      the geometriesCopyright value.
    • setGeometriesCopyright

      public Boundary setGeometriesCopyright(List<com.azure.maps.search.implementation.models.GeometryCopyright> geometriesCopyright)
      Set the geometriesCopyright property: A collection of copyright information for each geometry of the Boundary object in the same order they appear.
      Parameters:
      geometriesCopyright - the geometriesCopyright value to set.
      Returns:
      the Boundary object itself.
    • setGeometry

      public Boundary setGeometry(GeoJsonGeometry geometry)
      Set the geometry property: A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.
      Overrides:
      setGeometry in class GeoJsonFeature
      Parameters:
      geometry - the geometry value to set.
      Returns:
      the GeoJsonFeature object itself.
    • setProperties

      public Boundary setProperties(Object properties)
      Set the properties property: Properties can contain any additional metadata about the `Feature`. Value can be any JSON object or a JSON null value.
      Overrides:
      setProperties in class GeoJsonFeature
      Parameters:
      properties - the properties value to set.
      Returns:
      the GeoJsonFeature object itself.
    • setId

      public Boundary setId(String id)
      Set the id property: Identifier for the feature.
      Overrides:
      setId in class GeoJsonFeature
      Parameters:
      id - the id value to set.
      Returns:
      the GeoJsonFeature object itself.
    • setFeatureType

      public Boundary setFeatureType(String featureType)
      Set the featureType property: The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value.
      Overrides:
      setFeatureType in class GeoJsonFeature
      Parameters:
      featureType - the featureType value to set.
      Returns:
      the GeoJsonFeature object itself.
    • setBbox

      public Boundary setBbox(com.azure.core.models.GeoBoundingBox bbox)
      /** Sets the bounding box of this feature using a GeoBoundingBox.
      Parameters:
      bbox - The bounding box to set.
      Returns:
      The updated Boundary object. /
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<GeoJsonObject>
      Overrides:
      toJson in class GeoJsonFeature
      Throws:
      IOException
    • fromJson

      public static Boundary fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Boundary from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Boundary if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the Boundary.