Class PLRuby::Polygon
In: plruby.rb
Parent: Object

The class PLRuby::Polygon implement the PostgreSQL type polygon

Methods

==   center   contain?   contained?   from_string   in?   left?   new   npoints   overlap?   overleft?   overright?   right?   same?   to_box   to_circle   to_path   to_point  

Public Class methods

Convert a String (PostgreSQL representation) to a Polygon

create a new Polygon object from the Array of Point points

Public Instance methods

return true if self is the same as other, i.e. all the points are the same

return the center of self, i.e. create a circle and return its center

return true if self contains other

other can be a Point or a Polygon

return true if self is contained in other by determining if self bounding box is contained by other‘s bounding box.

return true if self is contained in other by determining if self bounding box is contained by other‘s bounding box.

return true if self is strictly left of other, i.e. the right most point of self is left of the left most point of other

return the number of points in self

return true if self and other overlap by determining if their bounding boxes overlap.

return true if self is overlapping or left of other, i.e. the left most point of self is left of the right most point of other

return true if self is overlapping or right of other, i.e. the right most point of self is right of the left most point of other

return true if self is strictly right of other, i.e. the left most point of self is right of the left most point of other

return true if self is the same as other, i.e. all the points are the same

convert self to a Box

convert self to a Circle

convert self to a Path

convert self to a Point by returning its center

[Validate]