org.apache.olingo.commons.api.edm.geo

## Class Polygon

- java.lang.Object
- - org.apache.olingo.commons.api.edm.geo.Geospatial
  - - org.apache.olingo.commons.api.edm.geo.Polygon

-     public class Polygon
      extends Geospatial

  Polygon.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.olingo.commons.api.edm.geo.Geospatial

      `Geospatial.Dimension, Geospatial.Type`

  - ### Field Summary

    - ### Fields inherited from class org.apache.olingo.commons.api.edm.geo.Geospatial

      `dimension, srid, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Polygon(Geospatial.Dimension dimension, SRID srid, List<LineString> interiors, LineString exterior)` Creates a new polygon.
    `Polygon(Geospatial.Dimension dimension, SRID srid, List<Point> interior, List<Point> exterior)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `EdmPrimitiveTypeKind` | `getEdmPrimitiveTypeKind()` Returns the `EdmPrimitiveTypeKind`
    `ComposedGeospatial<Point>` | `getExterior()` Gets exterior points.
    `ComposedGeospatial<Point>` | `getInterior()` Deprecated.
    `ComposedGeospatial<Point>` | `getInterior(int n)` Gets the nth interior ring
    `int` | `getNumberOfInteriorRings()` Get the number of interior rings
    `int` | `hashCode()`

    - ### Methods inherited from class org.apache.olingo.commons.api.edm.geo.Geospatial

      `getDimension, getGeoType, getSrid`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Polygon

          public Polygon(Geospatial.Dimension dimension,
                         SRID srid,
                         List<Point> interior,
                         List<Point> exterior)

      Deprecated.
      Creates a new polygon.
      Parameters:
        `dimension` - Dimension of the polygon
        `srid` - SRID values
        `interior` - List of interior points
        `exterior` - List of exterior point

    - #### Polygon

          public Polygon(Geospatial.Dimension dimension,
                         SRID srid,
                         List<LineString> interiors,
                         LineString exterior)

      Creates a new polygon.
      Parameters:
        `dimension` - Dimension of the polygon
        `srid` - SRID values
        `interiors` - List of interior rings
        `exterior` - Ring of exterior point

  - ### Method Detail

    - #### getInterior

          public ComposedGeospatial<Point> getInterior()

      Deprecated.
      Gets interior points.
      Returns:
        interior points.
      See Also:
        `getInterior(int)`

    - #### getNumberOfInteriorRings

          public int getNumberOfInteriorRings()

      Get the number of interior rings
      Returns:
        number of interior rings

    - #### getInterior

          public ComposedGeospatial<Point> getInterior(int n)

      Gets the nth interior ring
      Parameters:
        `n` -
      Returns:
        the ring or an exception if no such ring exists

    - #### getExterior

          public ComposedGeospatial<Point> getExterior()

      Gets exterior points.
      Returns:
        exterior points.

    - #### getEdmPrimitiveTypeKind

          public EdmPrimitiveTypeKind getEdmPrimitiveTypeKind()

      Description copied from class: `Geospatial`
      Returns the `EdmPrimitiveTypeKind`
      Specified by:
        `getEdmPrimitiveTypeKind` in class `Geospatial`
      Returns:
        EDM primitive type kind

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.