Module: RGeo::Geos::CAPILineMethods

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

Instance Method Summary collapse

Instance Method Details

#geometry_typeObject


54
55
56
57
58
59
60
61
62
63
64
65
# File 'ext/geos_c_impl/line_string.c', line 54

static VALUE method_line_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_line_module;
  }
  return result;
}

#hashObject


384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'ext/geos_c_impl/line_string.c', line 384

static VALUE method_line_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_line_module, hash);
  hash = rgeo_geos_coordseq_hash(self_data->geos_context, self_data->geom, hash);
  return LONG2FIX(rb_hash_end(hash));
}