Class/Object

geotrellis.vector

Polygon

Related Docs: object Polygon | package vector

Permalink

case class Polygon(jtsGeom: com.vividsolutions.jts.geom.Polygon) extends Geometry with TwoDimensions with Product with Serializable

Class representing a polygon

Linear Supertypes
Serializable, Serializable, Product, Equals, TwoDimensions, AtLeastOneDimension, Dimensions, Geometry, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Polygon
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TwoDimensions
  7. AtLeastOneDimension
  8. Dimensions
  9. Geometry
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Polygon(jtsGeom: com.vividsolutions.jts.geom.Polygon)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def &(g: TwoDimensions): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

  4. def &(g: OneDimension): OneDimensionAtLeastOneDimensionIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

  5. def &(mp: MultiPoint): MultiPointAtLeastOneDimensionIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and mp.

  6. def &(p: Point): PointOrNoResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and p.

  7. def &(g: Geometry): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink
    Definition Classes
    Geometry
  8. def -(g: TwoDimensions): TwoDimensionsTwoDimensionsDifferenceResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon that are not in g.

  9. def -(g: AtMostOneDimension): PolygonAtMostOneDimensionDifferenceResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon that are not in g.

  10. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. lazy val area: Double

    Permalink

    Returns the area of this Polygon.

  12. def as[G <: Geometry](implicit arg0: ClassTag[G]): Option[G]

    Permalink

    Attempt to convert this Geometry to the provided type

    Attempt to convert this Geometry to the provided type

    Definition Classes
    Geometry
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. lazy val boundary: PolygonBoundaryResult

    Permalink

    Returns the boundary of this Polygon.

    Returns the boundary of this Polygon. The boundary of a Polygon is the set of closed curves corresponding to its exterior and interior boundaries.

  15. def buffer(d: Double): Polygon

    Permalink

    Computes a buffer area around this Polygon having width d.

  16. def centroid: PointOrNoResult

    Permalink

    Calculate centroid of this Geometry

    Calculate centroid of this Geometry

    Definition Classes
    Geometry
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def contains(g: Geometry): Boolean

    Permalink

    Tests whether this Polygon contains the specified Geometry g.

    Tests whether this Polygon contains the specified Geometry g. Returns true if the DE-9IM Intersection Matrix for the two geometries is T*****FF*.

  19. def coveredBy(g: TwoDimensions): Boolean

    Permalink

    Tests whether this Polygon is covered by the specified TwoDimensions g.

    Tests whether this Polygon is covered by the specified TwoDimensions g. Returns true if the DE-9IM Intersection Matrix for the two geometries is T*F**F*** or *TF**F*** or **FT*F*** or **F*TF***.

  20. def covers(g: Geometry): Boolean

    Permalink

    Tests whether this Polygon covers the specified Geometry g.

    Tests whether this Polygon covers the specified Geometry g. Returns true if the DE-9IM Intersection Matrix for the two geometries is T*****FF* or *T****FF* or ***T**FF* or ****T*FF*.

  21. def crosses(g: OneDimension): Boolean

    Permalink

    Tests whether this Polygon crosses the specified OneDimension g.

    Tests whether this Polygon crosses the specified OneDimension g. Returns true if the DE-9IM Intersection Matrix for the two geometries is T*****T** (A/L).

  22. def crosses(mp: MultiPoint): Boolean

    Permalink

    Tests whether this Polygon crosses the specified MultiPoint mp.

    Tests whether this Polygon crosses the specified MultiPoint mp. Returns true if the DE-9IM Intersection Matrix for the two geometries is T*****T** (A/P).

  23. def difference(g: TwoDimensions): TwoDimensionsTwoDimensionsDifferenceResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon that are not in g.

  24. def difference(g: AtMostOneDimension): PolygonAtMostOneDimensionDifferenceResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon that are not in g.

  25. def disjoint(other: Geometry): Boolean

    Permalink
    Definition Classes
    Geometry
  26. def distance(other: Geometry): Double

    Permalink

    Calculate the distance to another Geometry

    Calculate the distance to another Geometry

    Definition Classes
    Geometry
  27. def envelope: Extent

    Permalink
    Definition Classes
    Geometry
  28. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def equals(other: Any): Boolean

    Permalink
    Definition Classes
    Geometry → AnyRef → Any
  30. lazy val exterior: Line

    Permalink

    Returns the exterior ring of this Polygon.

  31. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  33. lazy val hasHoles: Boolean

    Permalink

    Returns true if this Polygon contains holes

  34. def hashCode(): Int

    Permalink
    Definition Classes
    Geometry → AnyRef → Any
  35. lazy val holes: Array[Line]

    Permalink

    Returns the hole rings of this Polygon.

  36. def interiorPoint: PointOrNoResult

    Permalink
    Definition Classes
    Geometry
  37. def intersection(g: TwoDimensions): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

  38. def intersection(g: OneDimension): OneDimensionAtLeastOneDimensionIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

  39. def intersection(mp: MultiPoint): MultiPointAtLeastOneDimensionIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and mp.

  40. def intersection(p: Point): PointOrNoResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and p.

  41. def intersection(g: Geometry): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

    Definition Classes
    Geometry
  42. def intersectionSafe(g: TwoDimensions): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g. If it fails, it reduces the precision to avoid TopologyException.

  43. def intersectionSafe(g: OneDimension): OneDimensionAtLeastOneDimensionIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g. If it fails, it reduces the precision to avoid TopologyException.

  44. def intersectionSafe(mp: MultiPoint): MultiPointAtLeastOneDimensionIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g. If it fails, it reduces the precision to avoid TopologyException.

  45. def intersectionSafe(p: Point): PointOrNoResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g. If it fails, it reduces the precision to avoid TopologyException.

  46. def intersectionSafe(g: Geometry): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g.

    Computes a Result that represents a Geometry made up of the points shared by this Polygon and g. If it fails, it reduces the precision to avoid TopologyException.

    Definition Classes
    Geometry
  47. def intersects(other: Geometry): Boolean

    Permalink
    Definition Classes
    Geometry
  48. def isEmpty: Boolean

    Permalink

    Is this Geometry empty? This is faster than checking manually like:

    Is this Geometry empty? This is faster than checking manually like:

    val mp: MultiPoint = ...
    val ps: Array[Point] = mp.points  // `.points` is a lazy val with processing overhead
    
    ps.isEmpty  // possible, but mp.isEmpty is faster

    It would be similar for MultiLine or MultiPolygon.

    Definition Classes
    Geometry
  49. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  50. lazy val isRectangle: Boolean

    Permalink

    Tests whether this Polygon is a rectangle.

  51. def isValid: Boolean

    Permalink

    Check the validity of this geometry

    Check the validity of this geometry

    Definition Classes
    Geometry
  52. val jtsGeom: com.vividsolutions.jts.geom.Polygon

    Permalink

    Return the wrapped jts Geometry

    Return the wrapped jts Geometry

    Definition Classes
    PolygonDimensionsGeometry
  53. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  54. def normalized(): Polygon

    Permalink

    Returns a unique representation of the geometry based on standard coordinate ordering.

  55. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  56. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  57. lazy val numberOfHoles: Int

    Permalink

    Returns the number of holes in this Polygon

  58. def overlaps(g: TwoDimensions): Boolean

    Permalink

    Tests whether this Polygon overlaps the specified TwoDimensions g.

    Tests whether this Polygon overlaps the specified TwoDimensions g. Returns true if The DE-9IM Intersection Matrix for the two geometries is T*T***T**.

  59. lazy val perimeter: Double

    Permalink

    Returns this Polygon's perimeter.

    Returns this Polygon's perimeter. A Polygon's perimeter is the length of its exterior and interior boundaries.

  60. def symDifference(g: TwoDimensions): TwoDimensionsTwoDimensionsSymDifferenceResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon that are not in g and all the points in g that are not in this Polygon.

  61. def symDifference(g: AtMostOneDimension): AtMostOneDimensionPolygonSymDifferenceResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon that are not in g and all the points in g that are not in this Polygon.

  62. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  63. def toString(): String

    Permalink
    Definition Classes
    Geometry → AnyRef → Any
  64. def touches(g: Geometry): Boolean

    Permalink

    Tests whether this Polygon touches the specified Geometry g.

    Tests whether this Polygon touches the specified Geometry g. Returns true if the DE-9IM Intersection Matrix for the two geometries is FT*******, F**T***** or F***T****.

  65. def union(g: TwoDimensions): TwoDimensionsTwoDimensionsUnionResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon and g.

    Computes a Result that represents a Geometry made up of all the points in this Polygon and g. Uses cascaded polygon union if g is a (multi)polygon else falls back to default jts union method.

  66. def union(g: AtMostOneDimension): AtMostOneDimensionPolygonUnionResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon and g.

  67. lazy val vertexCount: Int

    Permalink

    Get the number of vertices in this geometry

  68. lazy val vertices: Array[Point]

    Permalink

    Returns this Polygon's vertices.

  69. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  72. def within(g: TwoDimensions): Boolean

    Permalink

    Tests whether this Polygon is within the specified TwoDimensions g.

    Tests whether this Polygon is within the specified TwoDimensions g. Returns true if the DE-9IM Intersection Matrix for the two geometries is T*F**F***.

  73. def withinDistance(other: Geometry, dist: Double): Boolean

    Permalink

    Determine whether another Geometry is within a given distance

    Determine whether another Geometry is within a given distance

    other

    The geometry to check

    dist

    The radius of the circle within which this check is conducted

    Definition Classes
    Geometry
  74. def |(g: TwoDimensions): TwoDimensionsTwoDimensionsUnionResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon and g.

  75. def |(g: AtMostOneDimension): AtMostOneDimensionPolygonUnionResult

    Permalink

    Computes a Result that represents a Geometry made up of all the points in this Polygon and g.

Deprecated Value Members

  1. def safeIntersection(g: TwoDimensions): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2) This will be removed in 2.0 - use intersectionSafe instead

  2. def safeIntersection(g: OneDimension): OneDimensionAtLeastOneDimensionIntersectionResult

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2) This will be removed in 2.0 - use intersectionSafe instead

  3. def safeIntersection(mp: MultiPoint): MultiPointAtLeastOneDimensionIntersectionResult

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2) This will be removed in 2.0 - use intersectionSafe instead

  4. def safeIntersection(p: Point): PointOrNoResult

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2) This will be removed in 2.0 - use intersectionSafe instead

  5. def safeIntersection(g: Geometry): TwoDimensionsTwoDimensionsIntersectionResult

    Permalink
    Definition Classes
    Geometry
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2) This will be removed in 2.0 - use intersectionSafe instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TwoDimensions

Inherited from AtLeastOneDimension

Inherited from Dimensions

Inherited from Geometry

Inherited from AnyRef

Inherited from Any

Ungrouped