Polygon

Coordinates of a Polygon are an array of linear ring coordinate arrays. The first element in the array represents the exterior ring. Any subsequent elements represent interior rings (or holes).

No holes:

  {
      "type": "Polygon",
      "coordinates": [
          [
              [100.0, 0.0],
              [101.0, 0.0],
              [101.0, 1.0],
              [100.0, 1.0],
              [100.0, 0.0]
          ]
      ]
  }

With holes:

  {
      "type": "Polygon",
      "coordinates": [
          [
              [100.0, 0.0],
              [101.0, 0.0],
              [101.0, 1.0],
              [100.0, 1.0],
              [100.0, 0.0]
          ],
          [
              [100.8, 0.8],
              [100.8, 0.2],
              [100.2, 0.2],
              [100.2, 0.8],
              [100.8, 0.8]
          ]
      ]
  }

 https://datatracker.ietf.org/doc/html/rfc7946#appendix-A.3

Constructors

Link copied to clipboard
constructor(polygon: ArrayList<LngLatAlt>)
constructor()

Properties

Link copied to clipboard
@Json(name = "bbox")
var bbox: List<Double>?
Link copied to clipboard
@Json(name = "coordinates")
var coordinates: ArrayList<ArrayList<LngLatAlt>>
Link copied to clipboard

In the (abridged) Feature object shown below

Link copied to clipboard
@Json(name = "properties")
var properties: HashMap<String, Any?>?
Link copied to clipboard
@Json(name = "type")
var type: String

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard