Package com.azure.maps.search.models
Class Boundary
java.lang.Object
com.azure.maps.search.models.GeoJsonObject
com.azure.maps.search.models.GeoJsonFeature
com.azure.maps.search.models.Boundary
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GeoJsonObject>
`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 -
Method Summary
Modifier and TypeMethodDescriptionstatic BoundaryfromJson(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.getName()Get the name property: The name associated with the geographical area.getType()Get the type property: Specifies the `GeoJSON` type.setBbox(com.azure.core.models.GeoBoundingBox bbox) /** Sets the bounding box of this feature using aGeoBoundingBox.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.setGeometry(GeoJsonGeometry geometry) 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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.maps.search.models.GeoJsonFeature
getFeatureType, getGeometry, getId, getProperties, setBboxMethods inherited from class com.azure.maps.search.models.GeoJsonObject
getBboxMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
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:
getTypein classGeoJsonFeature- Returns:
- the type value.
-
getName
Get the name property: The name associated with the geographical area.- Returns:
- the name value.
-
setName
Set the name property: The name associated with the geographical area.- Parameters:
name- the name value to set.- Returns:
- the Boundary object itself.
-
getCopyright
Get the copyright property: The copyright string.- Returns:
- the copyright value.
-
setCopyright
Set the copyright property: The copyright string.- Parameters:
copyright- the copyright value to set.- Returns:
- the Boundary object itself.
-
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
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
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
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:
setGeometryin classGeoJsonFeature- Parameters:
geometry- the geometry value to set.- Returns:
- the GeoJsonFeature object itself.
-
setProperties
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:
setPropertiesin classGeoJsonFeature- Parameters:
properties- the properties value to set.- Returns:
- the GeoJsonFeature object itself.
-
setId
Set the id property: Identifier for the feature.- Overrides:
setIdin classGeoJsonFeature- Parameters:
id- the id value to set.- Returns:
- the GeoJsonFeature object itself.
-
setFeatureType
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:
setFeatureTypein classGeoJsonFeature- Parameters:
featureType- the featureType value to set.- Returns:
- the GeoJsonFeature object itself.
-
setBbox
/** Sets the bounding box of this feature using aGeoBoundingBox.- Parameters:
bbox- The bounding box to set.- Returns:
- The updated Boundary object. /
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<GeoJsonObject>- Overrides:
toJsonin classGeoJsonFeature- Throws:
IOException
-
fromJson
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.
-