urbanopt-geojson 0.1.0 → 0.2.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +19 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +15 -0
  4. data/.github/pull_request_template.md +13 -0
  5. data/CONTRIBUTING.md +58 -0
  6. data/Gemfile +3 -3
  7. data/Jenkinsfile +2 -2
  8. data/LICENSE.md +1 -1
  9. data/Rakefile +1 -1
  10. data/doc_templates/LICENSE.md +1 -1
  11. data/doc_templates/copyright_erb.txt +1 -1
  12. data/doc_templates/copyright_js.txt +1 -1
  13. data/doc_templates/copyright_ruby.txt +1 -1
  14. data/docs/package-lock.json +2291 -2205
  15. data/docs/package.json +8 -1
  16. data/lib/change_log.rb +147 -0
  17. data/lib/measures/urban_geometry_creation/LICENSE.md +1 -1
  18. data/lib/measures/urban_geometry_creation/measure.rb +1 -3
  19. data/lib/measures/urban_geometry_creation/tests/shadowed_tests.rb +1 -1
  20. data/lib/measures/urban_geometry_creation/tests/urban_geometry_creation_test.rb +3 -7
  21. data/lib/measures/urban_geometry_creation_zoning/LICENSE.md +1 -1
  22. data/lib/measures/urban_geometry_creation_zoning/measure.rb +5 -6
  23. data/lib/measures/urban_geometry_creation_zoning/tests/{urban_geometry_creation_test.rb → urban_geometry_creation_zoning_test.rb} +3 -7
  24. data/lib/urbanopt-geojson.rb +31 -0
  25. data/lib/urbanopt/geojson.rb +1 -1
  26. data/lib/urbanopt/geojson/building.rb +90 -18
  27. data/lib/urbanopt/geojson/district_system.rb +1 -1
  28. data/lib/urbanopt/geojson/extension.rb +1 -1
  29. data/lib/urbanopt/geojson/feature.rb +9 -7
  30. data/lib/urbanopt/geojson/files/electrical_database.json +28 -0
  31. data/lib/urbanopt/geojson/geo_file.rb +213 -31
  32. data/lib/urbanopt/geojson/helper.rb +10 -8
  33. data/lib/urbanopt/geojson/logging.rb +1 -1
  34. data/lib/urbanopt/geojson/mapper_classes.rb +1 -1
  35. data/lib/urbanopt/geojson/model.rb +1 -1
  36. data/lib/urbanopt/geojson/region.rb +1 -1
  37. data/lib/urbanopt/geojson/schema/building_properties.json +28 -5
  38. data/lib/urbanopt/geojson/schema/district_system_properties.json +29 -28
  39. data/lib/urbanopt/geojson/schema/electrical_connector_properties.json +150 -10
  40. data/lib/urbanopt/geojson/schema/electrical_junction_properties.json +3 -2
  41. data/lib/urbanopt/geojson/schema/thermal_connector_properties.json +2 -1
  42. data/lib/urbanopt/geojson/update_areas.rb +1 -1
  43. data/lib/urbanopt/geojson/validate_geojson.rb +1 -1
  44. data/lib/urbanopt/geojson/version.rb +2 -2
  45. data/lib/urbanopt/geojson/zoning.rb +1 -1
  46. data/urbanopt-geojson-gem.gemspec +4 -1
  47. metadata +14 -8
  48. data/.travis.yml +0 -35
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt, Copyright (c) 2019, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt, Copyright (c) 2019-2020, 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,
@@ -64,6 +64,28 @@
64
64
  "description": "The surface elevation (above NAVD88 datum) of the building (ft). This is the elevation of the ground at the building location, any below ground stories will be lower than this. Defaults to site's surface_elevation.",
65
65
  "type": "number"
66
66
  },
