urbanopt-geojson 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +22 -0
  4. data/LICENSE.md +1 -1
  5. data/doc_templates/LICENSE.md +1 -1
  6. data/doc_templates/copyright_erb.txt +1 -1
  7. data/doc_templates/copyright_js.txt +2 -2
  8. data/doc_templates/copyright_ruby.txt +1 -1
  9. data/docs/package-lock.json +15961 -1719
  10. data/lib/measures/urban_geometry_creation/measure.rb +1 -1
  11. data/lib/measures/urban_geometry_creation_zoning/measure.rb +1 -1
  12. data/lib/urbanopt/geojson/building.rb +1 -1
  13. data/lib/urbanopt/geojson/derived_extension.rb +1 -1
  14. data/lib/urbanopt/geojson/district_system.rb +1 -1
  15. data/lib/urbanopt/geojson/feature.rb +2 -2
  16. data/lib/urbanopt/geojson/geo_file.rb +18 -3
  17. data/lib/urbanopt/geojson/helper.rb +1 -1
  18. data/lib/urbanopt/geojson/logging.rb +1 -1
  19. data/lib/urbanopt/geojson/mapper_classes.rb +1 -1
  20. data/lib/urbanopt/geojson/model.rb +1 -1
  21. data/lib/urbanopt/geojson/region.rb +1 -1
  22. data/lib/urbanopt/geojson/scale_area.rb +1 -1
  23. data/lib/urbanopt/geojson/schema/breaker_properties.json +33 -0
  24. data/lib/urbanopt/geojson/schema/building_properties.json +641 -591
  25. data/lib/urbanopt/geojson/schema/capacitor_properties.json +38 -0
  26. data/lib/urbanopt/geojson/schema/consumer_properties.json +58 -0
  27. data/lib/urbanopt/geojson/schema/distribution_generator.json +45 -0
  28. data/lib/urbanopt/geojson/schema/distribution_transformer.json +54 -0
  29. data/lib/urbanopt/geojson/schema/district_system_properties.json +10 -15
  30. data/lib/urbanopt/geojson/schema/dummy_node_properties.json +21 -0
  31. data/lib/urbanopt/geojson/schema/electrical_connector_properties.json +6 -135
  32. data/lib/urbanopt/geojson/schema/hvmv_substation_properties.json +54 -0
  33. data/lib/urbanopt/geojson/schema/line_properties.json +69 -0
  34. data/lib/urbanopt/geojson/schema/region_properties.json +1 -1
  35. data/lib/urbanopt/geojson/schema/site_properties.json +126 -98
  36. data/lib/urbanopt/geojson/schema/switch_properties.json +33 -0
  37. data/lib/urbanopt/geojson/update_areas.rb +1 -1
  38. data/lib/urbanopt/geojson/validate_geojson.rb +1 -1
  39. data/lib/urbanopt/geojson/version.rb +2 -2
  40. data/lib/urbanopt/geojson/zoning.rb +1 -1
  41. data/lib/urbanopt/geojson.rb +1 -1
  42. data/lib/urbanopt-geojson.rb +1 -1
  43. data/urbanopt-geojson-gem.gemspec +1 -1
  44. metadata +13 -4
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # *********************************************************************************
4
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
4
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
5
5
  # contributors. All rights reserved.
6
6
 
7
7
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # *********************************************************************************
4
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
4
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
5
5
  # contributors. All rights reserved.
6
6
 
7
7
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -318,7 +318,7 @@ module URBANopt
318
318
  return false
319
319
  end
320
320
 
321
- unless feature[:properties][:detailed_model_filename]
321
+ unless feature[:properties][:detailed_model_filename] || feature[:properties][:hpxml_directory]
322
322
  errors = JSON::Validator.fully_validate(schema, feature[:properties])
323
323
  if !errors.empty?
324
324
  raise("Invalid properties for '#{feature[:properties][:name]}'\n #{errors.join('\n ')}")
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -100,7 +100,7 @@ module URBANopt
100
100
 
101
101
  case type
102
102
  when 'Building'
103
- # Incase detailed_model_filename present check for fewer properties
103
+ # In case detailed_model_filename present check for fewer properties
104
104
  if feature[:properties][:detailed_model_filename]
105
105
  if feature[:properties][:id].nil?
106
106
  raise('No id found for Building Feature')
@@ -112,6 +112,14 @@ module URBANopt
112
112
  @@logger.warn("Number of stories is required to calculate shading using the UrbanGeometryCreation measure...ignoring #{feature[:properties][:id]} in shading calculations")
113
113
  end
114
114
  feature[:additionalProperties] = true
115
+ # In case hpxml_directory present check for fewer properties
116
+ elsif feature[:properties][:hpxml_directory]
117
+ if feature[:properties][:id].nil?
118
+ raise('No id found for Building Feature')
119
+ end
120
+ if feature[:properties][:name].nil?
121
+ raise('No name found for Building Feature')
122
+ end
115
123
  # Else validate for all required properties in the schema
116
124
  else
117
125
  errors = validate(@@building_schema, properties)
@@ -203,7 +211,14 @@ module URBANopt
203
211
  { site: :climate_zone, feature: :climate_zone },
204
212
  { site: :default_template, feature: :template },
205
213
  { site: :weather_filename, feature: :weather_filename },
206
- { site: :tariff_filename, feature: :tariff_filename }
214
+ { site: :tariff_filename, feature: :tariff_filename },
215
+ { site: :emissions, feature: :emissions },
216
+ { site: :emissions_future_subregion, feature: :emissions_future_subregion },
217
+ { site: :emissions_hourly_historical_subregion, feature: :emissions_hourly_historical_subregion },
218
+ { site: :emissions_annual_historical_subregion, feature: :emissions_annual_historical_subregion },
219
+ { site: :emissions_future_year, feature: :emissions_future_year },
220
+ { site: :emissions_hourly_historical_year, feature: :emissions_hourly_historical_year },
221
+ { site: :emissions_annual_historical_year, feature: :emissions_annual_historical_year }
207
222
  ]
208
223
 
209
224
  add_props.each do |prop|
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
4
 
5
5
  # Redistribution and use in source and binary forms, with or without modification,
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "http://json-schema.org/openstudio-urban-modeling/breaker_properties.json#",
4
+ "title": "URBANopt Breaker",
5
+ "description": "Schema for an URBANopt RNM Breaker object",
6
+ "type": "object",
7
+ "properties": {
8
+ "Code": {
9
+ "description": "Unique name/ID of the feature in the RNM analysis.",
10
+ "type": "string"
11
+ },
12
+ "NodeA": {
13
+ "description": "Name/ID of the RNM 'From' Node it is associated with.",
14
+ "type": "string"
15
+ },
16
+ "NodeB": {
17
+ "description": "Name/ID of the RNM 'To' Node it is associated with.",
18
+ "type": "string"
19
+ },
20
+ "NomV_kV": {
21
+ "description": "Nominal Voltage in kV.",
22
+ "type": "string"
23
+ },
24
+ "Subest": {
25
+ "description": "Substation the breaker is connected to.",
26
+ "type": "string"
27
+ },
28
+ "Feeder": {
29
+ "description": "Feeder the breaker is connected to.",
30
+ "type": "string"
31
+ }
32
+ }
33
+ }