geo_combine 0.1.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +6 -1
- data/Gemfile +2 -1
- data/README.md +108 -23
- data/geo_combine.gemspec +4 -2
- data/lib/geo_combine.rb +11 -1
- data/lib/geo_combine/bounding_box.rb +71 -0
- data/lib/geo_combine/ckan_metadata.rb +112 -0
- data/lib/geo_combine/esri_open_data.rb +0 -9
- data/lib/geo_combine/exceptions.rb +8 -0
- data/lib/geo_combine/formatting.rb +6 -1
- data/lib/geo_combine/geo_blacklight_harvester.rb +203 -0
- data/lib/geo_combine/geoblacklight.rb +80 -12
- data/lib/geo_combine/ogp.rb +229 -0
- data/lib/geo_combine/railtie.rb +7 -0
- data/lib/geo_combine/version.rb +1 -1
- data/lib/tasks/geo_combine.rake +54 -20
- data/lib/xslt/fgdc2geoBL.xsl +95 -154
- data/lib/xslt/fgdc2html.xsl +105 -157
- data/lib/xslt/iso2geoBL.xsl +62 -84
- data/lib/xslt/iso2html.xsl +1107 -1070
- data/spec/features/iso2html_spec.rb +7 -1
- data/spec/fixtures/docs/basic_geoblacklight.json +5 -7
- data/spec/fixtures/docs/ckan.json +456 -0
- data/spec/fixtures/docs/full_geoblacklight.json +2 -8
- data/spec/fixtures/docs/geoblacklight_pre_v1.json +37 -0
- data/spec/fixtures/docs/ogp_harvard_line.json +28 -0
- data/spec/fixtures/docs/ogp_harvard_raster.json +28 -0
- data/spec/fixtures/docs/ogp_tufts_vector.json +31 -0
- data/spec/fixtures/json_docs.rb +20 -0
- data/spec/lib/geo_combine/bounding_box_spec.rb +59 -0
- data/spec/lib/geo_combine/ckan_metadata_spec.rb +114 -0
- data/spec/lib/geo_combine/esri_open_data_spec.rb +1 -14
- data/spec/lib/geo_combine/fgdc_spec.rb +11 -14
- data/spec/lib/geo_combine/formatting_spec.rb +6 -0
- data/spec/lib/geo_combine/geo_blacklight_harvester_spec.rb +190 -0
- data/spec/lib/geo_combine/geoblacklight_spec.rb +137 -11
- data/spec/lib/geo_combine/iso19139_spec.rb +5 -2
- data/spec/lib/geo_combine/ogp_spec.rb +163 -0
- data/spec/spec_helper.rb +1 -0
- metadata +63 -14
- data/lib/schema/geoblacklight-schema.json +0 -169
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geo_combine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Reed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rsolr
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,6 +38,20 @@ dependencies:
|
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: net-http-persistent
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: nokogiri
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,30 +112,30 @@ dependencies:
|
|
84
112
|
name: bundler
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- - "
|
115
|
+
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
117
|
+
version: '0'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- - "
|
122
|
+
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
124
|
+
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: rake
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- - "
|
129
|
+
- - ">="
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
131
|
+
version: '0'
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
|
-
- - "
|
136
|
+
- - ">="
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
138
|
+
version: '0'
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: rspec
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,17 +183,22 @@ files:
|
|
155
183
|
- bin/geocombine
|
156
184
|
- geo_combine.gemspec
|
157
185
|
- lib/geo_combine.rb
|
186
|
+
- lib/geo_combine/bounding_box.rb
|
187
|
+
- lib/geo_combine/ckan_metadata.rb
|
158
188
|
- lib/geo_combine/cli.rb
|
159
189
|
- lib/geo_combine/esri_open_data.rb
|
190
|
+
- lib/geo_combine/exceptions.rb
|
160
191
|
- lib/geo_combine/fgdc.rb
|
161
192
|
- lib/geo_combine/formats.rb
|
162
193
|
- lib/geo_combine/formatting.rb
|
194
|
+
- lib/geo_combine/geo_blacklight_harvester.rb
|
163
195
|
- lib/geo_combine/geoblacklight.rb
|
164
196
|
- lib/geo_combine/geometry_types.rb
|
165
197
|
- lib/geo_combine/iso19139.rb
|
198
|
+
- lib/geo_combine/ogp.rb
|
199
|
+
- lib/geo_combine/railtie.rb
|
166
200
|
- lib/geo_combine/subjects.rb
|
167
201
|
- lib/geo_combine/version.rb
|
168
|
-
- lib/schema/geoblacklight-schema.json
|
169
202
|
- lib/tasks/geo_combine.rake
|
170
203
|
- lib/xslt/fgdc2geoBL.xsl
|
171
204
|
- lib/xslt/fgdc2html.xsl
|
@@ -187,16 +220,25 @@ files:
|
|
187
220
|
- spec/features/fgdc2html_spec.rb
|
188
221
|
- spec/features/iso2html_spec.rb
|
189
222
|
- spec/fixtures/docs/basic_geoblacklight.json
|
223
|
+
- spec/fixtures/docs/ckan.json
|
190
224
|
- spec/fixtures/docs/esri_open_data.json
|
191
225
|
- spec/fixtures/docs/full_geoblacklight.json
|
226
|
+
- spec/fixtures/docs/geoblacklight_pre_v1.json
|
227
|
+
- spec/fixtures/docs/ogp_harvard_line.json
|
228
|
+
- spec/fixtures/docs/ogp_harvard_raster.json
|
229
|
+
- spec/fixtures/docs/ogp_tufts_vector.json
|
192
230
|
- spec/fixtures/json_docs.rb
|
193
231
|
- spec/fixtures/xml_docs.rb
|
194
232
|
- spec/helpers.rb
|
233
|
+
- spec/lib/geo_combine/bounding_box_spec.rb
|
234
|
+
- spec/lib/geo_combine/ckan_metadata_spec.rb
|
195
235
|
- spec/lib/geo_combine/esri_open_data_spec.rb
|
196
236
|
- spec/lib/geo_combine/fgdc_spec.rb
|
197
237
|
- spec/lib/geo_combine/formatting_spec.rb
|
238
|
+
- spec/lib/geo_combine/geo_blacklight_harvester_spec.rb
|
198
239
|
- spec/lib/geo_combine/geoblacklight_spec.rb
|
199
240
|
- spec/lib/geo_combine/iso19139_spec.rb
|
241
|
+
- spec/lib/geo_combine/ogp_spec.rb
|
200
242
|
- spec/lib/geo_combine_spec.rb
|
201
243
|
- spec/spec_helper.rb
|
202
244
|
homepage: ''
|
@@ -218,8 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
260
|
- !ruby/object:Gem::Version
|
219
261
|
version: '0'
|
220
262
|
requirements: []
|
221
|
-
|
222
|
-
rubygems_version: 2.4.5
|
263
|
+
rubygems_version: 3.1.2
|
223
264
|
signing_key:
|
224
265
|
specification_version: 4
|
225
266
|
summary: A Ruby toolkit for managing geospatial metadata
|
@@ -227,16 +268,24 @@ test_files:
|
|
227
268
|
- spec/features/fgdc2html_spec.rb
|
228
269
|
- spec/features/iso2html_spec.rb
|
229
270
|
- spec/fixtures/docs/basic_geoblacklight.json
|
271
|
+
- spec/fixtures/docs/ckan.json
|
230
272
|
- spec/fixtures/docs/esri_open_data.json
|
231
273
|
- spec/fixtures/docs/full_geoblacklight.json
|
274
|
+
- spec/fixtures/docs/geoblacklight_pre_v1.json
|
275
|
+
- spec/fixtures/docs/ogp_harvard_line.json
|
276
|
+
- spec/fixtures/docs/ogp_harvard_raster.json
|
277
|
+
- spec/fixtures/docs/ogp_tufts_vector.json
|
232
278
|
- spec/fixtures/json_docs.rb
|
233
279
|
- spec/fixtures/xml_docs.rb
|
234
280
|
- spec/helpers.rb
|
281
|
+
- spec/lib/geo_combine/bounding_box_spec.rb
|
282
|
+
- spec/lib/geo_combine/ckan_metadata_spec.rb
|
235
283
|
- spec/lib/geo_combine/esri_open_data_spec.rb
|
236
284
|
- spec/lib/geo_combine/fgdc_spec.rb
|
237
285
|
- spec/lib/geo_combine/formatting_spec.rb
|
286
|
+
- spec/lib/geo_combine/geo_blacklight_harvester_spec.rb
|
238
287
|
- spec/lib/geo_combine/geoblacklight_spec.rb
|
239
288
|
- spec/lib/geo_combine/iso19139_spec.rb
|
289
|
+
- spec/lib/geo_combine/ogp_spec.rb
|
240
290
|
- spec/lib/geo_combine_spec.rb
|
241
291
|
- spec/spec_helper.rb
|
242
|
-
has_rdoc:
|
@@ -1,169 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
-
"description": "Schema for GeoBlacklight as implemented for Solr 4.10+. See http://journal.code4lib.org/articles/9710 for more details. Note that the Solr schema uses dynamic typing based on the suffix of the field name. For example, _s denotes a string where _sm denotes a multi-valued string (array of strings).",
|
4
|
-
"id": "http://geoblacklight.org/schema",
|
5
|
-
"title": "GeoBlacklight Schema",
|
6
|
-
"required": [
|
7
|
-
"uuid",
|
8
|
-
"dc_identifier_s",
|
9
|
-
"dc_title_s",
|
10
|
-
"dc_description_s",
|
11
|
-
"dc_rights_s",
|
12
|
-
"dct_provenance_s",
|
13
|
-
"dct_references_s",
|
14
|
-
"georss_box_s",
|
15
|
-
"layer_id_s",
|
16
|
-
"layer_geom_type_s",
|
17
|
-
"layer_modified_dt",
|
18
|
-
"layer_slug_s",
|
19
|
-
"solr_geom",
|
20
|
-
"solr_year_i"
|
21
|
-
],
|
22
|
-
"type": "object",
|
23
|
-
"properties": {
|
24
|
-
"uuid": {
|
25
|
-
"type": "string",
|
26
|
-
"description": "Unique identifier for layer that is globally unique."
|
27
|
-
|
28
|
-
},
|
29
|
-
"dc_identifier_s": {
|
30
|
-
"type": "string",
|
31
|
-
"description": "Unique identifier for layer. May be same as UUID but may be an alternate identifier."
|
32
|
-
},
|
33
|
-
"dc_title_s": {
|
34
|
-
"type": "string",
|
35
|
-
"description": "Title for the layer."
|
36
|
-
|
37
|
-
},
|
38
|
-
"dc_description_s": {
|
39
|
-
"type": "string",
|
40
|
-
"description": "Description for the layer."
|
41
|
-
|
42
|
-
},
|
43
|
-
"dc_rights_s": {
|
44
|
-
"type": "string",
|
45
|
-
"enum": ["Public", "Restricted"],
|
46
|
-
"description": "Access rights for the layer."
|
47
|
-
|
48
|
-
},
|
49
|
-
"dct_provenance_s": {
|
50
|
-
"type": "string",
|
51
|
-
"description": "Institution who holds the layer."
|
52
|
-
|
53
|
-
},
|
54
|
-
"dct_references_s": {
|
55
|
-
"type": "string",
|
56
|
-
"description": "JSON hash for external resources, where each key is a URI for the protocol or format and the value is the URL to the resource."
|
57
|
-
|
58
|
-
},
|
59
|
-
"georss_box_s": {
|
60
|
-
"type": "string",
|
61
|
-
"description": "Bounding box as maximum values for S W N E. Example: 12.6 -119.4 19.9 84.8."
|
62
|
-
|
63
|
-
},
|
64
|
-
"layer_id_s": {
|
65
|
-
"type": "string",
|
66
|
-
"description": "The complete identifier for the layer via WMS/WFS/WCS protocol. Example: druid:vr593vj7147."
|
67
|
-
|
68
|
-
},
|
69
|
-
"layer_geom_type_s": {
|
70
|
-
"type": "string",
|
71
|
-
"enum": ["Point", "Line", "Polygon", "Raster", "Scanned Map", "Mixed"],
|
72
|
-
"description": "Geometry type for layer data, using controlled vocabulary."
|
73
|
-
},
|
74
|
-
"layer_modified_dt": {
|
75
|
-
"type": "string",
|
76
|
-
"format": "date-time",
|
77
|
-
"description": "Last modification date for the metadata record, using XML Schema dateTime format (YYYY-MM-DDThh:mm:ssZ)."
|
78
|
-
},
|
79
|
-
"layer_slug_s": {
|
80
|
-
"type": "string",
|
81
|
-
"description": "Unique identifier visible to the user, used for Permalinks. Example: stanford-vr593vj7147."
|
82
|
-
|
83
|
-
},
|
84
|
-
"solr_geom": {
|
85
|
-
"type": "string",
|
86
|
-
"pattern": "ENVELOPE(.*,.*,.*,.*)",
|
87
|
-
"description": "Derived from georss_polygon_s or georss_box_s. Shape of the layer as a ENVELOPE WKT using W E N S. Example: ENVELOPE(76.76, 84.76, 19.91, 12.62). Note that this field is indexed as a Solr spatial (RPT) field."
|
88
|
-
|
89
|
-
},
|
90
|
-
"solr_year_i": {
|
91
|
-
"type": "integer",
|
92
|
-
"description": "Derived from dct_temporal_sm. Year for which layer is valid and only a single value. Example: 1989. Note that this field is indexed as a Solr numeric field."
|
93
|
-
|
94
|
-
},
|
95
|
-
"dc_creator_sm": {
|
96
|
-
"type": "array",
|
97
|
-
"items": {
|
98
|
-
"type": "string"
|
99
|
-
},
|
100
|
-
"description": "Author(s). Example: George Washington, Thomas Jefferson."
|
101
|
-
|
102
|
-
},
|
103
|
-
"dc_format_s": {
|
104
|
-
"type": "string",
|
105
|
-
"enum": ["Shapefile", "GeoTIFF", "ArcGRID"],
|
106
|
-
"description": "File format for the layer, using a controlled vocabulary."
|
107
|
-
|
108
|
-
},
|
109
|
-
"dc_language_s": {
|
110
|
-
"type": "string",
|
111
|
-
"description": "Language for the layer. Example: English."
|
112
|
-
|
113
|
-
},
|
114
|
-
"dc_publisher_s": {
|
115
|
-
"type": "string",
|
116
|
-
"description": "Publisher. Example: ML InfoMap."
|
117
|
-
|
118
|
-
},
|
119
|
-
"dc_subject_sm": {
|
120
|
-
"type": "array",
|
121
|
-
"items": {
|
122
|
-
"type": "string"
|
123
|
-
},
|
124
|
-
"description": "Subjects, preferrably in a controlled vocabulary. Examples: Census, Human settlements."
|
125
|
-
|
126
|
-
},
|
127
|
-
"dc_type_s": {
|
128
|
-
"type": "string",
|
129
|
-
"enum": ["Dataset", "Image", "PhysicalObject"],
|
130
|
-
"description": "Resource type, using DCMI Type Vocabulary."
|
131
|
-
|
132
|
-
},
|
133
|
-
"dct_spatial_sm": {
|
134
|
-
"type": "array",
|
135
|
-
"items": {
|
136
|
-
"type": "string"
|
137
|
-
},
|
138
|
-
"description": "Spatial coverage and place names, preferrably in a controlled vocabulary. Example: 'Paris, France'."
|
139
|
-
|
140
|
-
},
|
141
|
-
"dct_temporal_sm": {
|
142
|
-
"type": "array",
|
143
|
-
"items": {
|
144
|
-
"type": "string"
|
145
|
-
},
|
146
|
-
"description": "Temporal coverage, typically years or dates. Example: 1989, circa 2010, 2007-2009. Note that this field is not in a specific date format."
|
147
|
-
|
148
|
-
},
|
149
|
-
"dct_issued_dt": {
|
150
|
-
"type": "string",
|
151
|
-
"format": "date-time",
|
152
|
-
"description": "Issued date for the layer, using XML Schema dateTime format (YYYY-MM-DDThh:mm:ssZ)."
|
153
|
-
|
154
|
-
},
|
155
|
-
"dct_isPartOf_sm": {
|
156
|
-
"type": "array",
|
157
|
-
"items": {
|
158
|
-
"type": "string"
|
159
|
-
},
|
160
|
-
"description": "Holding dataset for the layer, such as the name of a collection. Example: Village Maps of India."
|
161
|
-
|
162
|
-
},
|
163
|
-
"georss_point_s": {
|
164
|
-
"type": "string",
|
165
|
-
"description": "Point representation for layer as y, x - i.e., centroid. Example: 12.6 -119.4."
|
166
|
-
|
167
|
-
}
|
168
|
-
}
|
169
|
-
}
|