67
+ "timesteps_per_hour": {
68
+ "description": "Number of timesteps per hour for energy simulations. Defaults to site's timesteps_per_hour.",
69
+ "type": "integer",
70
+ "minimum": 1,
71
+ "maximum": 60
72
+ },
73
+ "begin_date": {
74
+ "description": "Date to begin simulation, format YYYY-MM-DD. Defaults to site's begin_date.",
75
+ "type": "string"
76
+ },
77
+ "end_date": {
78
+ "description": "Date to end simulation, format YYYY-MM-DD. Defaults to site's end_date.",
79
+ "type": "string"
80
+ },
81
+ "climate_zone": {
82
+ "description": "ASHRAE 169 climate zone. Defaults to site's climate_zone",
83
+ "type": "string"
84
+ },
85
+ "cec_climate_zone": {
86
+ "description": "CEC Title24 climate zone. Defaults to site's cec_climate_zone",
87
+ "type": "string"
88
+ },
67
89
  "floor_area": {
68
90
  "description": "Usable floor area (ft^2).",
69
91
  "type": "number"
@@ -111,7 +133,7 @@
111
133
  "$ref": "#/definitions/systemType"
112
134
  },
113
135
  "weekday_start_time": {
114
- "description": "Weekday operating hours start time in 08:30 format, using 24-hr clock. Leave black to use default. Should this be part of a mixed type struct?",
136
+ "description": "Weekday operating hours start time in 08:30 format, using 24-hr clock. Leave blank to use default. Should this be part of a mixed type struct?",
115
137
  "type": "string"
116
138
  },
117
139
  "weekday_duration": {
@@ -119,7 +141,7 @@
119
141
  "type": "string"
120
142
  },
121
143
  "weekend_start_time": {
122
- "description": "Weekend operating hours start time in 08:30 format, using 24-hr clock. Leave black to use default. Should this be part of a mixed type struct?",
144
+ "description": "Weekend operating hours start time in 08:30 format, using 24-hr clock. Leave blank to use default. Should this be part of a mixed type struct?",
123
145
  "type": "string"
124
146
  },
125
147
  "weekend_duration": {
@@ -201,7 +223,7 @@
201
223
  "footprint_area",
202
224
  "building_type"
203
225
  ],
204
- "additionalProperties": false,
226
+ "additionalProperties": true,
205
227
  "definitions": {
206
228
  "buildingType": {
207
229
  "description": "Primary building space type.",
@@ -232,7 +254,8 @@
232
254
  "Service",
233
255
  "Mixed use",
234
256
  "Uncovered Parking",
235
- "Covered Parking"
257
+ "Covered Parking",
258
+ "null"
236
259
  ]
237
260
  },
238
261
  "systemType": {
@@ -321,7 +344,7 @@
321
344
  ]
322
345
  },
