Module: RGeo::Geos::CAPILinearRingMethods

Included in:
CAPILinearRingImpl
Defined in:
ext/geos_c_impl/line_string.c

Instance Method Summary collapse

Instance Method Details

#geometry_typeObject


40
41
42
43
44
45
46
47
48
49
50
51
# File 'ext/geos_c_impl/line_string.c', line 40

static VALUE method_linear_ring_geometry_type(VALUE self)
{
  VALUE result;
  RGeo_GeometryData* self_data;

  result = Qnil;
  self_data = RGEO_GEOMETRY_DATA_PTR(self);
  if (self_data->geom) {
    result = rgeo_feature_linear_ring_module;
  }
  return result;
}

#hashObject


369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'ext/geos_c_impl/line_string.c', line 369

static VALUE method_linear_ring_hash(VALUE self)
{
  st_index_t hash;
  RGeo_GeometryData* self_data;
  VALUE factory;

  self_data = RGEO_GEOMETRY_DATA_PTR(self);
  factory = self_data->factory;
  hash = rb_hash_start(0);
  hash = rgeo_geos_objbase_hash(factory, rgeo_feature_linear_ring_module, hash);
  hash = rgeo_geos_coordseq_hash(self_data->geos_context, self_data->geom, hash);
  return LONG2FIX(rb_hash_end(hash));
}