geo_combine 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +53 -0
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +20 -0
  5. data/.rubocop_todo.yml +165 -0
  6. data/Gemfile +2 -1
  7. data/README.md +20 -2
  8. data/Rakefile +4 -2
  9. data/bin/geocombine +1 -0
  10. data/geo_combine.gemspec +6 -1
  11. data/lib/geo_combine/bounding_box.rb +7 -1
  12. data/lib/geo_combine/ckan_metadata.rb +10 -8
  13. data/lib/geo_combine/cli.rb +3 -1
  14. data/lib/geo_combine/esri_open_data.rb +2 -0
  15. data/lib/geo_combine/exceptions.rb +3 -0
  16. data/lib/geo_combine/fgdc.rb +2 -2
  17. data/lib/geo_combine/formats.rb +2 -0
  18. data/lib/geo_combine/formatting.rb +3 -1
  19. data/lib/geo_combine/geo_blacklight_harvester.rb +21 -13
  20. data/lib/geo_combine/geoblacklight.rb +20 -6
  21. data/lib/geo_combine/geometry_types.rb +2 -0
  22. data/lib/geo_combine/iso19139.rb +2 -1
  23. data/lib/geo_combine/ogp.rb +13 -11
  24. data/lib/geo_combine/railtie.rb +2 -0
  25. data/lib/geo_combine/subjects.rb +2 -0
  26. data/lib/geo_combine/version.rb +3 -1
  27. data/lib/geo_combine.rb +4 -3
  28. data/lib/tasks/geo_combine.rake +50 -29
  29. data/lib/xslt/fgdc2html.xsl +38 -9
  30. data/spec/features/fgdc2html_spec.rb +53 -1
  31. data/spec/features/iso2html_spec.rb +10 -1
  32. data/spec/fixtures/docs/princeton_fgdc.xml +374 -0
  33. data/spec/fixtures/docs/repos.json +3224 -0
  34. data/spec/fixtures/docs/simple_xml.xml +10 -0
  35. data/spec/fixtures/docs/simple_xslt.xsl +11 -0
  36. data/spec/fixtures/docs/stanford_iso.xml +652 -0
  37. data/spec/fixtures/docs/tufts_fgdc.xml +977 -0
  38. data/spec/fixtures/indexing/basic_geoblacklight.json +27 -0
  39. data/spec/fixtures/indexing/geoblacklight.json +33 -0
  40. data/spec/fixtures/indexing/layers.json +16119 -0
  41. data/spec/fixtures/indexing/test.txt +1 -0
  42. data/spec/fixtures/json_docs.rb +2 -0
  43. data/spec/fixtures/xml_docs.rb +9 -1659
  44. data/spec/helpers.rb +7 -7
  45. data/spec/lib/geo_combine/bounding_box_spec.rb +18 -0
  46. data/spec/lib/geo_combine/ckan_metadata_spec.rb +34 -11
  47. data/spec/lib/geo_combine/esri_open_data_spec.rb +23 -2
  48. data/spec/lib/geo_combine/fgdc_spec.rb +41 -10
  49. data/spec/lib/geo_combine/formatting_spec.rb +13 -5
  50. data/spec/lib/geo_combine/geo_blacklight_harvester_spec.rb +30 -26
  51. data/spec/lib/geo_combine/geoblacklight_spec.rb +41 -11
  52. data/spec/lib/geo_combine/iso19139_spec.rb +26 -14
  53. data/spec/lib/geo_combine/ogp_spec.rb +28 -8
  54. data/spec/lib/geo_combine_spec.rb +7 -4
  55. data/spec/lib/tasks/geo_combine_spec.rb +45 -0
  56. data/spec/spec_helper.rb +19 -84
  57. data/spec/support/fixtures.rb +9 -0
  58. metadata +116 -21
  59. data/.coveralls.yml +0 -1
  60. data/.travis.yml +0 -8