323
346
  "templateType": {
324
- "description": "Standard template applied to building.",
347
+ "description": "Standard template applied to building. Default to site's default_template",
325
348
  "type": "string",
326
349
  "enum": [
327
350
  "DOE Ref Pre-1980",
@@ -55,30 +55,13 @@
55
55
  "description": "Name of the tariff file for this district system. Defaults to site's tariff_filename.",
56
56
  "type": "string"
57
57
  },
58
- "equipment_1": {
59
- "description": "First piece of equipment used in this plant",
60
- "$ref": "#/definitions/equipmentType",
61
- "type": "string"
62
- },
63
- "equipment_2": {
64
- "description": "Second piece of equipment used in this plant",
65
- "$ref": "#/definitions/equipmentType",
66
- "type": "string"
67
- },
68
- "equipment_3": {
69
- "description": "Third piece of equipment used in this plant",
70
- "$ref": "#/definitions/equipmentType",
71
- "type": "string"
72
- },
73
- "equipment_4": {
74
- "description": "Fourth piece of equipment used in this plant",
75
- "$ref": "#/definitions/equipmentType",
76
- "type": "string"
77
- },
78
- "equipment_5": {
79
- "description": "Fifth piece of equipment used in this plant",
80
- "$ref": "#/definitions/equipmentType",
81
- "type": "string"
58
+ "equipment": {
59
+ "description": "List of equipment in this plant",
60
+ "type": "array",
61
+ "items": {
62
+ "$ref": "#/definitions/equipmentType",
63
+ "type": "string"
64
+ }
82
65
  },
83
66
  "user_data": {
84
67
  "description": "Arbitrary user data"
@@ -94,9 +77,16 @@
94
77
  "description": "Type of district system.",
95
78
  "type": "string",
96
79
  "enum": [
97
- "District Thermal",
98
- "Community Photovoltaic",
99
- "Transformer"
80
+ "Central Chilled Water",
81
+ "Central Hot Water",
82
+ "Central Hot and Chilled Water",
83
+ "Central Ambient Water",
84
+ "Central Hot and Cold Water",
85
+ "Community Photovoltaic",
86
+ "Transformer",
87
+ "Transformer with Storage",
88
+ "Capacitor",
89
+ "Electrical Substation"
100
90
  ]
101
91
  },
102
92
  "equipmentType": {
@@ -107,6 +97,8 @@
107
97
  "Air-Cooled Chiller--Ambient Water",
108
98
  "Water-Cooled Chiller--Cold Water",
109
99
  "Water-Cooled Chiller---Ambient Water",
100
+ "Capacitor--150KVAR",
101
+ "Capacitor--450KVAR",
110
102
  "Cooling Tower--Heat Rejection from Chiller, Cold Water",
111
103
  "Cooling Tower--Heat Rejection from Chiller, Ambient Water",
112
104
  "Cooling Tower--Direct--Chilled Water",
@@ -129,9 +121,18 @@
129
121
  "Storage--Hot Water",
130
122
  "Storage--Cold Water",
131
123
  "Storage--Ambient Water",
124
+ "Transformer--25KVA CT",
125
+ "Transformer--50KVA CT",
126
+ "Transformer--75KVA CT",
127
+ "Transformer--25KVA PM",
128
+ "Transformer--50KVA PM",
129
+ "Transformer--75KVA PM",
130
+ "Transformer--100KVA PM",
131
+ "Transformer--150KVA PM",
132
+ "Transformer--300KVA PM",
132
133
  "Waste Heat Source--Hot Water",
133
134
  "Waste Heat Source--Ambient Water"
134
135
  ]
135
136
  }
136
137
  }
137
- }
138
+ }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
3
  "id": "http://json-schema.org/openstudio-urban-modeling/district_system_properties.json#",
4
- "title": "URBANopt Electrical Connector",
5
- "description": "Schema for an URBANopt Electrical Connector object",
4
+ "title": "URBANopt Electrical Line",
5
+ "description": "Schema for an URBANopt Electrical Line object",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "id": {
@@ -17,7 +17,7 @@
17
17
  "description": "Type of feature.",
18
18
  "type": "string",
19
19
  "enum": [
20
- "ElectricalConnector"
20
+ "ElectricalLine"
21
21
  ]
22
22
  },
23
23
  "source_name": {
@@ -33,7 +33,7 @@
33
33
  "type": "string"
34
34
  },
35
35
  "connector_type": {
36
- "$ref": "#/definitions/ElectricalConnectorType"
36
+ "$ref": "#/definitions/ElectricalLineType"
37
37
  },
38
38
  "lengths": {
39
39
  "description": "Length (ft) of each segment, generated on export.",
@@ -43,15 +43,32 @@
43
43
  }
44
44
  },
45
45
  "total_length": {
46
- "description": "Total length (ft) of the connector, generated on export.",
46
+ "description": "Total length (ft) of the line, generated on export.",
47
47
  "type": "number"
48
48
  },
49
49
  "start_junction_id": {
50
- "description": "Id of the junction that this connector starts at.",
50
+ "description": "Id of the junction that this line starts at.",
51
51
  "type": "string"
52
52
  },
53
+ "line_properties":{
54
+ "description": "A sub-element containing all the attributes that can be assigned to a line, including wires",
55
+ "type":"object",
56
+ "properties":{
57
+ "is_switch":{"type":"boolean","description":"Flag indicating if the line is a switch or not"},
58
+ "is_fuse":{"type":"boolean","description":"Flag indicating if the line is a fuse or not"},
59
+ "is_open":{"type":"boolean","description":"Flag indicating if the switch/fuse is a open or not"}
60
+ }
61
+ },
62
+ "wires": {
63
+ "description": "Array of wires that are on the line",
64
+ "type": "array",
65
+ "items": {
66
+ "$ref": "#/definitions/WireType",
67
+ "type": "string"
68
+ }
69
+ },
53
70
  "end_junction_id": {
54
- "description": "Id of the junction that this connector ends at.",
71
+ "description": "Id of the junction that this line ends at.",
55
72
  "type": "string"
56
73
  },
