rgeo 0.3.10 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ === 0.3.11 / 2012-04-14
2
+
3
+ * Geometry#buffer crashed in the geos capi factory. Fixed.
4
+
1
5
  === 0.3.10 / 2012-04-12
2
6
 
3
7
  * Implemented subdivision and other analysis features on Cartesian::BoundingBox.
data/Version CHANGED
@@ -1 +1 @@
1
- 0.3.10
1
+ 0.3.11
@@ -774,8 +774,8 @@ static VALUE method_geometry_buffer(VALUE self, VALUE distance)
774
774
  self_geom = self_data->geom;
775
775
  if (self_geom) {
776
776
  factory = self_data->factory;
777
- resolution = NUM2INT(RGEO_FACTORY_DATA_PTR(factory)->buffer_resolution);
778
- result = rgeo_wrap_geos_geometry(factory, GEOSBuffer_r(self_data->geos_context, self_geom, rb_num2dbl(distance), resolution), Qnil);
777
+ result = rgeo_wrap_geos_geometry(factory, GEOSBuffer_r(self_data->geos_context, self_geom,
778
+ rb_num2dbl(distance), RGEO_FACTORY_DATA_PTR(factory)->buffer_resolution), Qnil);
779
779
  }
780
780
  return result;
781
781
  }
@@ -282,6 +282,13 @@ module RGeo
282
282
  end
283
283
 
284
284
 
285
+ def test_buffer
286
+ point_ = @factory.point(11, 12)
287
+ buffer_ = point_.buffer(4)
288
+ assert_equal(::RGeo::Feature::Polygon, buffer_.geometry_type)
289
+ end
290
+
291
+
285
292
  def test_3dz_creation
286
293
  point_ = @zfactory.point(11, 12, 13)
287
294
  assert_equal(11, point_.x)
@@ -82,6 +82,7 @@ module RGeo
82
82
  undef_method :test_union
83
83
  undef_method :test_difference
84
84
  undef_method :test_sym_difference
85
+ undef_method :test_buffer
85
86
 
86
87
 
87
88
  end
@@ -100,6 +100,7 @@ module RGeo
100
100
  undef_method :test_union
101
101
  undef_method :test_difference
102
102
  undef_method :test_sym_difference
103
+ undef_method :test_buffer
103
104
 
104
105
 
105
106
  end
@@ -48,7 +48,7 @@ module RGeo
48
48
  # @mercator_factory = ::RGeo::Geographic.simple_mercator_factory
49
49
  # @spherical_factory = ::RGeo::Geographic.spherical_factory(:has_z_coordinate => true)
50
50
  # @projected_factory = ::RGeo::Geographic.projected_factory(:projection_proj4 => '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs', :projection_srid => 3857, :has_z_coordinate => true)
51
- # @geos_factory = ::RGeo::Geos.factory(:srid => 4326, :has_z_coordinate => true)
51
+ # @geos_factory = ::RGeo::Geos.factory(:buffer_resolution => 8)
52
52
  # @cartesian_factory = ::RGeo::Cartesian.simple_factory(:srid => 1, :has_z_coordinate => true)
53
53
  end
54
54
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgeo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-13 00:00:00.000000000 Z
12
+ date: 2012-04-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: RGeo is a geospatial data library for Ruby. It provides an implementation
15
15
  of the Open Geospatial Consortium's Simple Features Specification, used by most