urbanopt-geojson 0.8.1 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/nightly_build.yml +39 -0
  3. data/CHANGELOG.md +13 -0
  4. data/Gemfile +15 -10
  5. data/LICENSE.md +16 -11
  6. data/README.md +3 -0
  7. data/Rakefile +2 -37
  8. data/doc_templates/LICENSE.md +16 -11
  9. data/doc_templates/copyright_erb.txt +2 -37
  10. data/doc_templates/copyright_js.txt +2 -2
  11. data/doc_templates/copyright_ruby.txt +2 -37
  12. data/docs/package-lock.json +18 -18
  13. data/lib/measures/.rubocop.yml +2 -1
  14. data/lib/measures/urban_geometry_creation/LICENSE.md +16 -11
  15. data/lib/measures/urban_geometry_creation/measure.rb +5 -39
  16. data/lib/measures/urban_geometry_creation/measure.xml +28 -28
  17. data/lib/measures/urban_geometry_creation_zoning/LICENSE.md +16 -11
  18. data/lib/measures/urban_geometry_creation_zoning/measure.rb +2 -37
  19. data/lib/measures/urban_geometry_creation_zoning/measure.xml +21 -27
  20. data/lib/urbanopt/geojson/building.rb +2 -37
  21. data/lib/urbanopt/geojson/derived_extension.rb +2 -37
  22. data/lib/urbanopt/geojson/district_system.rb +2 -37
  23. data/lib/urbanopt/geojson/feature.rb +3 -38
  24. data/lib/urbanopt/geojson/geo_file.rb +2 -37
  25. data/lib/urbanopt/geojson/helper.rb +2 -37
  26. data/lib/urbanopt/geojson/logging.rb +2 -37
  27. data/lib/urbanopt/geojson/mapper_classes.rb +2 -37
  28. data/lib/urbanopt/geojson/model.rb +2 -37
  29. data/lib/urbanopt/geojson/region.rb +2 -37
  30. data/lib/urbanopt/geojson/scale_area.rb +2 -37
  31. data/lib/urbanopt/geojson/schema/district_system_properties.json +5 -4
  32. data/lib/urbanopt/geojson/schema/thermal_connector_properties.json +4 -4
  33. data/lib/urbanopt/geojson/schema/thermal_junction_properties.json +6 -2
  34. data/lib/urbanopt/geojson/update_areas.rb +2 -37
  35. data/lib/urbanopt/geojson/validate_geojson.rb +2 -37
  36. data/lib/urbanopt/geojson/version.rb +3 -38
  37. data/lib/urbanopt/geojson/zoning.rb +2 -37
  38. data/lib/urbanopt/geojson.rb +2 -38
  39. data/lib/urbanopt-geojson.rb +2 -37
  40. data/urbanopt-geojson-gem.gemspec +4 -3
  41. metadata +35 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4106ba555afeedb72ee9af421850a0d26226136d64b85c60143fe9cffdab2848
4
- data.tar.gz: dda42f59468fa27eb9e532f4a2e35bd0fa397ce5d929bdcda0a49f26bd701461
3
+ metadata.gz: f96bc006a313e94d99f7a2c1e42abd9584783e4f48bcdd87b19dcc522e5d067d
4
+ data.tar.gz: 30dfa492e5146680b0b0c415b1a30d7fba855915ab3017eb2f8ad96c90e9123c
5
5
  SHA512:
6
- metadata.gz: 70855197e712c96b458553b469840ac6607e1d60dc255b6558470b5fc4225f5561d33b0043972e158b00625c1e257883595c3b327762d9b3cb7e747ec5d33ef5
7
- data.tar.gz: 125d45fe2a4ca9641145a2625870b50bf23ef6b2e876e10e4e655adcd1c68692eaed87dd03976b7b2f7ab44c10fa671b9576d9184fd13be9b3d213053b028c19
6
+ metadata.gz: 28e241fa1db11a655ee6f428870a128449aba7a155f484b0281b6146e6653c3132abb4a056e4bacb490c362de763421248ae000db29f1ef9f6d529c337573772
7
+ data.tar.gz: 437fb1af28c87bc15af741cdfb93911403276d2d55cfea88ce9e184c6174a7e9002bc9695bed2ed0e97b0ca564e42edc2f0f0d5bbaecdebfbad01e05d98084b3
@@ -0,0 +1,39 @@
1
+ name: nightly_build
2
+
3
+ on:
4
+ # push:
5
+ schedule:
6
+ # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
7
+ # 5 am UTC (11pm MDT the day before) every weekday night in MDT
8
+ - cron: '21 5 * * 2-6'
9
+
10
+ env:
11
+ # This env var should enforce develop branch of all dependencies
12
+ FAVOR_LOCAL_GEMS: true
13
+ GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }}
14
+
15
+ jobs:
16
+ weeknight-tests:
17
+ runs-on: ubuntu-latest
18
+ container:
19
+ image: docker://nrel/openstudio:3.6.1
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ - name: Update gems
23
+ run: |
24
+ ruby --version
25
+ bundle update
26
+ - name: List OpenStudio measures
27
+ run: bundle exec rake openstudio:list_measures
28
+ - name: Update OpenStudio measures
29
+ run: bundle exec rake openstudio:update_measures
30
+ - name: Test OpenStudio measures
31
+ run: bundle exec rake openstudio:test_with_openstudio
32
+ - name: Run Rspec
33
+ run: bundle exec rspec
34
+ - name: Coveralls
35
+ # coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
36
+ uses: coverallsapp/github-action@v2
37
+ with:
38
+ github-token: ${{ secrets.GITHUB_TOKEN }}
39
+ path-to-lcov: "./coverage/lcov/urbanopt-geojson-gem.lcov"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # URBANopt GeoJSON Gem
2
2
 