57
74
  "user_data": {
@@ -60,17 +77,140 @@
60
77
  },
61
78
  "required": [
62
79
  "type",
80
+ "id",
63
81
  "connector_type",
64
82
  "start_junction_id",
65
83
  "end_junction_id"
66
84
  ],
67
85
  "additionalProperties": false,
68
86
  "definitions": {
69
- "ElectricalConnectorType": {
70
- "description": "Type of electrical connector",
87
+ "ElectricalLineType": {
88
+ "description": "Type of electrical line",
89
+ "type": "string",
90
+ "enum": [
91
+ "Line"
92
+ ]
93
+ },
94
+ "WireType": {
95
+ "description": "Type of wire used",
71
96
  "type": "string",
72
97
  "enum": [
73
- "Wire"
98
+ "OH TPLX #4 S1",
99
+ "OH TPLX #4 S2",
100
+ "OH TPLX #4 A",
101
+ "OH TPLX #4 B",
102
+ "OH TPLX #4 C",
103
+ "OH TPLX #4 N",
104
+ "OH TPLX 1/0 S1",
105
+ "OH TPLX 1/0 S2",
106
+ "OH TPLX 1/0 A",
107
+ "OH TPLX 1/0 B",
108
+ "OH TPLX 1/0 C",
109
+ "OH TPLX 1/0 N",
110
+ "OH TPLX 2/0 S1",
111
+ "OH TPLX 2/0 S2",
112
+ "OH TPLX 2/0 A",
113
+ "OH TPLX 2/0 B",
114
+ "OH TPLX 2/0 C",
115
+ "OH TPLX 2/0 N",
116
+ "OH TPLX 4/0 S1",
117
+ "OH TPLX 4/0 S2",
118
+ "OH TPLX 4/0 A",
119
+ "OH TPLX 4/0 B",
120
+ "OH TPLX 4/0 C",
121
+ "OH TPLX 4/0 N",
122
+ "OH AL #2 A",
123
+ "OH AL #2 B",
124
+ "OH AL #2 C",
125
+ "OH AL #2 N",
126
+ "OH AL #4 A",
127
+ "OH AL #4 B",
128
+ "OH AL #4 C",
129
+ "OH AL #4 N",
130
+ "OH AL 1/0 A",
131
+ "OH AL 1/0 B",
132
+ "OH AL 1/0 C",
133
+ "OH AL 1/0 N",
134
+ "OH AL 2/0 A",
135
+ "OH AL 2/0 B",
136
+ "OH AL 2/0 C",
137
+ "OH AL 2/0 N",
138
+ "OH AL 4/0 A",
139
+ "OH AL 4/0 B",
140
+ "OH AL 4/0 C",
141
+ "OH AL 4/0 N",
142
+ "OH AL 336kcmil A",
143
+ "OH AL 336kcmil B",
144
+ "OH AL 336kcmil C",
145
+ "OH AL 336kcmil N",
146
+ "OH AL 477kcmil A",
147
+ "OH AL 477kcmil B",
148
+ "OH AL 477kcmil C",
149
+ "OH AL 477kcmil N",
150
+ "OH AL 795kcmil A",
151
+ "OH AL 795kcmil B",
152
+ "OH AL 795kcmil C",
153
+ "OH AL 795kcmil N",
154
+ "UG TPLX #4 S1",
155
+ "UG TPLX #4 S2",
156
+ "UG TPLX #4 A",
157
+ "UG TPLX #4 B",
158
+ "UG TPLX #4 C",
159
+ "UG TPLX #4 N",
160
+ "UG TPLX 1/0 S1",
161
+ "UG TPLX 1/0 S2",
162
+ "UG TPLX 1/0 A",
163
+ "UG TPLX 1/0 B",
164
+ "UG TPLX 1/0 C",
165
+ "UG TPLX 1/0 N",
166
+ "UG TPLX 2/0 S1",
167
+ "UG TPLX 2/0 S2",
168
+ "UG TPLX 2/0 A",
169
+ "UG TPLX 2/0 B",
170
+ "UG TPLX 2/0 C",
171
+ "UG TPLX 2/0 N",
172
+ "UG TPLX 4/0 S1",
173
+ "UG TPLX 4/0 S2",
174
+ "UG TPLX 4/0 A",
175
+ "UG TPLX 4/0 B",
176
+ "UG TPLX 4/0 C",
177
+ "UG TPLX 4/0 N",
178
+ "UG AL #2 A",
179
+ "UG AL #2 B",
180
+ "UG AL #2 C",
181
+ "UG AL #2 N",
182
+ "UG AL #4 A",
183
+ "UG AL #4 B",
184
+ "UG AL #4 C",
185
+ "UG AL #4 N",
186
+ "UG AL 1/0 A",
187
+ "UG AL 1/0 B",
188
+ "UG AL 1/0 C",
189
+ "UG AL 1/0 N",
190
+ "UG AL 2/0 A",
191
+ "UG AL 2/0 B",
192
+ "UG AL 2/0 C",
193
+ "UG AL 2/0 N",
194
+ "UG AL 4/0 A",
195
+ "UG AL 4/0 B",
196
+ "UG AL 4/0 C",
197
+ "UG AL 4/0 N",
198
+ "UG AL 350kcmil A",
199
+ "UG AL 350kcmil B",
200
+ "UG AL 350kcmil C",
201
+ "UG AL 350kcmil N",
202
+ "UG AL 500kcmil A",
203
+ "UG AL 500kcmil B",
204
+ "UG AL 500kcmil C",
205
+ "UG AL 500kcmil N",
206
+ "UG AL 750kcmil A",
207
+ "UG AL 750kcmil B",
208
+ "UG AL 750kcmil C",
209
+ "UG AL 750kcmil N",
210
+ "UG AL 1000kcmil A",
211
+ "UG AL 1000kcmil B",
212
+ "UG AL 1000kcmil C",
213
+ "UG AL 1000kcmil N"
74
214
  ]
75
215
  }
76
216
  }
@@ -49,6 +49,7 @@
49
49
  },
