lib/ogr/geometry.rb in ffi-gdal-1.0.0.beta1 vs lib/ogr/geometry.rb in ffi-gdal-1.0.0.beta3
- old
+ new
@@ -20,9 +20,10 @@
geometry = if geometry.kind_of?(OGR::Geometry)
geometry
else
new(geometry)
end
+
case geometry.name
when 'POINT' then OGR::Point.new(geometry.c_pointer)
when 'LINESTRING' then OGR::LineString.new(geometry.c_pointer)
when 'LINEARRING' then OGR::LinearRing.new(geometry.c_pointer)
when 'POLYGON' then OGR::Polygon.new(geometry.c_pointer)