Method: RGeo::Geos::CAPILineStringMethods#length
- Defined in:
- ext/geos_c_impl/line_string.c
#length ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'ext/geos_c_impl/line_string.c', line 64 static VALUE method_line_string_length(VALUE self) { VALUE result; RGeo_GeometryData* self_data; const GEOSGeometry* self_geom; double len; result = Qnil; self_data = RGEO_GEOMETRY_DATA_PTR(self); self_geom = self_data->geom; if (self_geom) { if (GEOSLength(self_geom, &len)) { result = rb_float_new(len); } } return result; } |