Class: RGeo::Cartesian::GeometryGraph

Inherits:
PlanarGraph show all
Defined in:
lib/rgeo/cartesian/planar_graph.rb

Overview

GeometryGraph is a PlanarGraph that is built by adding geometries instead of edges. The GeometryGraph will hold a reference to an arbitrary HalfEdge on the interior of the geometry for every boundary in the geometry. For example, a polygon will have a reference to a HalfEdge for its exterior shell and one for every hole.

Defined Under Namespace

Classes: GeomEdge

Instance Attribute Summary collapse

Attributes inherited from PlanarGraph

#edges, #incident_edges

Instance Method Summary collapse

Methods inherited from PlanarGraph

#add_edge, #add_edges

Constructor Details

#initialize(geom) ⇒ GeometryGraph

Returns a new instance of GeometryGraph.



261
262
263
264
265
266
# File 'lib/rgeo/cartesian/planar_graph.rb', line 261

def initialize(geom)
  super()
  @parent_geometry = geom
  @geom_edges = []
  add_geometry(geom)
end

Instance Attribute Details

#geom_edgesObject (readonly)

Returns the value of attribute geom_edges.



267
268
269
# File 'lib/rgeo/cartesian/planar_graph.rb', line 267

def geom_edges
  @geom_edges
end

#parent_geometryObject (readonly)

Returns the value of attribute parent_geometry.



267
268
269
# File 'lib/rgeo/cartesian/planar_graph.rb', line 267

def parent_geometry
  @parent_geometry
end