Boundary Class

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

Constructor Description
Boundary()

Creates an instance of Boundary class.

Method Summary

Modifier and Type Method and Description
static Boundary fromJson(JsonReader jsonReader)

Reads an instance of Boundary from the JsonReader.

String getCopyright()

Get the copyright property: The copyright string.

String getCopyrightUrl()

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> getGeometriesCopyright()

Get the geometriesCopyright property: A collection of copyright information for each geometry of the Boundary object in the same order they appear.

String getName()

Get the name property: The name associated with the geographical area.

GeoJsonObjectType getType()

Get the type property: Specifies the `GeoJSON` type.

Boundary setBbox(GeoBoundingBox bbox)

/** Sets the bounding box of this feature using a GeoBoundingBox.

Boundary setCopyright(String copyright)

Set the copyright property: The copyright string.

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.

Boundary setFeatureType(String featureType)

Set the featureType property: The type of the feature.

Boundary setGeometriesCopyright(List<GeometryCopyright> geometriesCopyright)

Set the geometriesCopyright property: A collection of copyright information for each geometry of the Boundary object in the same order they appear.

Boundary setGeometry(GeoJsonGeometry geometry)

Set the geometry property: A valid `GeoJSON` geometry object.

Boundary setId(String id)

Set the id property: Identifier for the feature.

Boundary setName(String name)

Set the name property: The name associated with the geographical area.

Boundary setProperties(Object properties)

Set the properties property: Properties can contain any additional metadata about the `Feature`.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from GeoJsonFeature

Methods inherited from GeoJsonObject

Methods inherited from java.lang.Object

Constructor Details

Boundary

public Boundary()

Creates an instance of Boundary class.

Method Details

fromJson

public static Boundary fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

getCopyright

public String getCopyright()

Get the copyright property: The copyright string.

Returns:

the copyright value.

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.

getGeometriesCopyright

public List<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.

getName

public String getName()

Get the name property: The name associated with the geographical area.

Returns:

the name value.

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:

Boundary.getType()

Returns:

the type value.

setBbox

public Boundary setBbox(GeoBoundingBox bbox)

/** Sets the bounding box of this feature using a GeoBoundingBox.

Parameters:

bbox - The bounding box to set.

Returns:

The updated Boundary object. /

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.

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.

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:

Boundary.setFeatureType(String featureType)

Parameters:

featureType

setGeometriesCopyright

public Boundary setGeometriesCopyright(List<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:

Boundary.setGeometry(GeoJsonGeometry geometry)

Parameters:

geometry

setId

public Boundary setId(String id)

Set the id property: Identifier for the feature.

Overrides:

Boundary.setId(String id)

Parameters:

id

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.

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:

Boundary.setProperties(Object properties)

Parameters:

properties

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

Boundary.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to