urbanopt-geojson 0.6.0 → 0.6.1

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: 1177155e42c7b976e0bba641d13617dae7db1220e971fb44e2eacd36c56cf604
4
- data.tar.gz: 3f652cdd3f2e48f0b03b3e8442ac6cbf59e8e11d022b2ced4ee169a217154a68
3
+ metadata.gz: 1dfd7b2235f50e9b2b92cf8ea2dc881f4acaef5780efdad52e62a4374da0ccea
4
+ data.tar.gz: cf1e4886672459a81392742d27e66eeffe4fda5219fa2bd21dedcfd0e9d84495
5
5
  SHA512:
6
- metadata.gz: 07f86e2c1b21a9c3ece7b22a45da2d80cb5bfe3231e5e8a774055abe8f27b62899ed7dac00691a8d960f20d8c3d94f14d0b8c15c17f99662d4e0ca2c9d363cd5
7
- data.tar.gz: 93909d7d9d6d66756d8f67c8e21ed91153f67fd7f8ce3e848cbe351958071cb99257ce880c6035a44a101f95865033463b8a7f9b2fe65f5af6787271d8af4908
6
+ metadata.gz: bafdbbd705821f682caa45689d4d5ab754359d140c26cf08543ca4ec5e4033c17241c11fe0fe1e31cf7cf8b6b201d2e9fe4d9c8bcfab1515fcd6b225cfec561f
7
+ data.tar.gz: 0fec6b2304ad32b7d7443ca297c8b01062e9294853e15aed0d34d6c774581629bd4a2ebb5ba3004f8f46737385c98bcf4b122f57ebd1a8aa01c4297a5a5f99e6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # URBANopt GeoJSON Gem
2
2
 
3
+ ## Version 0.6.1
4
+
5
+ Date Range: 04/27/21 - 04/29/21
6
+
7
+ - Fixed [#155]( https://github.com/urbanopt/urbanopt-geojson-gem/issues/155 ), Adjacent buildings do not show up as shading objects
8
+ - Fixed [#158]( https://github.com/urbanopt/urbanopt-geojson-gem/issues/158 ), Fix coordinates
9
+
3
10
  ## Version 0.6.0
4
11
 
5
12
  Date Range: 04/02/21 - 04/26/21
@@ -261,10 +261,12 @@ module URBANopt
261
261
  end
262
262
 
263
263
  ##
264
- # Used to determine the centroid for the feature's coordinates.
264
+ # Used to determine the centroid for the feature's geojson coordinates.
265
265
  #
266
266
  # [Parameters]
267
267
  # * +vertices+ - The first set polygon vertices in the array of feature coordinates.
268
+ # [Returns]
269
+ # Returns Feature centroid coordinates [long, lat]
268
270
  def find_feature_center(vertices)
269
271
  number_of_locations = vertices.length
270
272
 
@@ -288,8 +290,9 @@ module URBANopt
288
290
  central_square_root = Math.sqrt(x * x + y * y)
289
291
  central_latitude = Math.atan2(z, central_square_root)
290
292
 
291
- [central_latitude * 180 / Math::PI,
292
- central_longitude * 180 / Math::PI]
293
+ [central_longitude * 180 / Math::PI,
294
+ central_latitude * 180 / Math::PI]
295
+
293
296
  end
294
297
 
295
298
  private
@@ -308,8 +308,11 @@ module URBANopt
308
308
  # find the polygon of the other_building by passing it to the get_multi_polygons method
309
309
  other_building_points = building.other_points(other_building, other_height, origin_lat_lon, runner, zoning)
310
310
  shadowed = URBANopt::GeoJSON::Helper.is_shadowed(feature_points, other_building_points, origin_lat_lon)
311
+ if shadowed
312
+ runner.registerInfo("Feature #{other_building[:properties][:id]} is acting as shading object for #{building.id}")
313
+ end
311
314
  next unless shadowed
312
- new_building = building.create_other_building(:space_per_building, model, origin_lat_lon, runner, zoning, other_building)
315
+ new_building = building.create_other_building(:space_per_building, model, origin_lat_lon, runner, zoning, 0, other_building)
313
316
  if new_building.nil? || new_building.empty?
314
317
  runner.registerWarning("Failed to create spaces for other building '#{name}'")
315
318
  end
@@ -40,6 +40,6 @@
40
40
 
41
41
  module URBANopt
42
42
  module GeoJSON
43
- VERSION = '0.6.0'.freeze
43
+ VERSION = '0.6.1'.freeze
44
44
  end
45
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urbanopt-geojson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanushree Charan
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-04-27 00:00:00.000000000 Z
13
+ date: 2021-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
207
  requirements: []
208
- rubygems_version: 3.1.2
208
+ rubygems_version: 3.1.4
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: Translate URBANopt GeoJSON format to OpenStudio