rgeo 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.rdoc +4 -0
- data/Version +1 -1
- data/ext/geos_c_impl/geometry.c +2 -2
- data/test/common/point_tests.rb +7 -0
- data/test/simple_cartesian/tc_point.rb +1 -0
- data/test/spherical_geographic/tc_point.rb +1 -0
- data/test/tc_oneoff.rb +1 -1
- metadata +2 -2
data/History.rdoc
CHANGED
data/Version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.11
|
data/ext/geos_c_impl/geometry.c
CHANGED
@@ -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
|
-
|
778
|
-
|
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
|
}
|
data/test/common/point_tests.rb
CHANGED
@@ -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)
|
data/test/tc_oneoff.rb
CHANGED
@@ -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(:
|
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.
|
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-
|
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
|