Class: Charta::Polygon

Inherits:
Geometry show all
Defined in:
lib/charta/polygon.rb

Overview

Represent a Geometry with contains only polygons

Instance Attribute Summary

Attributes inherited from Geometry

#ewkt

Instance Method Summary collapse

Methods inherited from Geometry

#!=, #==, #area, #bounding_box, #buffer, #centroid, #circle, #collection?, #convert_to, #difference, #empty?, #find_srid, #flatten, #geom, #initialize, #inspect, #intersection, #merge, #multi_polygon, #point_on_surface, #select_row, #select_value, #select_values, #srid, #srid=, #to_binary, #to_ewkt, #to_geojson, #to_gml, #to_json_object, #to_kml, #to_rgeo, #to_s, #to_svg, #to_svg_path, #to_text, #transform, #type

Constructor Details

This class inherits a constructor from Charta::Geometry

Instance Method Details

#exterior_ringObject


4
5
6
# File 'lib/charta/polygon.rb', line 4

def exterior_ring
  @exterior_ring ||= LineString.new(select_value("SELECT ST_AsEWKT(ST_ExteriorRing(#{geom}))"))
end