spatial_features 3.6.2 → 3.6.3

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: 3ebf096f67bbcf896b1ab6530ae6165e9fbc1339b1e1860021c0788432167d55
4
- data.tar.gz: bb86a50a88c2350b9ec66b78d808e40a78aab49acd64984ddd9ab78e19138146
3
+ metadata.gz: 90e1672d25b0ffc7f11092c8518322c41597c2ebc826c5db42ab4e20bb5e3ff8
4
+ data.tar.gz: 61e0e85d335afd245d87e7d6aef3ad892398c704235b450ab45f949fd7d04a74
5
5
  SHA512:
6
- metadata.gz: 9faadb3fdb9fa0f0227b171bf5719e17d199b6fb99a0216be4dac0e4c02880dc87882d5cc8834f4edb606db64ddc2a387130ae3bae789bfb9fda439c02c97ac0
7
- data.tar.gz: 6c88b8d2bf6c824772364ef987c1d995591bc7b793f61fca6919977c6a9dad054d0a6e5269628e82c4112a5318eaa0253e4182b753b37fe0d861664b1e946f49
6
+ metadata.gz: 4af5bcc317b7468ed0eae22689a7d233b129d23179ef03910d6afadd1283c3b7e5f9de7af7468b40ccccce2f445f9988cc43597bfc7d15c207c1dc3ce81b8c47
7
+ data.tar.gz: 3641ff55ebaa1399101cf08637da7fd5b94c3e4f132634266883f8815845acdc682ea693431f191e770ca117cc8e7c5ddb7ffedb60cd1fbadc13681b4c46ff43
@@ -10,7 +10,7 @@ module SpatialFeatures
10
10
  # -118.1,50.9,NaN
11
11
  # -118.1,50.9,0
12
12
  # -118.1,50.9
13
- COORDINATES_WITH_ALTITUDE = /((-?\d+\.\d+,-?\d+\.\d+)(,-?[a-zA-Z\d\.]+))/.freeze
13
+ COORDINATES_WITH_ALTITUDE = /(?<lng>\S+),(?<lat>\S+),(?<alt>\S+)/.freeze
14
14
 
15
15
  def initialize(data, base_dir: nil, **options)
16
16
  @base_dir = base_dir
@@ -117,8 +117,7 @@ module SpatialFeatures
117
117
 
118
118
  def strip_altitude(kml)
119
119
  kml.css('coordinates').each do |coordinates|
120
- next unless COORDINATES_WITH_ALTITUDE.match?(coordinates.content)
121
- coordinates.content = coordinates.content.gsub(COORDINATES_WITH_ALTITUDE, '\2')
120
+ coordinates.content = coordinates.content.gsub(COORDINATES_WITH_ALTITUDE, '\k<lng>,\k<lat>')
122
121
  end
123
122
  end
124
123
  end
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "3.6.2"
2
+ VERSION = "3.6.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spatial_features
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Wallace
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-03-08 00:00:00.000000000 Z
12
+ date: 2024-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails