Class: OGR::LinearRing
- Inherits:
-
LineString
- Object
- LineString
- OGR::LinearRing
- Includes:
- Geometry::RttopoExtensions
- Defined in:
- lib/ogr/geometries/linear_ring.rb
Instance Attribute Summary
Attributes included from Geometry
Instance Method Summary collapse
-
#initialize(geometry_ptr = nil, spatial_reference: nil) ⇒ LinearRing
constructor
A new instance of LinearRing.
- #to_line_string ⇒ Object
Methods included from Geometry::RttopoExtensions
Methods inherited from LineString
#add_geometry, #add_point, approximate_arc_angles
Methods included from GeometryTypes::Curve::Extensions
#closed?, #each_point_geometry, #end_point, #pixels, #point_geometries, #point_geometry, #start_point
Methods included from GeometryTypes::Curve
#add_point, #length, #point, #point_count=, #points, #set_point, #x, #y, #z
Methods included from Geometry
#boundary, #buffer, #centroid, #clone, #close_rings!, #contains?, #convex_hull, #coordinate_dimension, #coordinate_dimension=, #crosses?, #destroy!, #difference, #dimension, #disjoint?, #distance_to, #dump_readable, #empty!, #empty?, #envelope, #equals?, #flatten_to_2d!, #geometry_count, #import_from_wkb, #import_from_wkt, included, #intersection, #intersects?, #is_2d?, #is_3d?, #name, #overlaps?, #point_count, #point_on_surface, #polygonize, #ring?, #segmentize!, #simple?, #simplify, #spatial_reference, #spatial_reference=, #symmetric_difference, #to_geo_json, #to_geo_json_ex, #to_gml, #to_iso_wkt, #to_kml, #to_linear_ring, #to_multi_line_string, #to_multi_point, #to_multi_polygon, #to_polygon, #to_wkb, #to_wkt, #touches?, #transform!, #transform_to!, #type, #type_to_name, #union, #valid?, #within?, #wkb_size
Methods included from Geometry::ClassMethods
#create, #create_from_gml, #create_from_json, #create_from_wkb, #create_from_wkt, #factory, #merge_geometry_types, #release, #type_to_name
Methods included from Geometry::EWKBIOExtensions
Methods included from GeometryMixins::Extensions
#!=, #collection?, #container?, #curve?, #invalid?, #surface?, #to_vector, #utm_zone
Constructor Details
#initialize(geometry_ptr = nil, spatial_reference: nil) ⇒ LinearRing
8 9 10 11 12 |
# File 'lib/ogr/geometries/linear_ring.rb', line 8 def initialize(geometry_ptr = nil, spatial_reference: nil) geometry_ptr ||= OGR::Geometry.create(:wkbLinearRing) super(geometry_ptr, spatial_reference: spatial_reference) end |
Instance Method Details
#to_line_string ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/ogr/geometries/linear_ring.rb', line 14 def to_line_string line_string = OGR::LineString.new line_string.spatial_reference = spatial_reference if spatial_reference line_string.import_from_wkt(to_wkt.sub("LINEARRING", "LINESTRING")) line_string end |