Method: RGeo::Geos::CAPIGeometryMethods#dimension

Defined in:
ext/geos_c_impl/geometry.c

#dimensionObject

[View source]

159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'ext/geos_c_impl/geometry.c', line 159

static VALUE
method_geometry_dimension(VALUE self)
{
  VALUE result;
  RGeo_GeometryData* self_data;
  const GEOSGeometry* self_geom;

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