Class GeoRuby::SimpleFeatures::Polygon
In: lib/geo_ruby/simple_features/polygon.rb
Parent: Geometry

Represents a polygon as an array of linear rings (see LinearRing). No check is performed regarding the validity of the geometries forming the polygon.

Methods

Attributes

rings  [R]  the list of rings forming the polygon

Public Class methods

creates a new polygon. Accepts a sequence of points as argument : ((x,y).…(x,y)),((x,y).….(x,y))

creates a new polygon. Accepts an array of linear strings as argument

creates a new polygon from a list of Points (pt1....ptn),(pti....ptj)

Public Instance methods

tests for other equality. The SRID is not taken into account.

WKB geometry type

binary representation of a polygon, without the headers neccessary for a valid WKB string

Bounding box in 2D/3D. Returns an array of 2 points

georss gml representation

georss simple representation : outputs only the outer ring

georss w3c representation : outputs the first point of the outer ring

outputs the geometry in kml format : options are :id, :tesselate, :extrude, :altitude_mode. If the altitude_mode option is not present, the Z (if present) will not be output (since it won‘t be used by GE anyway: clampToGround is the default)

Delegate the unknown methods to the rings array

WKT geometry type

Text representation of a polygon

[Validate]