50
50
  "required": [
51
51
  "type",
52
+ "id",
52
53
  "connector_type"
53
54
  ],
54
55
  "additionalProperties": false,
@@ -57,8 +58,8 @@
57
58
  "description": "Type of electrical junction",
58
59
  "type": "string",
59
60
  "enum": [
60
- "ElectricalPanel"
61
+ "ElectricalJunction"
61
62
  ]
62
63
  }
63
64
  }
64
- }
65
+ }
@@ -100,7 +100,8 @@
100
100
  "type": "string",
101
101
  "enum": [
102
102
  "Supply",
103
- "Return"
103
+ "Return",
104
+ "Unspecified"
104
105
  ]
105
106
  }
106
107
  }
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt, Copyright (c) 2019, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt, Copyright (c) 2019-2020, 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, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt, Copyright (c) 2019-2020, 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, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt, Copyright (c) 2019-2020, 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,
@@ -30,6 +30,6 @@
30
30
 
31
31
  module URBANopt
32
32
  module GeoJSON
33
- VERSION = '0.1.0'.freeze
33
+ VERSION = '0.2.0.pre1'.freeze
34
34
  end
35
35
  end
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt, Copyright (c) 2019, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt, Copyright (c) 2019-2020, 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,
@@ -25,6 +25,9 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ['lib']
27
27
 
28
+ # this is not working right now
29
+ # spec.required_ruby_version = '~> 2.2.4'
30
+
28
31
  spec.add_development_dependency 'bundler', '~> 1.14'
29
32
  spec.add_development_dependency 'rake', '12.3.1'
30
33
  spec.add_development_dependency 'rspec', '3.7.0'
@@ -34,6 +37,6 @@ Gem::Specification.new do |spec|
34
37
 
35
38
  # other dependencies
36
39
  spec.add_dependency 'json-schema'
37
- spec.add_dependency 'openstudio-extension', '~> 0.1.3'
40
+ spec.add_dependency 'openstudio-extension', '~> 0.1.5'
38
41
  spec.add_dependency 'urbanopt-core', '~> 0.1.0'
39
42
  end