osm-rb 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 442a641d7182558fa34b55f84e4b37648fe03078cdf2eb704ddb98905a82c5e0
4
- data.tar.gz: cfd0a4323b9f5f80c0c7a647e895292d12674c1c347a55fbaae3a514804407dd
3
+ metadata.gz: 1e2f6455ba370f323495f435a6a7347b1a21747fb52aacfe3642c7505c90bb22
4
+ data.tar.gz: 88e75136f4e2965ba906e1c211fd7919039d475d16cd03a148be94ebc3be6a36
5
5
  SHA512:
6
- metadata.gz: 56901256e4ef89dd5191b7b69150933818f4c0949640eea1d0802fded0820830d6db93048cf22798c9331e232ade88c5173857083ce136dd656a2f57f9873d90
7
- data.tar.gz: 34a69c2d683a1599d1da020bc9917d160a9ddf35a6a45da017e0b83817dea3b1c5437145b742c715dcd78ed1f043853219ea16680cd6eef0660235c45ae6afc6
6
+ metadata.gz: a508b4159041ae8656e4aca6bcf5ca407d96d35b4a0c8a822e6efe9272290ddeba5d4ab56fef2c7ef23c49533cbb91afcce335b9751560da6a431abe39d919e5
7
+ data.tar.gz: e617df00d4cda4d34cf9b1c53c924b55562323a0ee12d46f31490af4f5806a1be303a027d05ceb69923e1c4dabc9cf7462cfbe1f247cc6f4b04099e75315b718
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- osm-rb (0.0.7)
4
+ osm-rb (0.0.8)
5
5
  oily_png (~> 1.2.1)
6
6
  typhoeus (~> 1.3.1)
7
7
 
data/lib/osm.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module OSM
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
 
4
4
  require_relative 'osm/calculator'
5
5
  require_relative 'osm/exporter'
@@ -23,10 +23,11 @@ module OSM
23
23
  end
24
24
 
25
25
  def pixels(path)
26
+ crop = crop_dimensions(path)
26
27
  top_left = top_left_tile(path)
27
28
  path.map do |point|
28
29
  pixel = lat_lng_to_pixel(point)
29
- OpenStruct.new(x: pixel.x - (top_left.x * TILE_SIZE), y: pixel.y - (top_left.y * TILE_SIZE))
30
+ OpenStruct.new(x: pixel.x - (top_left.x * TILE_SIZE) - crop.x, y: pixel.y - (top_left.y * TILE_SIZE) - crop.y)
30
31
  end
31
32
  end
32
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osm-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas_Skywalker