3
+ ## Version 0.10.0
4
+ Date Range: 12/5/22 - 7/19/23
5
+
6
+ - Updating dependencies for OpenStudio 3.6.1
7
+ - Update license and references to the license file
8
+ - Add GHE district system type [#256](https://github.com/urbanopt/urbanopt-geojson-gem/issues/256)
9
+
10
+ ## Version 0.9.0
11
+ Date Range: 06/28/22 - 12/5/22
12
+
13
+ - Updating dependencies for OpenStudio 3.5.0
14
+ - Fixed [#235]( https://github.com/urbanopt/urbanopt-geojson-gem/issues/235 ), Code coverage reporting
15
+
3
16
  ## Version 0.8.1
4
17
  Date Range: 05/11/22 - 06/27/22
5
18
 
data/Gemfile CHANGED
@@ -11,14 +11,19 @@ gemspec
11
11
  # checkout the latest version (develop) from github.
12
12
  allow_local = ENV['FAVOR_LOCAL_GEMS']
13
13
 
14
- if allow_local && File.exist?('../openstudio-extension-gem')
15
- gem 'openstudio-extension', path: '../openstudio-extension-gem'
16
- elsif allow_local
17
- gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop'
18
- end
14
+ # pin this dependency to avoid unicode_normalize error
15
+ gem 'addressable', '2.8.1'
16
+ # pin this dependency to avoid using racc dependency (which has native extensions)
17
+ gem 'parser', '3.2.2.2'
19
18
 
20
- if allow_local && File.exist?('../urbanopt-core-gem')
21
- gem 'urbanopt-core', path: '../urbanopt-core-gem'
22
- elsif allow_local
23
- gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
24
- end
19
+ # if allow_local && File.exist?('../openstudio-extension-gem')
20
+ # gem 'openstudio-extension', path: '../openstudio-extension-gem'
21
+ # elsif allow_local
22
+ # gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop'
23
+ # end
24
+
25
+ # if allow_local && File.exist?('../urbanopt-core-gem')
26
+ # gem 'urbanopt-core', path: '../urbanopt-core-gem'
27
+ # elsif allow_local
28
+ # gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
29
+ # end
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
@@ -25,13 +25,18 @@ refer to any modified version of this software or any modified version of the
25
25
  underlying software originally provided by Alliance without the prior written
26
26
  consent of Alliance.
27
27
 
28
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
29
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
32
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
37
- OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ The name of the copyright holder(s), any contributors, the United States Government,
29
+ the United States Department of Energy, or any of their employees may not be used to
30
+ endorse or promote products derived from this software without specific prior written
31
+ permission from the respective party.
32
+
33
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
34
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
36
+ THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
37
+ STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
38
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
40
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
42
+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # URBANopt GeoJSON Gem
2
2
 
3
+ [![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-geojson-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-geojson-gem?branch=develop)
4
+ [![nightly_build](https://github.com/urbanopt/urbanopt-geojson-gem/actions/workflows/nightly_build.yml/badge.svg)](https://github.com/urbanopt/urbanopt-geojson-gem/actions/workflows/nightly_build.yml)
5
+
3
6
  Library and measures to translate URBANopt™ GeoJSON format to OpenStudio. See the [developer documentation](https://urbanopt.github.io/urbanopt-geojson-gem/) for more details.
4
7
 
5
8
  ## Installation
data/Rakefile CHANGED
@@ -1,41 +1,6 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
3
- # contributors. All rights reserved.
4
-
5
- # Redistribution and use in source and binary forms, with or without modification,
6
- # are permitted provided that the following conditions are met:
7
-
8
- # Redistributions of source code must retain the above copyright notice, this list
9
- # of conditions and the following disclaimer.
10
-
11
- # Redistributions in binary form must reproduce the above copyright notice, this
12
- # list of conditions and the following disclaimer in the documentation and/or other
13
- # materials provided with the distribution.
14
-
15
- # Neither the name of the copyright holder nor the names of its contributors may be
16
- # used to endorse or promote products derived from this software without specific
17
- # prior written permission.
18
-
19
- # Redistribution of this software, without modification, must refer to the software
20
- # by the same designation. Redistribution of a modified version of this software
21
- # (i) may not refer to the modified version by the same designation, or by any
22
- # confusingly similar designation, and (ii) must refer to the underlying software
23
- # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
24
- # the term “URBANopt”, or any confusingly similar designation may not be used to
25
- # refer to any modified version of this software or any modified version of the
26
- # underlying software originally provided by Alliance without the prior written
27
- # consent of Alliance.
28
-
29
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32
- # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33
- # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
37
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
38
- # OF THE POSSIBILITY OF SUCH DAMAGE.
2
+ # URBANopt™, Copyright © Alliance for Sustainable Energy, LLC.
3
+ # See also https://github.com/urbanopt/urbanopt-geojson-gem/blob/develop/LICENSE.md
39
4
  # *********************************************************************************
40
5
 
41
6
  require 'bundler/gem_tasks'
@@ -1,4 +1,4 @@
1
- URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
@@ -25,13 +25,18 @@ refer to any modified version of this software or any modified version of the
25
25
  underlying software originally provided by Alliance without the prior written
26
26
  consent of Alliance.
27
27
 
28
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
29
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
32
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
37
- OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ The name of the copyright holder(s), any contributors, the United States Government,
29
+ the United States Department of Energy, or any of their employees may not be used to
30
+ endorse or promote products derived from this software without specific prior written
31
+ permission from the respective party.
32
+
33
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
34
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
36
+ THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
37
+ STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
38
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
40
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
42
+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,41 +1,6 @@
1
1
  <%
2
2
  # *********************************************************************************
3
- # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
4
- # contributors. All rights reserved.
5
-
6
- # Redistribution and use in source and binary forms, with or without modification,
7
- # are permitted provided that the following conditions are met:
8
-
9
- # Redistributions of source code must retain the above copyright notice, this list
10
- # of conditions and the following disclaimer.
11
-
12
- # Redistributions in binary form must reproduce the above copyright notice, this
13
- # list of conditions and the following disclaimer in the documentation and/or other
14
- # materials provided with the distribution.
15
-
16
- # Neither the name of the copyright holder nor the names of its contributors may be
17
- # used to endorse or promote products derived from this software without specific
18
- # prior written permission.
19
-
20
- # Redistribution of this software, without modification, must refer to the software
21
- # by the same designation. Redistribution of a modified version of this software
22
- # (i) may not refer to the modified version by the same designation, or by any
23
- # confusingly similar designation, and (ii) must refer to the underlying software
24
- # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
25
- # the term “URBANopt”, or any confusingly similar designation may not be used to
26
- # refer to any modified version of this software or any modified version of the
27
- # underlying software originally provided by Alliance without the prior written
28
- # consent of Alliance.
29
-
30
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
31
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
33
- # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
34
- # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
35
- # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
37
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
38
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39
- # OF THE POSSIBILITY OF SUCH DAMAGE.
3
+ # URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
4
+ # See also https://github.com/urbanopt/urbanopt-geojson-gem/blob/develop/LICENSE.md
40
5
  # *********************************************************************************
41
6
  %>
@@ -1,4 +1,4 @@
1
1
  /* @preserve
2
- * URBANopt (tm), Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
3
- * Use of this source code is governed by the BSD 3-Clause license.
2
+ * URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
3
+ * See also https://github.com/urbanopt/urbanopt-geojson-gem/blob/develop/LICENSE.md
4
4
  */
@@ -1,39 +1,4 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
- # contributors. All rights reserved.
4
-
5
- # Redistribution and use in source and binary forms, with or without modification,
6
- # are permitted provided that the following conditions are met:
7
-
8
- # Redistributions of source code must retain the above copyright notice, this list
9
- # of conditions and the following disclaimer.
10
-
11
- # Redistributions in binary form must reproduce the above copyright notice, this
12
- # list of conditions and the following disclaimer in the documentation and/or other
13
- # materials provided with the distribution.
14
-
15
- # Neither the name of the copyright holder nor the names of its contributors may be
16
- # used to endorse or promote products derived from this software without specific
17
- # prior written permission.
18
-
19
- # Redistribution of this software, without modification, must refer to the software
20
- # by the same designation. Redistribution of a modified version of this software
21
- # (i) may not refer to the modified version by the same designation, or by any
22
- # confusingly similar designation, and (ii) must refer to the underlying software
23
- # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
24
- # the term “URBANopt”, or any confusingly similar designation may not be used to
25
- # refer to any modified version of this software or any modified version of the
26
- # underlying software originally provided by Alliance without the prior written
27
- # consent of Alliance.
28
-
29
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32
- # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33
- # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
37
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
38
- # OF THE POSSIBILITY OF SUCH DAMAGE.
2
+ # URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
3
+ # See also https://github.com/urbanopt/urbanopt-geojson-gem/blob/develop/LICENSE.md
39
4
  # *********************************************************************************
@@ -5121,9 +5121,9 @@
5121
5121
  }
5122
5122
  },
5123
5123
  "node_modules/decode-uri-component": {
5124
- "version": "0.2.0",
5125
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
5126
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
5124
+ "version": "0.2.2",
5125
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
5126
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
5127
5127
  "engines": {
5128
5128
  "node": ">=0.10"
5129
5129
  }
@@ -8958,9 +8958,9 @@
8958
8958
  "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
8959
8959
  },
8960
8960
  "node_modules/minimatch": {
8961
- "version": "3.0.4",
8962
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
8963
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
8961
+ "version": "3.1.2",
8962
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
8963
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
8964
8964
  "dependencies": {
8965
8965
  "brace-expansion": "^1.1.7"
8966
8966
  },
@@ -12168,9 +12168,9 @@
12168
12168
  }
12169
12169
  },
12170
12170
  "node_modules/terser": {
12171
- "version": "4.8.0",
12172
- "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
12173
- "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
12171
+ "version": "4.8.1",
12172
+ "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz",
12173
+ "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==",
12174
12174
  "dependencies": {
12175
12175
  "commander": "^2.20.0",
12176
12176
  "source-map": "~0.6.1",
@@ -18169,9 +18169,9 @@
18169
18169
  "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
18170
18170
  },
18171
18171
  "decode-uri-component": {
18172
- "version": "0.2.0",
18173
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
18174
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
18172
+ "version": "0.2.2",
18173
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
18174
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ=="
18175
18175
  },
18176
18176
  "decompress-response": {
18177
18177
  "version": "3.3.0",
@@ -21086,9 +21086,9 @@
21086
21086
  "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
21087
21087
  },
21088
21088
  "minimatch": {
21089
- "version": "3.0.4",
21090
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
21091
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
21089
+ "version": "3.1.2",
21090
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
21091
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
21092
21092
  "requires": {
21093
21093
  "brace-expansion": "^1.1.7"
21094
21094
  }
@@ -23695,9 +23695,9 @@
23695
23695
  "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="
23696
23696
  },
23697
23697
  "terser": {
23698
- "version": "4.8.0",
23699
- "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
23700
- "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
23698
+ "version": "4.8.1",
23699
+ "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz",
23700
+ "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==",
23701
23701
  "requires": {
23702
23702
  "commander": "^2.20.0",
23703
23703
  "source-map": "~0.6.1",
@@ -1,5 +1,6 @@
1
1
  AllCops:
2
2
  Exclude:
3
3
  - 'spec/test_measures/**/*'
4
+ require: rubocop-performance
4
5
  inherit_from:
5
- - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v3.yml
6
+ - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v4.yml
@@ -1,4 +1,4 @@
1
- URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
1
+ URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
2
2
  contributors. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
@@ -25,13 +25,18 @@ refer to any modified version of this software or any modified version of the
25
25
  underlying software originally provided by Alliance without the prior written
26
26
  consent of Alliance.
27
27
 
28
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
29
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
32
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
37
- OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ The name of the copyright holder(s), any contributors, the United States Government,
29
+ the United States Department of Energy, or any of their employees may not be used to
30
+ endorse or promote products derived from this software without specific prior written
31
+ permission from the respective party.
32
+
33
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
34
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
36
+ THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
37
+ STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
38
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
40
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
42
+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,43 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # *********************************************************************************
4
- # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
5
- # contributors. All rights reserved.
6
-
7
- # Redistribution and use in source and binary forms, with or without modification,
8
- # are permitted provided that the following conditions are met:
9
-
10
- # Redistributions of source code must retain the above copyright notice, this list
11
- # of conditions and the following disclaimer.
12
-
13
- # Redistributions in binary form must reproduce the above copyright notice, this
14
- # list of conditions and the following disclaimer in the documentation and/or other
15
- # materials provided with the distribution.
16
-
17
- # Neither the name of the copyright holder nor the names of its contributors may be
18
- # used to endorse or promote products derived from this software without specific
19
- # prior written permission.
20
-
21
- # Redistribution of this software, without modification, must refer to the software
22
- # by the same designation. Redistribution of a modified version of this software
23
- # (i) may not refer to the modified version by the same designation, or by any
24
- # confusingly similar designation, and (ii) must refer to the underlying software
25
- # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
26
- # the term “URBANopt”, or any confusingly similar designation may not be used to
27
- # refer to any modified version of this software or any modified version of the
28
- # underlying software originally provided by Alliance without the prior written
29
- # consent of Alliance.
30
-
31
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
32
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
34
- # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
35
- # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
36
- # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
38
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
39
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
40
- # OF THE POSSIBILITY OF SUCH DAMAGE.
4
+ # URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
5
+ # See also https://github.com/urbanopt/urbanopt-geojson-gem/blob/develop/LICENSE.md
41
6
  # *********************************************************************************
42
7
 
43
8
  require 'json'
@@ -148,7 +113,8 @@ class UrbanGeometryCreation < OpenStudio::Measure::ModelMeasure
148
113
  @runner.registerWarning("Surface elevation not set for building '#{name}'")
149
114
  end
150
115
 
151
- if feature.type == 'Building'
116
+ case feature.type
117
+ when 'Building'
152
118
  # make requested building
153
119
  # pass in scaled_footprint_area (calculated from floor_area / number_of_stories)
154
120
  scaled_footprint_area = 0
@@ -205,7 +171,7 @@ class UrbanGeometryCreation < OpenStudio::Measure::ModelMeasure
205
171
  URBANopt::GeoJSON::Helper.convert_to_shading_surface_group(space)
206
172
  end
207
173
 
208
- elsif feature.type == 'District System'
174
+ when 'District System'
209
175
  district_system_type = feature[:properties][:district_system_type]
210
176
  if district_system_type == 'Community Photovoltaic'
211
177
  shading_surfaces = URBANopt::GeoJSON::Helper.create_photovoltaics(feature, 0, model, @origin_lat_lon, @runner)
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>urban_geometry_creation</name>
5
5
  <uid>5ab85d6b-c9af-4361-8ab9-613ee99a5666</uid>
6
- <version_id>9eeca0c7-ef9d-4829-aa2c-b2c138a963c1</version_id>
7
- <version_modified>20210602T203055Z</version_modified>
6
+ <version_id>7f03040a-cc98-4c54-ae40-f33db7f534b7</version_id>
7
+ <version_modified>2023-07-06T15:57:24Z</version_modified>
8
8
  <xml_checksum>D254E772</xml_checksum>
9
9
  <class_name>UrbanGeometryCreation</class_name>
10
10
  <display_name>UrbanGeometryCreation</display_name>
@@ -104,52 +104,52 @@
104
104
  </attribute>
105
105
  </attributes>
106
106
  <files>
107
+ <file>
108
+ <filename>LICENSE.md</filename>
109
+ <filetype>md</filetype>
110
+ <usage_type>license</usage_type>
111
+ <checksum>9A4578CE</checksum>
112
+ </file>
113
+ <file>
114
+ <filename>README.md</filename>
115
+ <filetype>md</filetype>
116
+ <usage_type>readme</usage_type>
117
+ <checksum>74F54DC5</checksum>
118
+ </file>
107
119
  <file>
108
120
  <filename>README.md.erb</filename>
109
121
  <filetype>erb</filetype>
110
122
  <usage_type>readmeerb</usage_type>
111
123
  <checksum>703C9964</checksum>
112
124
  </file>
125
+ <file>
126
+ <version>
127
+ <software_program>OpenStudio</software_program>
128
+ <identifier>1.9.0</identifier>
129
+ <min_compatible>1.9.0</min_compatible>
130
+ </version>
131
+ <filename>measure.rb</filename>
132
+ <filetype>rb</filetype>
133
+ <usage_type>script</usage_type>
134
+ <checksum>4B36EB4E</checksum>
135
+ </file>
113
136
  <file>
114
137
  <filename>nrel_stm_footprints.geojson</filename>
115
138
  <filetype>geojson</filetype>
116
139
  <usage_type>test</usage_type>
117
140
  <checksum>40290298</checksum>
118
141
  </file>
119
- <file>
120
- <filename>README.md</filename>
121
- <filetype>md</filetype>
122
- <usage_type>readme</usage_type>
123
- <checksum>74F54DC5</checksum>
124
- </file>
125
- <file>
126
- <filename>LICENSE.md</filename>
127
- <filetype>md</filetype>
128
- <usage_type>license</usage_type>
129
- <checksum>03523BF4</checksum>
130
- </file>
131
142
  <file>
132
143
  <filename>shadowed_tests.rb</filename>
133
144
  <filetype>rb</filetype>
134
145
  <usage_type>test</usage_type>
135
- <checksum>682820CD</checksum>
146
+ <checksum>1AD96F0B</checksum>
136
147
  </file>
137
148
  <file>
138
149
  <filename>urban_geometry_creation_test.rb</filename>
139
150
  <filetype>rb</filetype>
140
151
  <usage_type>test</usage_type>
141
- <checksum>FD5181F7</checksum>
142
- </file>
143
- <file>
144
- <version>
145
- <software_program>OpenStudio</software_program>
146
- <identifier>1.9.0</identifier>
147
- <min_compatible>1.9.0</min_compatible>
148
- </version>
149
- <filename>measure.rb</filename>
150
- <filetype>rb</filetype>
151
- <usage_type>script</usage_type>
152
- <checksum>3667C98F</checksum>
152
+ <checksum>CA11D7FF</checksum>
153
153
  </file>
154
154
  </files>
155
155
  </measure>