rgeo 0.3.11 → 0.3.12

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 CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.3.12 / 2012-04-24
2
+
3
+ * Geos::FFIFactory collection constructors sometimes modified arguments in place, which caused problems for the ZMFactory among other things. Fixed.
4
+
1
5
  === 0.3.11 / 2012-04-14
2
6
 
3
7
  * Geometry#buffer crashed in the geos capi factory. Fixed.
data/Version CHANGED
@@ -1 +1 @@
1
- 0.3.11
1
+ 0.3.12
@@ -431,7 +431,7 @@ module RGeo
431
431
  inner_rings_ = inner_rings_.to_a unless inner_rings_.kind_of?(::Array)
432
432
  return nil unless ::RGeo::Feature::LineString.check_type(outer_ring_)
433
433
  outer_ring_ = _create_fg_linear_ring(outer_ring_.points)
434
- inner_rings_.map! do |r_|
434
+ inner_rings_ = inner_rings_.map do |r_|
435
435
  return nil unless ::RGeo::Feature::LineString.check_type(r_)
436
436
  _create_fg_linear_ring(r_.points)
437
437
  end
@@ -465,7 +465,7 @@ module RGeo
465
465
 
466
466
  def multi_point(elems_)
467
467
  elems_ = elems_.to_a unless elems_.kind_of?(::Array)
468
- elems_.map! do |elem_|
468
+ elems_ = elems_.map do |elem_|
469
469
  elem_ = ::RGeo::Feature.cast(elem_, self, ::RGeo::Feature::Point,
470
470
  :force_new, :keep_subtype)
471
471
  return nil unless elem_
@@ -483,7 +483,7 @@ module RGeo
483
483
  def multi_line_string(elems_)
484
484
  elems_ = elems_.to_a unless elems_.kind_of?(::Array)
485
485
  klasses_ = []
486
- elems_.map! do |elem_|
486
+ elems_ = elems_.map do |elem_|
487
487
  elem_ = ::RGeo::Feature.cast(elem_, self, ::RGeo::Feature::LineString,
488
488
  :force_new, :keep_subtype)
489
489
  return nil unless elem_
@@ -500,7 +500,7 @@ module RGeo
500
500
 
501
501
  def multi_polygon(elems_)
502
502
  elems_ = elems_.to_a unless elems_.kind_of?(::Array)
503
- elems_.map! do |elem_|
503
+ elems_ = elems_.map do |elem_|
504
504
  elem_ = ::RGeo::Feature.cast(elem_, self, ::RGeo::Feature::Polygon,
505
505
  :force_new, :keep_subtype)
506
506
  return nil unless elem_
@@ -227,6 +227,14 @@ module RGeo
227
227
  end
228
228
 
229
229
 
230
+ def test_zm
231
+ factory_ = create_factory(:has_z_coordinate => true, :has_m_coordinate => true)
232
+ p1_ = factory_.point(1, 2, 3, 4)
233
+ mp_ = factory_.multi_point([p1_])
234
+ assert_equal(p1_, mp_[0])
235
+ end
236
+
237
+
230
238
  end
231
239
 
232
240
  end
@@ -47,8 +47,8 @@ module RGeo
47
47
  class TestMultiPoint < ::Test::Unit::TestCase # :nodoc:
48
48
 
49
49
 
50
- def create_factory
51
- ::RGeo::Geos.factory
50
+ def create_factory(opts_={})
51
+ ::RGeo::Geos.factory(opts_)
52
52
  end
53
53
 
54
54
 
@@ -47,8 +47,8 @@ module RGeo
47
47
  class TestMultiPoint < ::Test::Unit::TestCase # :nodoc:
48
48
 
49
49
 
50
- def create_factory
51
- ::RGeo::Geos.factory(:native_interface => :ffi)
50
+ def create_factory(opts_={})
51
+ ::RGeo::Geos.factory(opts_.merge(:native_interface => :ffi))
52
52
  end
53
53
 
54
54
 
@@ -59,6 +59,11 @@ module RGeo
59
59
  include ::RGeo::Tests::Common::PointTests
60
60
 
61
61
 
62
+ # TEMP until ffi-geos 0.0.5 is released
63
+ undef_method :test_buffer
64
+ # END_TEMP
65
+
66
+
62
67
  def test_has_no_projection
63
68
  point_ = @factory.point(21, -22)
64
69
  assert(!point_.respond_to?(:projection))
@@ -47,8 +47,9 @@ module RGeo
47
47
  class TestMultiPoint < ::Test::Unit::TestCase # :nodoc:
48
48
 
49
49
 
50
- def create_factory
51
- ::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)
50
+ def create_factory(opts_={})
51
+ ::RGeo::Geographic.projected_factory(opts_.merge(
52
+ :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))
52
53
  end
53
54
 
54
55
 
@@ -47,8 +47,8 @@ module RGeo
47
47
  class TestMultiPoint < ::Test::Unit::TestCase # :nodoc:
48
48
 
49
49
 
50
- def create_factory
51
- @factory = ::RGeo::Cartesian.simple_factory
50
+ def create_factory(opts_={})
51
+ @factory = ::RGeo::Cartesian.simple_factory(opts_)
52
52
  end
53
53
 
54
54
 
@@ -47,8 +47,8 @@ module RGeo
47
47
  class TestMultiPoint < ::Test::Unit::TestCase # :nodoc:
48
48
 
49
49
 
50
- def create_factory
51
- ::RGeo::Geographic.simple_mercator_factory
50
+ def create_factory(opts_={})
51
+ ::RGeo::Geographic.simple_mercator_factory(opts_)
52
52
  end
53
53
 
54
54
 
@@ -58,6 +58,11 @@ module RGeo
58
58
  include ::RGeo::Tests::Common::PointTests
59
59
 
60
60
 
61
+ # TEMP until ffi-geos 0.0.5 is released
62
+ undef_method :test_buffer
63
+ # END_TEMP
64
+
65
+
61
66
  def test_has_projection
62
67
  point_ = @factory.point(21, -22)
63
68
  assert(point_.respond_to?(:projection))
@@ -47,8 +47,8 @@ module RGeo
47
47
  class TestMultiPoint < ::Test::Unit::TestCase # :nodoc:
48
48
 
49
49
 
50
- def create_factory
51
- @factory = ::RGeo::Geographic.spherical_factory
50
+ def create_factory(opts_={})
51
+ @factory = ::RGeo::Geographic.spherical_factory(opts_)
52
52
  end
53
53
 
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.11
4
+ version: 0.3.12
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-14 00:00:00.000000000 Z
12
+ date: 2012-04-24 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