Class: RGeo::Geos::CAPILinearRingImpl

Inherits:
Object
  • Object
show all
Includes:
CAPIGeometryMethods, CAPILineStringMethods, CAPILinearRingMethods
Defined in:
lib/rgeo/geos/capi_feature_classes.rb,
ext/geos_c_impl/globals.c

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CAPILinearRingMethods

#geometry_type, #hash

Methods included from CAPILineStringMethods

#closed?, #coordinates, #end_point, #eql?, #geometry_type, #hash, #interpolate_point, #is_closed?, #is_ring?, #length, #num_points, #point_n, #points, #project_point, #rep_equals?, #ring?, #start_point

Methods included from CAPIGeometryMethods

#*, #+, #-, #==, #_as_text, #_steal, #as_binary, #as_text, #boundary, #buffer, #buffer_with_style, #contains?, #convex_hull, #crosses?, #difference, #dimension, #disjoint?, #distance, #empty?, #encode_with, #envelope, #eql?, #equals?, #factory, #factory=, #geometry_type, #init_with, #initialize_copy, #initialized?, #inspect, #intersection, #intersects?, #invalid_reason, #is_empty?, #is_simple?, #marshal_dump, #marshal_load, #overlaps?, #point_on_surface, #prepare!, #prepared?, #relate?, #rep_equals?, #simple?, #simplify, #simplify_preserve_topology, #srid, #sym_difference, #touches?, #unary_union, #union, #valid?, #within?

Class Method Details

._copy_from(factory, original) ⇒ Object


627
628
629
630
# File 'ext/geos_c_impl/line_string.c', line 627

static VALUE cmethod_linear_ring_copy_from(VALUE klass, VALUE factory, VALUE original)
{
  return impl_copy_from(klass, factory, original, 2);
}

.create(factory, array) ⇒ Object

Class methods for CAPILinearRingImpl


500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'ext/geos_c_impl/line_string.c', line 500

static VALUE cmethod_create_linear_ring(VALUE module, VALUE factory, VALUE array)
{
  VALUE result;
  GEOSCoordSequence* coord_seq;
  RGeo_FactoryData* factory_data;
  GEOSGeometry* geom;

  result = Qnil;
  coord_seq = coord_seq_from_array(factory, array, 1);
  if (coord_seq) {
    factory_data = RGEO_FACTORY_DATA_PTR(factory);
    geom = GEOSGeom_createLinearRing_r(factory_data->geos_context, coord_seq);
    if (geom) {
      result = rgeo_wrap_geos_geometry(factory, geom, rgeo_geos_linear_ring_class);
    }
  }
  return result;
}

Instance Method Details

#ccw?Boolean

Returns:

  • (Boolean)

105
106
107
# File 'lib/rgeo/geos/capi_feature_classes.rb', line 105

def ccw?
  RGeo::Cartesian::Analysis.ccw?(self)
end