@@ -0,0 +1,374 @@
1
+ <?xml version="1.0"?>
2
+ <metadata>
3
+ <idinfo>
4
+ <citation>
5
+ <citeinfo>
6
+ <origin>Emily Leslie, Energy Reflections, LLC, Principal</origin>
7
+ <origin>Andrew Pascale, Andlinger Center, Princeton University, Post-Doctoral Research Associate</origin>
8
+ <pubdate>20210414</pubdate>
9
+ <title>Net-Zero America selected renewable resource projects for high-electrification scenario, 2050</title>
10
+ <geoform>vector digital data</geoform>
11
+ <onlink>https://figgy.princeton.edu/downloads/8180d3d2-987e-42b5-9429-b846503c81c0/file/d2af93b3-8289-4cc0-b21a-837cbf9b2a9b</onlink>
12
+ </citeinfo>
13
+ </citation>
14
+ <descript>
15
+ <abstract>This dataset shows the wind and solar development in the contiguous United States that will be required by 2050 under a net-zero-emissions scenario with high electrification and defined land-use assumptions. For an overview of this "E+" high-electrification scenario and these "base" land-use assumptions, please refer to the "supplemental information" portion of this record.</abstract>
16
+ <purpose>For visualizing renewable energy using GIS software. A growing number of pledges are being made by major corporations, municipalities, states, and national governments to reach net-zero emissions by 2050 or sooner. As part of the Net-Zero America Project, this dataset provides granular guidance on what getting to net-zero really requires and on actions needed to translate these pledges into tangible progress. </purpose>
17
+ <supplinf>The E+ scenario, or high-electrification scenario, is one of five defined pathways whereby the United States can become carbon-neutral by 2050, as detailed in the Net-Zero America report of December 2020. Between 2020 and 2050, the E+ scenario assumes: 1) a high degree of end-use electrification in transportation and buildings, 2) a minimum of 10% yearly growth in wind and solar, 3) an 80-year life for 50% of existing nuclear power, 4) no new nuclear power in California, and 5) the ongoing use of fossil fuels. By 2050, the E+ scenario further assumes: 1) carbon dioxide storage of no more than 1.8 Gt/y, 2) carbon dioxide emissions of -0.17 Gt, and 3) a biomass supply limit of 0.7 Gt/y biomass with no new land converted to bioenergy.
18
+
19
+ Both the "base" land-use assumptions on which this scenario is predicated and the "constrained" alternative stipulate that new renewable-energy sites will be selected based on: 1) numerous environmental, cultural, and economic exclusions, 2) buffers of varying extent around water bodies, urban areas, and certain infrastructure, and 3) slope and population-density limits. The "base" case additionally allows for 1) sites with Theobald Human Modification Index values of 0.082 or more, and 2) wind development on prime farmlands. These assumptions are detailed in the Net-Zero America report.</supplinf>
20
+ </descript>
21
+ <timeperd>
22
+ <timeinfo>
23
+ <rngdates>
24
+ <begdate>20200101</begdate>
25
+ <enddate>20501231</enddate>
26
+ </rngdates>
27
+ </timeinfo>
28
+ <current>Time frame of analysis.</current>
29
+ </timeperd>
30
+ <status>
31
+ <progress>Complete</progress>
32
+ <update>None planned</update>
33
+ </status>
34
+ <spdom>
35
+ <bounding>
36
+ <westbc>-127.875418</westbc>
37
+ <eastbc>-65.703868</eastbc>
38
+ <northbc>50.315241</northbc>
39
+ <southbc>23.333530</southbc>
40
+ </bounding>
41
+ </spdom>
42
+ <keywords>
43
+ <theme>
44
+ <themekt>None</themekt>
45
+ <themekey>net-zero</themekey>
46
+ <themekey>solar</themekey>
47
+ <themekey>wind</themekey>
48
+ <themekey>offshore</themekey>
49
+ <themekey>transmission</themekey>
50
+ <themekey>spur</themekey>
51
+ <themekey>bulk</themekey>
52
+ <themekey>renewable energy</themekey>
53
+ <themekey>transition</themekey>
54
+ <themekey>energy</themekey>
55
+ <themekey>infrastructure</themekey>
56
+ <themekey>electricity</themekey>
57
+ <themekey>netzeroamerica</themekey>
58
+ </theme>
59
+ <theme>
60
+ <themekt>ISO 19115 Topic Categories</themekt>
61
+ <themekey>utilitiesCommunication</themekey>
62
+ </theme>
63
+ <place>
64
+ <placekt>None</placekt>
65
+ <placekey>United States</placekey>
66
+ </place>
67
+ <temporal>
68
+ <tempkt>None</tempkt>
69
+ <tempkey>2020</tempkey>
70
+ <tempkey>2025</tempkey>
71
+ <tempkey>2030</tempkey>
72
+ <tempkey>2035</tempkey>
73
+ <tempkey>2040</tempkey>
74
+ <tempkey>2045</tempkey>
75
+ <tempkey>2050</tempkey>
76
+ </temporal>
77
+ </keywords>
78
+ <accconst>None</accconst>
79
+ <useconst>This dataset is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Any non-commercial use is permitted. All uses must credit Princeton University and carry this same license.</useconst>
80
+ <ptcontac>
81
+ <cntinfo>
82
+ <cntorgp>
83
+ <cntorg>Map and Geospatial Information Center, Lewis Library, Princeton University</cntorg>
84
+ </cntorgp>
85
+ <cntaddr>
86
+ <addrtype>mailing and physical</addrtype>
87
+ <city>Princeton</city>
88
+ <state>NJ</state>
89
+ <postal>08544</postal>
90
+ <country>US</country>
91
+ </cntaddr>
92
+ <cntvoice>609-258-1097</cntvoice>
93
+ </cntinfo>
94
+ </ptcontac>
95
+ <ptcontac>
96
+ <cntinfo>
97
+ <cntperp>
98
+ <cntper>Andrew Pascale</cntper>
99
+ </cntperp>
100
+ </cntinfo>
101
+ </ptcontac>
102
+ <datacred>E. Leslie, A. Pascale, J. Jenkins, E. Larson, C. Greig, E. Mayfield, C. Zhang, J. Drossman, R. Williams, S. Pacala, R. Socolow, EJ Baik, R. Birdsey, R. Duke, R. Jones, B. Haley, K. Paustian, A. Swan</datacred>
103
+ <native> Version 6.2 (Build 9200) ; Esri ArcGIS 10.8.1.14362</native>
104
+ </idinfo>
105
+ <dataqual>
106
+ <lineage>
107
+ <srcinfo>
108
+ <srccite>
109
+ <citeinfo>
110
+ <pubdate>20201215</pubdate>
111
+ <title>Net-Zero America: potential pathways, infrastructure, and impacts, interim report</title>
112
+ <pubinfo>
113
+ <pubplace>Princeton, NJ, 08544, US</pubplace>
114
+ <publish>Princeton University</publish>
115
+ </pubinfo>
116
+ <onlink>https://netzeroamerica.princeton.edu/img/Princeton_NZA_Interim_Report_15_Dec_2020_FINAL.pdf</onlink>
117
+ </citeinfo>
118
+ </srccite>
119
+ <typesrc>onLine</typesrc>
120
+ <srccitea>Net-Zero America: potential pathways, infrastructure, and impacts, interim report</srccitea>
121
+ <srccontr>Net-Zero America report, 2020</srccontr>
122
+ </srcinfo>
123
+ <procstep>
124
+ <procdesc>The version of 4/14/2021 is an update to the version of 12/15/2020. The 4/14/2021 version removes approximately 40,000 duplicate features introduced during data aggregation, removes features with generation or capacity values of "null" or "zero," and adds the model year 2020 back into the data.</procdesc>
125
+ <procdate>20210414</procdate>
126
+ <proccont>
127
+ <cntinfo>
128
+ <cntperp>
129
+ <cntper>Andrew Pascale</cntper>
130
+ </cntperp>
131
+ </cntinfo>
132
+ </proccont>
133
+ </procstep>
134
+ </lineage>
135
+ </dataqual>
136
+ <spdoinfo>
137
+ <direct>Vector</direct>
138
+ <ptvctinf>
139
+ <sdtsterm>
140
+ <sdtstype>GT-polygon composed of chains</sdtstype>
141
+ <ptvctcnt>43327</ptvctcnt>
142
+ </sdtsterm>
143
+ </ptvctinf>
144
+ </spdoinfo>
145
+ <spref>
146
+ <horizsys>
147
+ <planar>
148
+ <mapproj>
149
+ <mapprojn>NAD 1983 Albers</mapprojn>
150
+ <albers>
151
+ <stdparll>29.5</stdparll>
152
+ <stdparll>45.5</stdparll>
153
+ <longcm>-96.0</longcm>
154
+ <latprjo>23.0</latprjo>
155
+ <feast>0.0</feast>
156
+ <fnorth>0.0</fnorth>
157
+ </albers>
158
+ </mapproj>
159
+ <planci>
160
+ <plance>coordinate pair</plance>
161
+ <coordrep>
162
+ <absres>0.0000000037527980722984474</absres>
163
+ <ordres>0.0000000037527980722984474</ordres>
164
+ </coordrep>
165
+ <plandu>meter</plandu>
166
+ </planci>
167
+ </planar>
168
+ <geodetic>
169
+ <horizdn>D North American 1983</horizdn>
170
+ <ellips>GRS 1980</ellips>
171
+ <semiaxis>6378137.0</semiaxis>
172
+ <denflat>298.257222101</denflat>
173
+ </geodetic>
174
+ </horizsys>
175
+ </spref>
176
+ <eainfo>
177
+ <detailed>
178
+ <enttyp>
179
+ <enttypl>NZAP_renewable_project_sites_v2</enttypl>
180
+ <enttypd>Polygons representing renewable energy project areas.</enttypd>
181
+ <enttypds>Andlinger Center for Energy and the Environment/High Meadows Environmental Institute</enttypds>
182
+ </enttyp>
183
+ <attr>
184
+ <attrlabl>FID</attrlabl>
185
+ <attrdef>Internal feature number.</attrdef>
186
+ <attrdefs>Esri</attrdefs>
187
+ <attrdomv>
188
+ <udom>Sequential unique whole numbers that are automatically generated.</udom>
189
+ </attrdomv>
190
+ </attr>
191
+ <attr>
192
+ <attrlabl>Shape</attrlabl>
193
+ <attrdef>Feature geometry.</attrdef>
194
+ <attrdefs>Esri</attrdefs>
195
+ <attrdomv>
196
+ <udom>Coordinates defining the features.</udom>
197
+ </attrdomv>
198
+ </attr>
199
+ <attr>
200
+ <attrlabl>Region</attrlabl>
201
+ <attrdef>Model region in which the selected project area is located.</attrdef>
202
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
203
+ <attrdomv>
204
+ <edom>
205
+ <edomv>California</edomv>
206
+ </edom>
207
+ <edom>
208
+ <edomv>Desert Southwest</edomv>
209
+ </edom>
210
+ <edom>
211
+ <edomv>Florida</edomv>
212
+ </edom>
213
+ <edom>
214
+ <edomv>Louisiana and Ozarks</edomv>
215
+ </edom>
216
+ <edom>
217
+ <edomv>Lower Midwest</edomv>
218
+ </edom>
219
+ <edom>
220
+ <edomv>Mid-Atlantic and Great Lakes</edomv>
221
+ </edom>
222
+ <edom>
223
+ <edomv>New England</edomv>
224
+ </edom>
225
+ <edom>
226
+ <edomv>New York</edomv>
227
+ </edom>
228
+ <edom>
229
+ <edomv>Pacific Northwest</edomv>
230
+ </edom>
231
+ <edom>
232
+ <edomv>Rocky Mountains</edomv>
233
+ </edom>
234
+ <edom>
235
+ <edomv>Southeast</edomv>
236
+ </edom>
237
+ <edom>
238
+ <edomv>Texas</edomv>
239
+ </edom>
240
+ <edom>
241
+ <edomv>Upper Midwest</edomv>
242
+ </edom>
243
+ <edom>
244
+ <edomv>Utah/Nevada</edomv>
245
+ </edom>
246
+ </attrdomv>
247
+ </attr>
248
+ <attr>
249
+ <attrlabl>AnnGenMWh</attrlabl>
250
+ <attrdef>Annual generation of the Selected Project Area in MWh.</attrdef>
251
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
252
+ </attr>
253
+ <attr>
254
+ <attrlabl>IncCapMW</attrlabl>
255
+ <attrdef>Nameplate capacity of the Selected Project Area (AC) in MW.</attrdef>
256
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
257
+ </attr>
258
+ <attr>
259
+ <attrlabl>year</attrlabl>
260
+ <attrdef>Year by which the installation is completed.</attrdef>
261
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
262
+ <attrdomv>
263
+ <rdom>
264
+ <rdommin>2020</rdommin>
265
+ <rdommax>2050</rdommax>
266
+ <attrmres>5</attrmres>
267
+ </rdom>
268
+ </attrdomv>
269
+ </attr>
270
+ <attr>
271
+ <attrlabl>Technology</attrlabl>
272
+ <attrdef>Indicates the technology used.</attrdef>
273
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
274
+ <attrdomv>
275
+ <edom>
276
+ <edomv>Solar</edomv>
277
+ <edomvd>Solar energy.</edomvd>
278
+ <edomvds>Andlinger Center/HMEI</edomvds>
279
+ </edom>
280
+ <edom>
281
+ <edomv>Wind</edomv>
282
+ <edomvd>Wind energy.</edomvd>
283
+ <edomvds>Andlinger Center/HMEI</edomvds>
284
+ </edom>
285
+ <edom>
286
+ <edomv>OffshoreWind</edomv>
287
+ <edomvd>Wind energy harvested offshore.</edomvd>
288
+ <edomvds>Andlinger Center/HMEI</edomvds>
289
+ </edom>
290
+ </attrdomv>
291
+ </attr>
292
+ <attr>
293
+ <attrlabl>Shape_Leng</attrlabl>
294
+ <attrdef>Perimeter of feature.</attrdef>
295
+ <attrdefs>Esri</attrdefs>
296
+ <attrdomv>
297
+ <udom>Positive real numbers that are automatically generated.</udom>
298
+ </attrdomv>
299
+ </attr>
300
+ <attr>
301
+ <attrlabl>scenario</attrlabl>
302
+ <attrdef>Scenario name.</attrdef>
303
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
304
+ <attrdomv>
305
+ <edom>
306
+ <edomv>E+</edomv>
307
+ <edomvd>The E+ scenario.</edomvd>
308
+ <edomvds>Andlinger Center/HMEI</edomvds>
309
+ </edom>
310
+ </attrdomv>
311
+ </attr>
312
+ <attr>
313
+ <attrlabl>state</attrlabl>
314
+ <attrdef>Name of the state in which the Selected Project Area is located.</attrdef>
315
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
316
+ <attrdomv>
317
+ <codesetd>
318
+ <codesetn>All US states except Alaska and Hawaii, plus the District of Columbia</codesetn>
319
+ <codesets>United States government</codesets>
320
+ </codesetd>
321
+ </attrdomv>
322
+ </attr>
323
+ <attr>
324
+ <attrlabl>LandUseAss</attrlabl>
325
+ <attrdef>Land use case filter being applied during renewable resource capacity siting step, either Base Land Use Assumptions (BLUA) or Constrained Land Use Assumptions (CLUA).</attrdef>
326
+ <attrdefs>Andlinger Center/HMEI</attrdefs>
327
+ <attrdomv>
328
+ <edom>
329
+ <edomv>BLUA</edomv>
330
+ <edomvd>Base Land Use Assumptions.</edomvd>
331
+ <edomvds>Andlinger Center/HMEI</edomvds>
332
+ </edom>
333
+ <edom>
334
+ <edomv>CLUA</edomv>
335
+ <edomvd>Constrained Land Use Assumptions.</edomvd>
336
+ <edomvds>Andlinger Center/HMEI</edomvds>
337
+ </edom>
338
+ </attrdomv>
339
+ </attr>
340
+ <attr>
341
+ <attrlabl>Shape_Area</attrlabl>
342
+ <attrdef>Area of feature in internal units squared.</attrdef>
343
+ <attrdefs>Esri</attrdefs>
344
+ <attrdomv>
345
+ <udom>Positive real numbers that are automatically generated.</udom>
346
+ </attrdomv>
347
+ </attr>
348
+ </detailed>
349
+ </eainfo>
350
+ <distinfo>
351
+ <resdesc>Downloadable Data</resdesc>
352
+ </distinfo>
353
+ <metainfo>
354
+ <metd>20210416</metd>
355
+ <metc>
356
+ <cntinfo>
357
+ <cntorgp>
358
+ <cntorg>Map and Geospatial Information Center, Lewis Library, Princeton University</cntorg>
359
+ </cntorgp>
360
+ <cntaddr>
361
+ <addrtype>mailing and physical</addrtype>
362
+ <city>Princeton</city>
363
+ <state>NJ</state>
364
+ <postal>08544</postal>
365
+ <country>US</country>
366
+ </cntaddr>
367
+ <cntvoice>609-258-1097</cntvoice>
368
+ </cntinfo>
369
+ </metc>
370
+ <metstdn>FGDC Content Standard for Digital Geospatial Metadata</metstdn>
371
+ <metstdv>FGDC-STD-001-1998</metstdv>
372
+ <mettc>local time</mettc>
373
+ </metainfo>
374
+ </metadata>