citysdk 0.1.2 → 0.1.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80f778b266a000d352d58b214a3551c3c8bb4167
4
- data.tar.gz: b02aa2003dcd17c3ca574f85c8cb7898a8288185
3
+ metadata.gz: 1a488ab3d05dd175923b1d8f53d878bc397e0b0c
4
+ data.tar.gz: 39c3032f03c84f5970d85be520087d376a9f2d02
5
5
  SHA512:
6
- metadata.gz: 5bb623986559c0152311b4fe33c09e3a54bf072466db7c45a0ff39af9f7f8d025923d8d75581a8b5fc04df575303bf4d1e78eca8cb0ff9fcdd15da0564e6ce6b
7
- data.tar.gz: eca39a96b96054caac08fd0e2f33612fb8824a4c60bcd8f52541b823a968ae59f4e462a26c35c3fa66858e91bca469fa9d368c814f5d7bbf8def4838995846eb
6
+ metadata.gz: d87ad0933201d94bce82f1a4b680779b6458117e1c9408f530dee1d156021977e37be352d01f5d23f2714985da2968097741408684b90da87090ea09a3fb4e34
7
+ data.tar.gz: 5272b2895b28c58bf2fdf7ae54d5e39fc505878ac48c519baf3222f2bb617567ec998af8f095192798d95370aa5a3a84666ba1210b90265538e217962e5b470b
data/lib/citysdk.rb CHANGED
@@ -4,6 +4,6 @@ require 'citysdk/file_reader.rb'
4
4
  require 'citysdk/importer.rb'
5
5
 
6
6
  module CitySDK
7
- VERSION = "0.1.2"
7
+ VERSION = "0.1.2.1"
8
8
  end
9
9
 
@@ -55,7 +55,7 @@ module CitySDK
55
55
  pd = pc = hn = ad = false
56
56
  @params[:fields].reverse.each do |f|
57
57
  pd = f if ( f.to_s =~ /postcode|post/i )
58
- pc = f if ( f.to_s =~ /^(post|zip)code$/i )
58
+ pc = f if ( f.to_s =~ /^(post|zip|postal)code$/i )
59
59
  hn = f if ( f.to_s =~ /huisnummer|housenumber|(house|huis)(nr|no)|number/i)
60
60
  ad = f if ( f.to_s =~ /address|street|straat|adres/i)
61
61
  end
@@ -125,17 +125,19 @@ module CitySDK
125
125
  return if @content[0][:geometry].nil?
126
126
  @params[:srid] = 4326
127
127
  g = @content[0][:geometry][:coordinates]
128
- while g[0].is_a?(Array)
129
- g = g[0]
130
- end
131
- lon = g[0]
132
- lat = g[1]
133
- # if lon > -180.0 and lon < 180.0 and lat > -90.0 and lat < 90.0
134
- # @params[:srid] = 4326
135
- # els
136
- if lon > -7000.0 and lon < 300000.0 and lat > 289000.0 and lat < 629000.0
137
- # Dutch new rd system
138
- @params[:srid] = 28992
128
+ if(g)
129
+ while g[0].is_a?(Array)
130
+ g = g[0]
131
+ end
132
+ lon = g[0]
133
+ lat = g[1]
134
+ # if lon > -180.0 and lon < 180.0 and lat > -90.0 and lat < 90.0
135
+ # @params[:srid] = 4326
136
+ # els
137
+ if lon > -7000.0 and lon < 300000.0 and lat > 289000.0 and lat < 629000.0
138
+ # Dutch new rd system
139
+ @params[:srid] = 28992
140
+ end
139
141
  end
140
142
  end
141
143
 
@@ -121,7 +121,6 @@ module CitySDK
121
121
  result[:updated] += @filereader.content.length
122
122
  return result
123
123
  end
124
-
125
124
  if failed
126
125
  result[:updated] += (@filereader.content.length - failed.length)
127
126
  end
@@ -179,14 +178,9 @@ module CitySDK
179
178
  @api.match_create_flush
180
179
 
181
180
  elsif @params[:unique_id] and (@params[:hasgeometry] != 'unknown')
182
-
183
- # puts ""
184
- # puts "doImport... 2"
185
- # puts ""
186
181
 
187
182
  begin
188
183
  nodes.each do |rec|
189
-
190
184
  node = {
191
185
  :geom => rec[:geometry],
192
186
  :id => rec[:id]
@@ -224,7 +218,6 @@ module CitySDK
224
218
  sign_in
225
219
  @filereader.content.each do |rec|
226
220
  row = rec[:properties]
227
-
228
221
  pc = row[@params[:postcode]].to_s
229
222
  hn = row[@params[:housenumber]].to_s
230
223
  qres = {}
@@ -254,6 +247,6 @@ module CitySDK
254
247
  end
255
248
  raise Exception.new("Addresses not well defined in dataset.")
256
249
  end
257
-
258
250
  end
259
- end
251
+ end
252
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: citysdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Demeyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-13 00:00:00.000000000 Z
11
+ date: 2013-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dbf