Method: RGeo::Geos::CAPILinearRingImpl.create

Defined in:
ext/geos_c_impl/line_string.c

.create(factory, array) ⇒ Object

Class methods for CAPILinearRingImpl



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

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

  result = Qnil;
  coord_seq = coord_seq_from_array(factory, array, 1);
  if (coord_seq) {
    geom = GEOSGeom_createLinearRing(coord_seq);
    if (geom) {
      result =
        rgeo_wrap_geos_geometry(factory, geom, rgeo_geos_linear_ring_class);
    }
  }
  return result;
}