GeoRuby 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,4 +1,5 @@
1
1
  =GeoRuby
2
+
2
3
  This is GeoRuby 1.2.3 It is intended as a holder for data returned from PostGIS and the Spatial Extensions of MySql. The data model roughly follows the OGC "Simple Features for SQL" specification (see http://www.opengis.org/docs/99-049.pdf), although without any kind of advanced functionalities (such as geometric operators or reprojections).
3
4
 
4
5
  ===Available data types
@@ -41,7 +42,7 @@ To install the latest version, just type :
41
42
  - Geometric operators
42
43
 
43
44
  ===Acknowledgement
44
- The SHP reading part uses a modified version of the DBF library (http://rubyforge.org/projects/dbf/) by Keith Morrison (http://infused.org).
45
+ The SHP reading part uses a modified version of the DBF library (http://rubyforge.org/projects/dbf/) by Keith Morrison (http://infused.org). Thanks also to Pramukta Kumar and Pete Schwamb for their contributions.
45
46
 
46
47
  ===License
47
48
  GeoRuby is released under the MIT license.
@@ -156,17 +156,21 @@ module GeoRuby
156
156
  end
157
157
  #transforms a HexEWKB string into an EWKB string
158
158
  def decode_hex(hexewkb)
159
- temp_hexewkb= hexewkb.clone
160
159
  result=""
161
- while c = temp_hexewkb.slice!(0,2) do
162
- break if c.length==0
163
- result << c.hex
160
+ num_bytes = (hexewkb.size + 1) / 2
161
+ 0.upto(num_bytes-1) do |i|
162
+ result << hexewkb[i*2,2].hex
164
163
  end
165
164
  result
166
165
  end
167
-
168
166
  end
169
167
 
168
+ class HexEWKBParser < EWKBParser
169
+ #transforms a HexEWKB string into an EWKB string
170
+ # Patched for speedup
171
+
172
+ end
173
+
170
174
  class UnpackStructure #:nodoc:
171
175
  NDR=1
172
176
  XDR=0
@@ -19,6 +19,15 @@ module GeoRuby#:nodoc:
19
19
  @with_m=with_m
20
20
  end
21
21
 
22
+ def srid=(new_srid)
23
+ @srid = new_srid
24
+ unless self.is_a?(Point)
25
+ self.each do |geom|
26
+ geom.srid=new_srid
27
+ end
28
+ end
29
+ end
30
+
22
31
 
23
32
  #to be implemented in subclasses
24
33
  def bounding_box
data/rakefile.rb CHANGED
@@ -24,7 +24,7 @@ spec = Gem::Specification::new do |s|
24
24
  s.platform = Gem::Platform::RUBY
25
25
 
26
26
  s.name = 'GeoRuby'
27
- s.version = "1.2.3"
27
+ s.version = "1.2.4"
28
28
  s.summary = "Ruby data holder for OGC Simple Features"
29
29
  s.description = <<EOF
30
30
  GeoRuby is intended as a holder for data returned from PostGIS and MySQL Spatial queries. The data model roughly follows the OGC "Simple Features for SQL" specification (see www.opengis.org/docs/99-049.pdf), although without any kind of advanced functionalities (such as geometric operators or reprojections)
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: GeoRuby
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.3
7
- date: 2007-04-01 00:00:00 +02:00
6
+ version: 1.2.4
7
+ date: 2007-07-20 00:00:00 +02:00
8
8
  summary: Ruby data holder for OGC Simple Features
9
9
  require_paths:
10
10
  - lib